<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>Coeamyd's - Development</title>
    <link>http://www.coeamyd.net/</link>
    <description>...It ain't easy being green</description>
    <language>en-us</language>
    <copyright>Christoph Herold</copyright>
    <lastBuildDate>Tue, 03 Aug 2010 12:38:13 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 1.9.6264.0</generator>
    <managingEditor>Christoph.Herold@coeamyd.net</managingEditor>
    <webMaster>Christoph.Herold@coeamyd.net</webMaster>
    <item>
      <trackback:ping>http://www.coeamyd.net/Trackback.aspx?guid=e8c547e8-bb3f-4d49-afdf-89d0465885dc</trackback:ping>
      <pingback:server>http://www.coeamyd.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.coeamyd.net/PermaLink,guid,e8c547e8-bb3f-4d49-afdf-89d0465885dc.aspx</pingback:target>
      <dc:creator>Christoph Herold</dc:creator>
      <wfw:comment>http://www.coeamyd.net/CommentView,guid,e8c547e8-bb3f-4d49-afdf-89d0465885dc.aspx</wfw:comment>
      <wfw:commentRss>http://www.coeamyd.net/SyndicationService.asmx/GetEntryCommentsRss?guid=e8c547e8-bb3f-4d49-afdf-89d0465885dc</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
When creating a new Silverlight business application using RIA services, it will automatically
be configured to use Forms authentication. If you are developing an intranet application
with single sign-on, you can easily switch the web.config to use Windows auth instead
of forms. In my case, authentication still timed out, because the server still tried
to access a database. You also have to disable the RoleManager and Profile services
in the web.config to get Windows authentication running. This is a nice way to create
out-of-browser intranet applications and still have single sign-on.
</p>
        <img width="0" height="0" src="http://www.coeamyd.net/aggbug.ashx?id=e8c547e8-bb3f-4d49-afdf-89d0465885dc" />
      </body>
      <title>Using NTLM (Windows) authentication with RIA services</title>
      <guid isPermaLink="false">http://www.coeamyd.net/PermaLink,guid,e8c547e8-bb3f-4d49-afdf-89d0465885dc.aspx</guid>
      <link>http://www.coeamyd.net/PermaLink,guid,e8c547e8-bb3f-4d49-afdf-89d0465885dc.aspx</link>
      <pubDate>Tue, 03 Aug 2010 12:38:13 GMT</pubDate>
      <description>&lt;p&gt;
When creating a new Silverlight business application using RIA services, it will automatically
be configured to use Forms authentication. If you are developing an intranet application
with single sign-on, you can easily switch the web.config to use Windows auth instead
of forms. In my case, authentication still timed out, because the server still tried
to access a database. You also have to disable the RoleManager and Profile services
in the web.config to get Windows authentication running. This is a nice way to create
out-of-browser intranet applications and still have single sign-on.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.coeamyd.net/aggbug.ashx?id=e8c547e8-bb3f-4d49-afdf-89d0465885dc" /&gt;</description>
      <comments>http://www.coeamyd.net/CommentView,guid,e8c547e8-bb3f-4d49-afdf-89d0465885dc.aspx</comments>
      <category>.NET;ASP.NET;Development;Silverlight</category>
    </item>
    <item>
      <trackback:ping>http://www.coeamyd.net/Trackback.aspx?guid=ff32191b-0509-4b63-9696-a824d8db558a</trackback:ping>
      <pingback:server>http://www.coeamyd.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.coeamyd.net/PermaLink,guid,ff32191b-0509-4b63-9696-a824d8db558a.aspx</pingback:target>
      <dc:creator>Christoph Herold</dc:creator>
      <wfw:comment>http://www.coeamyd.net/CommentView,guid,ff32191b-0509-4b63-9696-a824d8db558a.aspx</wfw:comment>
      <wfw:commentRss>http://www.coeamyd.net/SyndicationService.asmx/GetEntryCommentsRss?guid=ff32191b-0509-4b63-9696-a824d8db558a</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I just launched a new project at codeplex aiming at the integration of jQuery UI in
DotNetNuke: <a href="http://jquidnn.codeplex.com/" target="_blank">http://jquidnn.codeplex.com/</a>.
The first releases are already available in form of DNN module packages containing
the core functionality, including infrastructural code to include jQuery and jQuery
UI, two web controls for the Tabs and Datepicker widgets, and the smoothness theme.
</p>
        <p>
Also available are module packages for three more themes: Cupertino, UI Darkness and
UI Lightness. Further skins are actually quite easy to package and will follow over
time, or when someone issues a request for one ;-)
</p>
        <p>
So please, start grabbing the releases and giving me feedback.
</p>
        <img width="0" height="0" src="http://www.coeamyd.net/aggbug.ashx?id=ff32191b-0509-4b63-9696-a824d8db558a" />
      </body>
      <title>jQuery UI DotNetNuke integration</title>
      <guid isPermaLink="false">http://www.coeamyd.net/PermaLink,guid,ff32191b-0509-4b63-9696-a824d8db558a.aspx</guid>
      <link>http://www.coeamyd.net/PermaLink,guid,ff32191b-0509-4b63-9696-a824d8db558a.aspx</link>
      <pubDate>Fri, 03 Apr 2009 11:04:47 GMT</pubDate>
      <description>&lt;p&gt;
I just launched a new project at codeplex aiming at the integration of jQuery UI in
DotNetNuke: &lt;a href="http://jquidnn.codeplex.com/" target="_blank"&gt;http://jquidnn.codeplex.com/&lt;/a&gt;.
The first releases are already available in form of DNN module packages containing
the core functionality, including infrastructural code to include jQuery and jQuery
UI, two web controls for the Tabs and Datepicker widgets, and the smoothness theme.
&lt;/p&gt;
&lt;p&gt;
Also available are module packages for three more themes: Cupertino, UI Darkness and
UI Lightness. Further skins are actually quite easy to package and will follow over
time, or when someone issues a request for one ;-)
&lt;/p&gt;
&lt;p&gt;
So please, start grabbing the releases and giving me feedback.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.coeamyd.net/aggbug.ashx?id=ff32191b-0509-4b63-9696-a824d8db558a" /&gt;</description>
      <comments>http://www.coeamyd.net/CommentView,guid,ff32191b-0509-4b63-9696-a824d8db558a.aspx</comments>
      <category>.NET;ASP.NET;Development;DotNetNuke;jQuery;Web</category>
    </item>
    <item>
      <trackback:ping>http://www.coeamyd.net/Trackback.aspx?guid=a2da5e82-d6aa-42f0-8913-8538cd7502f0</trackback:ping>
      <pingback:server>http://www.coeamyd.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.coeamyd.net/PermaLink,guid,a2da5e82-d6aa-42f0-8913-8538cd7502f0.aspx</pingback:target>
      <dc:creator>Christoph Herold</dc:creator>
      <wfw:comment>http://www.coeamyd.net/CommentView,guid,a2da5e82-d6aa-42f0-8913-8538cd7502f0.aspx</wfw:comment>
      <wfw:commentRss>http://www.coeamyd.net/SyndicationService.asmx/GetEntryCommentsRss?guid=a2da5e82-d6aa-42f0-8913-8538cd7502f0</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I just wasted another hour, trying to figure out, what exactly ASP.NET was trying
to tell me, when giving me an <strong>"ASPNET: Make sure that the class defined in
this code file matches the 'inherits' attribute, and that it extends the correct base
class (e.g. Page or UserControl)."</strong> message on compiling my ascx file.
</p>
        <p>
Ok, so I used a custom namespace, but I've done that hundreds of times, so that shouldn't
be the problem. I also had a custom base class inheriting from UserControl. Also,
nothing I haven't done before. So what was the issue now?!
</p>
        <p>
I basically retyped everything concerning the namespace and class names in all files,
but nothing helped. So I reverted to commenting out my code. This helped me find the
issue: I used a
</p>
        <pre>&lt;% if (somethingOrOther) { %&gt; Some code here &lt;% } %&gt;</pre>
        <p>
construct in my ascx-file (Please don't start an argument on whether this is good
practice or not. I know it's not the cleanest way to do things, but that is not the
concern here :-) ), and actually forgot to put in the closing <code>&lt;% } %&gt;</code>.
Ok, my fault, but shouldn't you get a better Compiler message than "ASPNET: Make sure
that the class defined in this code file matches the 'inherits' attribute, and that
it extends the correct base class (e.g. Page or UserControl)."?!
</p>
        <p>
So, if you encouter this error (and believe me, I've had it more than once due to
typos), and are 100% positive you've spelled everything correctly, check for unbalanced
parentheses!
</p>
        <img width="0" height="0" src="http://www.coeamyd.net/aggbug.ashx?id=a2da5e82-d6aa-42f0-8913-8538cd7502f0" />
      </body>
      <title>Bogus errors from ASP.NET compiler</title>
      <guid isPermaLink="false">http://www.coeamyd.net/PermaLink,guid,a2da5e82-d6aa-42f0-8913-8538cd7502f0.aspx</guid>
      <link>http://www.coeamyd.net/PermaLink,guid,a2da5e82-d6aa-42f0-8913-8538cd7502f0.aspx</link>
      <pubDate>Wed, 18 Mar 2009 16:43:48 GMT</pubDate>
      <description>&lt;p&gt;
I just wasted another hour, trying to figure out, what exactly ASP.NET was trying
to tell me, when giving me an &lt;strong&gt;"ASPNET: Make sure that the class defined in
this code file matches the 'inherits' attribute, and that it extends the correct base
class (e.g. Page or UserControl)."&lt;/strong&gt; message on compiling my ascx file.
&lt;/p&gt;
&lt;p&gt;
Ok, so I used a custom namespace, but I've done that hundreds of times, so that shouldn't
be the problem. I also had a custom base class inheriting from UserControl. Also,
nothing I haven't done before. So what was the issue now?!
&lt;/p&gt;
&lt;p&gt;
I basically retyped everything concerning the namespace and class names in all files,
but nothing helped. So I reverted to commenting out my code. This helped me find the
issue: I used a
&lt;/p&gt;
&lt;pre&gt;&amp;lt;% if (somethingOrOther) { %&amp;gt; Some code here &amp;lt;% } %&amp;gt;&lt;/pre&gt;
&lt;p&gt;
construct in my ascx-file (Please don't start an argument on whether this is good
practice or not. I know it's not the cleanest way to do things, but that is not the
concern here :-) ), and actually forgot to put in the closing &lt;code&gt;&amp;lt;% } %&amp;gt;&lt;/code&gt;.
Ok, my fault, but shouldn't you get a better Compiler message than "ASPNET: Make sure
that the class defined in this code file matches the 'inherits' attribute, and that
it extends the correct base class (e.g. Page or UserControl)."?!
&lt;/p&gt;
&lt;p&gt;
So, if you encouter this error (and believe me, I've had it more than once due to
typos), and are 100% positive you've spelled everything correctly, check for unbalanced
parentheses!
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.coeamyd.net/aggbug.ashx?id=a2da5e82-d6aa-42f0-8913-8538cd7502f0" /&gt;</description>
      <comments>http://www.coeamyd.net/CommentView,guid,a2da5e82-d6aa-42f0-8913-8538cd7502f0.aspx</comments>
      <category>.NET;ASP.NET;Development;HTML;Pitfall;Web</category>
    </item>
    <item>
      <trackback:ping>http://www.coeamyd.net/Trackback.aspx?guid=f596bb07-01ec-439a-860a-84830935243c</trackback:ping>
      <pingback:server>http://www.coeamyd.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.coeamyd.net/PermaLink,guid,f596bb07-01ec-439a-860a-84830935243c.aspx</pingback:target>
      <dc:creator>Christoph Herold</dc:creator>
      <wfw:comment>http://www.coeamyd.net/CommentView,guid,f596bb07-01ec-439a-860a-84830935243c.aspx</wfw:comment>
      <wfw:commentRss>http://www.coeamyd.net/SyndicationService.asmx/GetEntryCommentsRss?guid=f596bb07-01ec-439a-860a-84830935243c</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Yesterday, I had one of those WTF moments. I had a page with a form for entering two
addresses. Both had the same fields, including a <code>RadioButtonList</code> with
identical items. Since the items are resourced, I decided to optimize the performance
by reusing the <code>ListItem</code>s like so:
</p>
        <pre>ListItem[] items = new ListItem[2];
items[0] = new ListItem(this.GetString("salutation.Mister"), "Mr");
items[1] = new ListItem(this.GetString("salutation.Misses"), "Mrs");
this.salutation.Items.AddRange(items);
this.salutation2.Items.AddRange(items);</pre>
        <p>
Simple eh. Everything seems to be ok. And was I amazed, when I tested it, and I always
got the <code>SelectedItem</code> to be the one selected in <code>salutation2</code>.
I double-checked every location were I was storing the values, in case I forgot to
change the field name after copy/pasting. But everything was correct, as far as I
could tell. I even checked the values submitted by the browser, they were also correct.
</p>
        <p>
Finally, it hit me: The ListItem has a <code>Selected</code> property, and it is used
to find the <code>RadioButtonList</code>s <code>SelectedItem</code> property. And
since I reused the items, the first list parses its items on postback, sets the appropriate <code>ListItem</code>'s <code>Selected</code> property
to <code>true</code>. Same thing happens with the second <code>RadioButtonList</code>.
And since the <code>ListItem</code>s are used in both lists, the last one wins.
</p>
        <p>
So, I changed my code to look like this:
</p>
        <pre>ListItem[] items = new ListItem[2];
items[0] = new ListItem(this.GetString("salutation.Mister"), "Mr");
items[1] = new ListItem(this.GetString("salutation.Misses"), "Mrs");
this.salutation.Items.AddRange(items);
items = new ListItem[2];
items[0] = new ListItem(this.GetString("salutation.Mister"), "Mr");
items[1] = new ListItem(this.GetString("salutation.Misses"), "Mrs");
this.salutation2.Items.AddRange(items);</pre>
        <p>
Now everything works as it should. So next time, be careful when reusing your <code>ListItem</code>s!
</p>
        <img width="0" height="0" src="http://www.coeamyd.net/aggbug.ashx?id=f596bb07-01ec-439a-860a-84830935243c" />
      </body>
      <title>Be careful when reusing ListItems</title>
      <guid isPermaLink="false">http://www.coeamyd.net/PermaLink,guid,f596bb07-01ec-439a-860a-84830935243c.aspx</guid>
      <link>http://www.coeamyd.net/PermaLink,guid,f596bb07-01ec-439a-860a-84830935243c.aspx</link>
      <pubDate>Tue, 17 Mar 2009 11:12:24 GMT</pubDate>
      <description>&lt;p&gt;
Yesterday, I had one of those WTF moments. I had a page with a form for entering two
addresses. Both had the same fields, including a &lt;code&gt;RadioButtonList&lt;/code&gt; with
identical items. Since the items are resourced, I decided to optimize the performance
by reusing the &lt;code&gt;ListItem&lt;/code&gt;s like so:
&lt;/p&gt;
&lt;pre&gt;ListItem[] items = new ListItem[2];
items[0] = new ListItem(this.GetString("salutation.Mister"), "Mr");
items[1] = new ListItem(this.GetString("salutation.Misses"), "Mrs");
this.salutation.Items.AddRange(items);
this.salutation2.Items.AddRange(items);&lt;/pre&gt;
&lt;p&gt;
Simple eh. Everything seems to be ok. And was I amazed, when I tested it, and I always
got the &lt;code&gt;SelectedItem&lt;/code&gt; to be the one selected in &lt;code&gt;salutation2&lt;/code&gt;.
I double-checked every location were I was storing the values, in case I forgot to
change the field name after copy/pasting. But everything was correct, as far as I
could tell. I even checked the values submitted by the browser, they were also correct.
&lt;/p&gt;
&lt;p&gt;
Finally, it hit me: The ListItem has a &lt;code&gt;Selected&lt;/code&gt; property, and it is used
to find the &lt;code&gt;RadioButtonList&lt;/code&gt;s &lt;code&gt;SelectedItem&lt;/code&gt; property. And
since I reused the items, the first list parses its items on postback, sets the appropriate &lt;code&gt;ListItem&lt;/code&gt;'s &lt;code&gt;Selected&lt;/code&gt; property
to &lt;code&gt;true&lt;/code&gt;. Same thing happens with the second &lt;code&gt;RadioButtonList&lt;/code&gt;.
And since the &lt;code&gt;ListItem&lt;/code&gt;s are used in both lists, the last one wins.
&lt;/p&gt;
&lt;p&gt;
So, I changed my code to look like this:
&lt;/p&gt;
&lt;pre&gt;ListItem[] items = new ListItem[2];
items[0] = new ListItem(this.GetString("salutation.Mister"), "Mr");
items[1] = new ListItem(this.GetString("salutation.Misses"), "Mrs");
this.salutation.Items.AddRange(items);
items = new ListItem[2];
items[0] = new ListItem(this.GetString("salutation.Mister"), "Mr");
items[1] = new ListItem(this.GetString("salutation.Misses"), "Mrs");
this.salutation2.Items.AddRange(items);&lt;/pre&gt;
&lt;p&gt;
Now everything works as it should. So next time, be careful when reusing your &lt;code&gt;ListItem&lt;/code&gt;s!
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.coeamyd.net/aggbug.ashx?id=f596bb07-01ec-439a-860a-84830935243c" /&gt;</description>
      <comments>http://www.coeamyd.net/CommentView,guid,f596bb07-01ec-439a-860a-84830935243c.aspx</comments>
      <category>ASP.NET;Development;HTML;Web;Pitfall</category>
    </item>
    <item>
      <trackback:ping>http://www.coeamyd.net/Trackback.aspx?guid=53accd33-6788-4f91-b847-f316050c0e41</trackback:ping>
      <pingback:server>http://www.coeamyd.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.coeamyd.net/PermaLink,guid,53accd33-6788-4f91-b847-f316050c0e41.aspx</pingback:target>
      <dc:creator>Christoph Herold</dc:creator>
      <wfw:comment>http://www.coeamyd.net/CommentView,guid,53accd33-6788-4f91-b847-f316050c0e41.aspx</wfw:comment>
      <wfw:commentRss>http://www.coeamyd.net/SyndicationService.asmx/GetEntryCommentsRss?guid=53accd33-6788-4f91-b847-f316050c0e41</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Yesterday, I wasted a few hours trying to upgrade my SQL Server 2005 installation
to 2008. Actually, upgrading is a simple process. You can simply select, which instance
to upgrade, and the installer does the rest. It worked absolutely fine for my regular
instance. I got some installation errors for a component, but didn't mind that at
first. Everything seemed to be working.
</p>
        <p>
At least I thought so, until I noticed, WHAT component got the errors. The SQL Server
Management Studio was not installed. And the older 2005 version isn't able to connect
to 2008. Bummer.
</p>
        <p>
So I thought, let's try to reinstall it. Same error: "The error code is 2349." When
you copy the details to the clipboard, you at least find the URL <a href="http://www.microsoft.com/products/ee/transform.aspx?ProdName=Microsoft+SQL+Server&amp;EvtSrc=setup.rll&amp;EvtID=50000&amp;ProdVer=10.0.1600.22&amp;EvtType=0xF45F6601%25401201%25401">http://www.microsoft.com/products/ee/transform.aspx?ProdName=Microsoft+SQL+Server&amp;EvtSrc=setup.rll&amp;EvtID=50000&amp;ProdVer=10.0.1600.22&amp;EvtType=0xF45F6601%25401201%25401</a>,
that gives you the information, that the SQL Server Native Client is causing the trouble.
</p>
        <p>
So I tried upgrading my SQL Server Express instance, but that was also dismissed with
an error. Next, I uninstalled my SQL Server 2005 express instance, uninstalled the
native client, and now added the Management Studio feature to my SQL Server 2008 instance.
Same error, this is really getting frustrating.
</p>
        <p>
So now, my last resort is to uninstall the whole d*rn thing and try to reinstall it.
At least the installation only takes about 2 hours *cough*.
</p>
        <p>
          <strong>UPDATE:</strong> Even the complete uninstall did not help. As the error message
states, the Native Client is supposedly not installed from the sqlncli.msi package.
Well, I even uninstalled and reinstalled ONLY THAT package, to no avail. I'm still
getting the same bogus error, when I try to install SSMS. Any help is welcome! I'm
out of ideas.
</p>
        <p>
But at least I'm not all alone with my ss2008 install problems. A friend of mine had
other issues, but at least he was able to resolve them: <a href="http://www.entwicklungsgedanken.de/2009/01/28/installation-problems-with-sql-server-2008/comment-page-1/#comment-252">http://www.entwicklungsgedanken.de/2009/01/28/installation-problems-with-sql-server-2008/comment-page-1/#comment-252</a>.
</p>
        <p>
          <strong>UPDATE 2:</strong> I have found out, that it's the Visual Studio Tools for
Applications 2.0 installer, that is causing the problems. But I still have no idea
why.
</p>
        <p>
          <strong>UPDATE 3:</strong> Rollback all rants :-) I found the issue. A file could
not be replaced/updated by the installer. This was due to the fact, that my hard disk
seems to be defective. The file could not be read, even less replaced. After renaming
it, the installation went fine. So now, I have performed a scandisk, the errors have
been cleared, and everything is in order. Guess I'll be backing up more often now,
though.
</p>
        <img width="0" height="0" src="http://www.coeamyd.net/aggbug.ashx?id=53accd33-6788-4f91-b847-f316050c0e41" />
      </body>
      <title>Upgrade hassles with SQL Server 2008</title>
      <guid isPermaLink="false">http://www.coeamyd.net/PermaLink,guid,53accd33-6788-4f91-b847-f316050c0e41.aspx</guid>
      <link>http://www.coeamyd.net/PermaLink,guid,53accd33-6788-4f91-b847-f316050c0e41.aspx</link>
      <pubDate>Wed, 28 Jan 2009 09:36:10 GMT</pubDate>
      <description>&lt;p&gt;
Yesterday, I wasted a few hours trying to upgrade my SQL Server 2005 installation
to 2008. Actually, upgrading is a simple process. You can simply select, which instance
to upgrade, and the installer does the rest. It worked absolutely fine for my regular
instance. I got some installation errors for a component, but didn't mind that at
first. Everything seemed to be working.
&lt;/p&gt;
&lt;p&gt;
At least I thought so, until I noticed, WHAT component got the errors. The SQL Server
Management Studio was not installed. And the older 2005 version isn't able to connect
to 2008. Bummer.
&lt;/p&gt;
&lt;p&gt;
So I thought, let's try to reinstall it. Same error: "The error code is 2349." When
you copy the details to the clipboard, you at least find the URL &lt;a href="http://www.microsoft.com/products/ee/transform.aspx?ProdName=Microsoft+SQL+Server&amp;amp;EvtSrc=setup.rll&amp;amp;EvtID=50000&amp;amp;ProdVer=10.0.1600.22&amp;amp;EvtType=0xF45F6601%25401201%25401"&gt;http://www.microsoft.com/products/ee/transform.aspx?ProdName=Microsoft+SQL+Server&amp;amp;EvtSrc=setup.rll&amp;amp;EvtID=50000&amp;amp;ProdVer=10.0.1600.22&amp;amp;EvtType=0xF45F6601%25401201%25401&lt;/a&gt;,
that gives you the information, that the SQL Server Native Client is causing the trouble.
&lt;/p&gt;
&lt;p&gt;
So I tried upgrading my SQL Server Express instance, but that was also dismissed with
an error. Next, I uninstalled my SQL Server 2005 express instance, uninstalled the
native client, and now added the Management Studio feature to my SQL Server 2008 instance.
Same error, this is really getting frustrating.
&lt;/p&gt;
&lt;p&gt;
So now, my last resort is to uninstall the whole d*rn thing and try to reinstall it.
At least the installation only takes about 2 hours *cough*.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;UPDATE:&lt;/strong&gt; Even the complete uninstall did not help. As the error message
states, the Native Client is supposedly not installed from the sqlncli.msi package.
Well, I even uninstalled and reinstalled ONLY THAT package, to no avail. I'm still
getting the same bogus error, when I try to install SSMS. Any help is welcome! I'm
out of ideas.
&lt;/p&gt;
&lt;p&gt;
But at least I'm not all alone with my ss2008 install problems. A friend of mine had
other issues, but at least he was able to resolve them: &lt;a href="http://www.entwicklungsgedanken.de/2009/01/28/installation-problems-with-sql-server-2008/comment-page-1/#comment-252"&gt;http://www.entwicklungsgedanken.de/2009/01/28/installation-problems-with-sql-server-2008/comment-page-1/#comment-252&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;UPDATE 2:&lt;/strong&gt; I have found out, that it's the Visual Studio Tools for
Applications 2.0 installer, that is causing the problems. But I still have no idea
why.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;UPDATE 3:&lt;/strong&gt; Rollback all rants :-) I found the issue. A file could
not be replaced/updated by the installer. This was due to the fact, that my hard disk
seems to be defective. The file could not be read, even less replaced. After renaming
it, the installation went fine. So now, I have performed a scandisk, the errors have
been cleared, and everything is in order. Guess I'll be backing up more often now,
though.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.coeamyd.net/aggbug.ashx?id=53accd33-6788-4f91-b847-f316050c0e41" /&gt;</description>
      <comments>http://www.coeamyd.net/CommentView,guid,53accd33-6788-4f91-b847-f316050c0e41.aspx</comments>
      <category>Administration;Development;SQL Server</category>
    </item>
    <item>
      <trackback:ping>http://www.coeamyd.net/Trackback.aspx?guid=3fc8b3ac-79ec-48f4-ae2b-4b61919334d6</trackback:ping>
      <pingback:server>http://www.coeamyd.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.coeamyd.net/PermaLink,guid,3fc8b3ac-79ec-48f4-ae2b-4b61919334d6.aspx</pingback:target>
      <dc:creator>Christoph Herold</dc:creator>
      <wfw:comment>http://www.coeamyd.net/CommentView,guid,3fc8b3ac-79ec-48f4-ae2b-4b61919334d6.aspx</wfw:comment>
      <wfw:commentRss>http://www.coeamyd.net/SyndicationService.asmx/GetEntryCommentsRss?guid=3fc8b3ac-79ec-48f4-ae2b-4b61919334d6</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I just ran across a really nice article describing how to create a self hosted WCF
service using HTTPS bindings. It's a nice step-by-step instruction on how to create
your own certificates, adding them to your store, configuring the Windows HTTP runtime,
and configuring your WCF service. You can find the article on CodeProject at this
url: <a href="http://www.codeproject.com/KB/WCF/WCFSSL.aspx">http://www.codeproject.com/KB/WCF/WCFSSL.aspx</a>.
Really nice article, helped me a lot. Kudos to Chris.
</p>
        <p>
Also, Steve Johnson created a nice little GUI for the httpcfg command line tool, which
you can find here: <a href="http://www.stevestechspot.com/ABetterHttpcfg.aspx">http://www.stevestechspot.com/ABetterHttpcfg.aspx</a>.
It's a nice addition to the article, so you are not completely bound to the console
:-)
</p>
        <img width="0" height="0" src="http://www.coeamyd.net/aggbug.ashx?id=3fc8b3ac-79ec-48f4-ae2b-4b61919334d6" />
      </body>
      <title>Developing WCF with HTTPS</title>
      <guid isPermaLink="false">http://www.coeamyd.net/PermaLink,guid,3fc8b3ac-79ec-48f4-ae2b-4b61919334d6.aspx</guid>
      <link>http://www.coeamyd.net/PermaLink,guid,3fc8b3ac-79ec-48f4-ae2b-4b61919334d6.aspx</link>
      <pubDate>Tue, 13 Jan 2009 20:22:35 GMT</pubDate>
      <description>&lt;p&gt;
I just ran across a really nice article describing how to create a self hosted WCF
service using HTTPS bindings. It's a nice step-by-step instruction on how to create
your own certificates, adding them to your store, configuring the Windows HTTP runtime,
and configuring your WCF service. You can find the article on CodeProject at this
url: &lt;a href="http://www.codeproject.com/KB/WCF/WCFSSL.aspx"&gt;http://www.codeproject.com/KB/WCF/WCFSSL.aspx&lt;/a&gt;.
Really nice article, helped me a lot. Kudos to Chris.
&lt;/p&gt;
&lt;p&gt;
Also, Steve Johnson created a nice little GUI for the httpcfg command line tool, which
you can find here: &lt;a href="http://www.stevestechspot.com/ABetterHttpcfg.aspx"&gt;http://www.stevestechspot.com/ABetterHttpcfg.aspx&lt;/a&gt;.
It's a nice addition to the article, so you are not completely bound to the console
:-)
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.coeamyd.net/aggbug.ashx?id=3fc8b3ac-79ec-48f4-ae2b-4b61919334d6" /&gt;</description>
      <comments>http://www.coeamyd.net/CommentView,guid,3fc8b3ac-79ec-48f4-ae2b-4b61919334d6.aspx</comments>
      <category>.NET;Development;WCF</category>
    </item>
    <item>
      <trackback:ping>http://www.coeamyd.net/Trackback.aspx?guid=6998dbab-23b2-4fc4-9e21-ce3a327d5d82</trackback:ping>
      <pingback:server>http://www.coeamyd.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.coeamyd.net/PermaLink,guid,6998dbab-23b2-4fc4-9e21-ce3a327d5d82.aspx</pingback:target>
      <dc:creator>Christoph Herold</dc:creator>
      <wfw:comment>http://www.coeamyd.net/CommentView,guid,6998dbab-23b2-4fc4-9e21-ce3a327d5d82.aspx</wfw:comment>
      <wfw:commentRss>http://www.coeamyd.net/SyndicationService.asmx/GetEntryCommentsRss?guid=6998dbab-23b2-4fc4-9e21-ce3a327d5d82</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">I have been using jQuery with DotNetNuke
for a while now, and was very happy to finally see it integrated into DotNetNuke.
What makes me wonder, is that there is no central method for including it in DNN 4.9.1.
The library has been placed into the folder ~/Resources/Shared/scripts/jquery, but
the one usage I could find does not use the ClientScriptManager to include the script.
Instead, it manually creates a Literal script control. This will cause the script
to be included multiple times, if different controls use it simultaneously. Perhaps
this will be "fixed" in a future release. Perhaps adding a method to the ClientAPI
for including it would be a good solution for a global include mechanism.<br /><p></p><img width="0" height="0" src="http://www.coeamyd.net/aggbug.ashx?id=6998dbab-23b2-4fc4-9e21-ce3a327d5d82" /></body>
      <title>DotNetNuke now with jQuery</title>
      <guid isPermaLink="false">http://www.coeamyd.net/PermaLink,guid,6998dbab-23b2-4fc4-9e21-ce3a327d5d82.aspx</guid>
      <link>http://www.coeamyd.net/PermaLink,guid,6998dbab-23b2-4fc4-9e21-ce3a327d5d82.aspx</link>
      <pubDate>Wed, 07 Jan 2009 10:06:15 GMT</pubDate>
      <description>I have been using jQuery with DotNetNuke for a while now, and was very happy to finally see it integrated into DotNetNuke. What makes me wonder, is that there is no central method for including it in DNN 4.9.1. The library has been placed into the folder ~/Resources/Shared/scripts/jquery, but the one usage I could find does not use the ClientScriptManager to include the script. Instead, it manually creates a Literal script control. This will cause the script to be included multiple times, if different controls use it simultaneously. Perhaps this will be "fixed" in a future release. Perhaps adding a method to the ClientAPI for including it would be a good solution for a global include mechanism.&lt;br&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.coeamyd.net/aggbug.ashx?id=6998dbab-23b2-4fc4-9e21-ce3a327d5d82" /&gt;</description>
      <comments>http://www.coeamyd.net/CommentView,guid,6998dbab-23b2-4fc4-9e21-ce3a327d5d82.aspx</comments>
      <category>.NET;ASP.NET;Development;DotNetNuke;Web;jQuery</category>
    </item>
    <item>
      <trackback:ping>http://www.coeamyd.net/Trackback.aspx?guid=561b2b93-bfa5-4ad7-9805-d939b2b9301e</trackback:ping>
      <pingback:server>http://www.coeamyd.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.coeamyd.net/PermaLink,guid,561b2b93-bfa5-4ad7-9805-d939b2b9301e.aspx</pingback:target>
      <dc:creator>Christoph Herold</dc:creator>
      <wfw:comment>http://www.coeamyd.net/CommentView,guid,561b2b93-bfa5-4ad7-9805-d939b2b9301e.aspx</wfw:comment>
      <wfw:commentRss>http://www.coeamyd.net/SyndicationService.asmx/GetEntryCommentsRss?guid=561b2b93-bfa5-4ad7-9805-d939b2b9301e</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Today, I was building a nice little page layout for SharePoint and wanted to use SharePoint
DateTimeField control. Since the field I wanted to edit was DateOnly, I set the corresponding
property, leaving me with this code:
</p>
        <p>
          <span style="color: Black; background-color: transparent; font-family: Courier New; font-size: 11px;">&lt;SharePointWebControls:DateTimeField
runat=<span style="color: #666666; background-color: #e4e4e4; font-family: Courier New; font-size: 11px;">"server"</span> id=<span style="color: #666666; background-color: #e4e4e4; font-family: Courier New; font-size: 11px;">"dtfArticleStartDate"</span> DateOnly=<span style="color: #666666; background-color: #e4e4e4; font-family: Courier New; font-size: 11px;">"true"</span> FieldName=<span style="color: #666666; background-color: #e4e4e4; font-family: Courier New; font-size: 11px;">"ArticleStartDate"</span> /&gt;</span>
        </p>
        <p>
Seems fine to me, but ASP.NET did not like it. Or rather, the control did not like
it. I got an ArgumentException with the following StackTrace:
</p>
        <p>
 
</p>
        <p>
          <span style="color: Black; background-color: transparent; font-family: Courier New; font-size: 11px;">[ArgumentException:
FieldName value is not specified.]<br />
Microsoft.SharePoint.WebControls.FieldMetadata.get_Field() +150<br />
Microsoft.SharePoint.WebControls.DateTimeField.CreateChildControls() +310<br />
System.Web.UI.Control.EnsureChildControls() +87<br />
Microsoft.SharePoint.WebControls.DateTimeField.set_DateOnly(Boolean value) +29<br />
ASP.MYNEWSPAGE_ASPX__2072755151.__BuildControldtfArticleStartDate()</span>
        </p>
        <p>
FieldName value is not specified?! As you can see in my code above, it is indeed specified.
But the stack trace gives us more information: The exception occurs in the compiled
ASPX file.
</p>
        <ul>
          <li>
ASP.MYNEWSPAGE_ASPX__2072755151.__BuildControldtfArticleStartDate():<br />
- We are building my DateTimeField control.</li>
          <li>
DateTimeField.set_DateOnly:<br />
- We are setting the DateOnly property.</li>
          <li>
FieldMetadata.get_Field:<br />
- Getting the field is where the exception occurs.</li>
        </ul>
        <p>
Note my ASPX-code again: I first set DateOnly="true" and then FieldName="ArticleStartDate".
Oh my god, this can't be true... The solution is very simple: change the order of
the attributes/properties:
</p>
        <p>
          <span style="color: Black; background-color: transparent; font-family: Courier New; font-size: 11px;">&lt;SharePointWebControls:DateTimeField
runat=<span style="color: #666666; background-color: #e4e4e4; font-family: Courier New; font-size: 11px;">"server"</span> id=<span style="color: #666666; background-color: #e4e4e4; font-family: Courier New; font-size: 11px;">"dtfArticleStartDate"</span><span style="color: #cc0000; background-color: #ffcccc; font-family: Courier New; font-size: 11px;">FieldName="ArticleStartDate"
DateOnly="true"</span> /&gt;</span>
        </p>
        <p>
Against all good practices, the SharePoint team actually created a direct dependency
between two properties. At least the stack trace directly tells you where things go
wrong, so the solution is obvious. Nonetheless, I thought, this was worth noting.
It actually made me laugh, when I encountered it. Another one of those nice little
pitfalls when working with SharePoint :-)
</p>
        <img width="0" height="0" src="http://www.coeamyd.net/aggbug.ashx?id=561b2b93-bfa5-4ad7-9805-d939b2b9301e" />
      </body>
      <title>SharePoint DateTimeField control and the order of its properties</title>
      <guid isPermaLink="false">http://www.coeamyd.net/PermaLink,guid,561b2b93-bfa5-4ad7-9805-d939b2b9301e.aspx</guid>
      <link>http://www.coeamyd.net/PermaLink,guid,561b2b93-bfa5-4ad7-9805-d939b2b9301e.aspx</link>
      <pubDate>Wed, 19 Nov 2008 16:37:25 GMT</pubDate>
      <description>&lt;p&gt;
Today, I was building a nice little page layout for SharePoint and wanted to use SharePoint
DateTimeField control. Since the field I wanted to edit was DateOnly, I set the corresponding
property, leaving me with this code:
&lt;/p&gt;
&lt;p&gt;
&lt;span style="color: Black; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;&amp;lt;SharePointWebControls:DateTimeField
runat=&lt;span style="color: #666666; background-color: #e4e4e4; font-family: Courier New; font-size: 11px;"&gt;"server"&lt;/span&gt; id=&lt;span style="color: #666666; background-color: #e4e4e4; font-family: Courier New; font-size: 11px;"&gt;"dtfArticleStartDate"&lt;/span&gt; DateOnly=&lt;span style="color: #666666; background-color: #e4e4e4; font-family: Courier New; font-size: 11px;"&gt;"true"&lt;/span&gt; FieldName=&lt;span style="color: #666666; background-color: #e4e4e4; font-family: Courier New; font-size: 11px;"&gt;"ArticleStartDate"&lt;/span&gt; /&amp;gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
Seems fine to me, but ASP.NET did not like it. Or rather, the control did not like
it. I got an ArgumentException with the following StackTrace:
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
&lt;span style="color: Black; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;[ArgumentException:
FieldName value is not specified.]&lt;br /&gt;
Microsoft.SharePoint.WebControls.FieldMetadata.get_Field() +150&lt;br /&gt;
Microsoft.SharePoint.WebControls.DateTimeField.CreateChildControls() +310&lt;br /&gt;
System.Web.UI.Control.EnsureChildControls() +87&lt;br /&gt;
Microsoft.SharePoint.WebControls.DateTimeField.set_DateOnly(Boolean value) +29&lt;br /&gt;
ASP.MYNEWSPAGE_ASPX__2072755151.__BuildControldtfArticleStartDate()&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
FieldName value is not specified?! As you can see in my code above, it is indeed specified.
But the stack trace gives us more information: The exception occurs in the compiled
ASPX file.
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
ASP.MYNEWSPAGE_ASPX__2072755151.__BuildControldtfArticleStartDate():&lt;br /&gt;
- We are building my DateTimeField control.&lt;/li&gt;
&lt;li&gt;
DateTimeField.set_DateOnly:&lt;br /&gt;
- We are setting the DateOnly property.&lt;/li&gt;
&lt;li&gt;
FieldMetadata.get_Field:&lt;br /&gt;
- Getting the field is where the exception occurs.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
Note my ASPX-code again: I first set DateOnly="true" and then FieldName="ArticleStartDate".
Oh my god, this can't be true... The solution is very simple: change the order of
the attributes/properties:
&lt;/p&gt;
&lt;p&gt;
&lt;span style="color: Black; background-color: transparent; font-family: Courier New; font-size: 11px;"&gt;&amp;lt;SharePointWebControls:DateTimeField
runat=&lt;span style="color: #666666; background-color: #e4e4e4; font-family: Courier New; font-size: 11px;"&gt;"server"&lt;/span&gt; id=&lt;span style="color: #666666; background-color: #e4e4e4; font-family: Courier New; font-size: 11px;"&gt;"dtfArticleStartDate"&lt;/span&gt; &lt;span style="color: #cc0000; background-color: #ffcccc; font-family: Courier New; font-size: 11px;"&gt;FieldName="ArticleStartDate"
DateOnly="true"&lt;/span&gt; /&amp;gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p&gt;
Against all good practices, the SharePoint team actually created a direct dependency
between two properties. At least the stack trace directly tells you where things go
wrong, so the solution is obvious. Nonetheless, I thought, this was worth noting.
It actually made me laugh, when I encountered it. Another one of those nice little
pitfalls when working with SharePoint :-)
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.coeamyd.net/aggbug.ashx?id=561b2b93-bfa5-4ad7-9805-d939b2b9301e" /&gt;</description>
      <comments>http://www.coeamyd.net/CommentView,guid,561b2b93-bfa5-4ad7-9805-d939b2b9301e.aspx</comments>
      <category>.NET;ASP.NET;Development;Pitfall;SharePoint</category>
    </item>
    <item>
      <trackback:ping>http://www.coeamyd.net/Trackback.aspx?guid=0e890bb9-e18c-411e-909f-b0e4a3622258</trackback:ping>
      <pingback:server>http://www.coeamyd.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.coeamyd.net/PermaLink,guid,0e890bb9-e18c-411e-909f-b0e4a3622258.aspx</pingback:target>
      <dc:creator>Christoph Herold</dc:creator>
      <wfw:comment>http://www.coeamyd.net/CommentView,guid,0e890bb9-e18c-411e-909f-b0e4a3622258.aspx</wfw:comment>
      <wfw:commentRss>http://www.coeamyd.net/SyndicationService.asmx/GetEntryCommentsRss?guid=0e890bb9-e18c-411e-909f-b0e4a3622258</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
We finally got a useful response concerning the TransactionScope Timeout problem.
Someone else had a similar issue and started a new thread in the Microsoft forums: <a href="http://forums.microsoft.com/forums/ShowPost.aspx?PostID=3069149&amp;SiteID=1">http://forums.microsoft.com/forums/ShowPost.aspx?PostID=3069149&amp;SiteID=1</a>.
The issue has been resolved, but only as of the .NET Framework 3.5. There is a new
connection string parameter named "Transaction binding". This is set to "Implicit
unbind", which by default causes the described (mis-)behavior. Instead, you must set
it to "explicit unbind", so that queries issued after the transaction times out are
still considered to be INSIDE the transaction and not in auto-commit mode. You can
read the details in the forum post.
</p>
        <p>
Alas, this only solves the problem when using the SqlClient ADO.NET provider. For
all other transactive repositories, the issue still exists.
</p>
        <img width="0" height="0" src="http://www.coeamyd.net/aggbug.ashx?id=0e890bb9-e18c-411e-909f-b0e4a3622258" />
      </body>
      <title>News concerning TransactionScope and Timeouts</title>
      <guid isPermaLink="false">http://www.coeamyd.net/PermaLink,guid,0e890bb9-e18c-411e-909f-b0e4a3622258.aspx</guid>
      <link>http://www.coeamyd.net/PermaLink,guid,0e890bb9-e18c-411e-909f-b0e4a3622258.aspx</link>
      <pubDate>Fri, 28 Mar 2008 11:43:27 GMT</pubDate>
      <description>&lt;p&gt;
We finally got a useful response concerning the TransactionScope Timeout problem.
Someone else had a similar issue and started a new thread in the Microsoft forums: &lt;a href="http://forums.microsoft.com/forums/ShowPost.aspx?PostID=3069149&amp;amp;SiteID=1"&gt;http://forums.microsoft.com/forums/ShowPost.aspx?PostID=3069149&amp;amp;SiteID=1&lt;/a&gt;.
The issue has been resolved, but only as of the .NET Framework 3.5. There is a new
connection string parameter named "Transaction binding". This is set to "Implicit
unbind", which by default causes the described (mis-)behavior. Instead, you must set
it to "explicit unbind", so that queries issued after the transaction times out are
still considered to be INSIDE the transaction and not in auto-commit mode. You can
read the details in the forum post.
&lt;/p&gt;
&lt;p&gt;
Alas, this only solves the problem when using the SqlClient ADO.NET provider. For
all other transactive repositories, the issue still exists.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.coeamyd.net/aggbug.ashx?id=0e890bb9-e18c-411e-909f-b0e4a3622258" /&gt;</description>
      <comments>http://www.coeamyd.net/CommentView,guid,0e890bb9-e18c-411e-909f-b0e4a3622258.aspx</comments>
      <category>.NET;ADO.NET;Development;SQL Server</category>
    </item>
    <item>
      <trackback:ping>http://www.coeamyd.net/Trackback.aspx?guid=2cb4ce53-73bf-4d15-95a1-d320e147dd2f</trackback:ping>
      <pingback:server>http://www.coeamyd.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.coeamyd.net/PermaLink,guid,2cb4ce53-73bf-4d15-95a1-d320e147dd2f.aspx</pingback:target>
      <dc:creator>Christoph Herold</dc:creator>
      <wfw:comment>http://www.coeamyd.net/CommentView,guid,2cb4ce53-73bf-4d15-95a1-d320e147dd2f.aspx</wfw:comment>
      <wfw:commentRss>http://www.coeamyd.net/SyndicationService.asmx/GetEntryCommentsRss?guid=2cb4ce53-73bf-4d15-95a1-d320e147dd2f</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
If you've ever built an ASP.NET application using a User Instance database, you may
have come across the problem, that you would have liked to access the database using
the Management Studio or similar programs, but just couldn't find the database, because
it is in the user instance and not in the database server itself.
</p>
        <p>
I'd like to issue my thanks to Mike of the Sql Server Express Weblog for publishing
how it's done. I looked for hours trying to get the database attached to the regular
server, but all that is not neccessary. You can directly connect to the user instance
by using a named pipe. The original explanation can be found here: <a href="http://blogs.msdn.com/sqlexpress/archive/2006/11/22/connecting-to-sql-express-user-instances-in-management-studio.aspx">http://blogs.msdn.com/sqlexpress/archive/2006/11/22/connecting-to-sql-express-user-instances-in-management-studio.aspx</a>.
Below are the required steps in short.
</p>
        <ul>
          <li>
Connect to the server normally.</li>
          <li>
Issue a new query:<br /><font face="Courier New">SELECT owning_principal_name, instance_pipe_name, heart_beat
FROM sys.dm_os_child_instances</font></li>
          <li>
Locate the user instance you wish to connect to and copy the instance_pipe_name column's
value.</li>
          <li>
Open a new server connection and use the copied value as the server name.</li>
        </ul>
        <p>
And presto, you can access everything as you would in the regular server.
</p>
        <p>
Note: The pipe name is generated, when the user instance is first created. After that,
it will always remain the same, so you can store it for later use. Access is only
possible, when the user instance is active (see the heart_beat column). If it is not,
you must first launch the application that uses it (i.e. the web site).
</p>
        <img width="0" height="0" src="http://www.coeamyd.net/aggbug.ashx?id=2cb4ce53-73bf-4d15-95a1-d320e147dd2f" />
      </body>
      <title>Connecting to a SqlExpress User Instance</title>
      <guid isPermaLink="false">http://www.coeamyd.net/PermaLink,guid,2cb4ce53-73bf-4d15-95a1-d320e147dd2f.aspx</guid>
      <link>http://www.coeamyd.net/PermaLink,guid,2cb4ce53-73bf-4d15-95a1-d320e147dd2f.aspx</link>
      <pubDate>Wed, 25 Apr 2007 15:41:44 GMT</pubDate>
      <description>&lt;p&gt;
If you've ever built an ASP.NET application using a User Instance database, you may
have come across the problem, that you would have liked to access the database using
the Management Studio or similar programs, but just couldn't find the database, because
it is in the user instance and not in the database server itself.
&lt;/p&gt;
&lt;p&gt;
I'd like to issue my thanks to Mike of the Sql Server Express Weblog for publishing
how it's done. I looked for hours trying to get the database attached to the regular
server, but all that is not neccessary. You can directly connect to the user instance
by using a named pipe. The original explanation can be found here: &lt;a href="http://blogs.msdn.com/sqlexpress/archive/2006/11/22/connecting-to-sql-express-user-instances-in-management-studio.aspx"&gt;http://blogs.msdn.com/sqlexpress/archive/2006/11/22/connecting-to-sql-express-user-instances-in-management-studio.aspx&lt;/a&gt;.
Below are the required steps in short.
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Connect to the server normally.&lt;/li&gt;
&lt;li&gt;
Issue a new query:&lt;br&gt;
&lt;font face="Courier New"&gt;SELECT owning_principal_name, instance_pipe_name, heart_beat
FROM sys.dm_os_child_instances&lt;/font&gt;
&lt;/li&gt;
&lt;li&gt;
Locate the user instance you wish to connect to and copy the instance_pipe_name column's
value.&lt;/li&gt;
&lt;li&gt;
Open a new server connection and use the copied value as the server name.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
And presto, you can access everything as you would in the regular server.
&lt;/p&gt;
&lt;p&gt;
Note: The pipe name is generated, when the user instance is first created. After that,
it will always remain the same, so you can store it for later use. Access is only
possible, when the user instance is active (see the heart_beat column). If it is not,
you must first launch the application that uses it (i.e. the web site).
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.coeamyd.net/aggbug.ashx?id=2cb4ce53-73bf-4d15-95a1-d320e147dd2f" /&gt;</description>
      <comments>http://www.coeamyd.net/CommentView,guid,2cb4ce53-73bf-4d15-95a1-d320e147dd2f.aspx</comments>
      <category>Development;SQL Server;Web</category>
    </item>
    <item>
      <trackback:ping>http://www.coeamyd.net/Trackback.aspx?guid=86fa0bfb-fee6-4d91-92b9-c55bcf33a968</trackback:ping>
      <pingback:server>http://www.coeamyd.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.coeamyd.net/PermaLink,guid,86fa0bfb-fee6-4d91-92b9-c55bcf33a968.aspx</pingback:target>
      <dc:creator>Christoph Herold</dc:creator>
      <wfw:comment>http://www.coeamyd.net/CommentView,guid,86fa0bfb-fee6-4d91-92b9-c55bcf33a968.aspx</wfw:comment>
      <wfw:commentRss>http://www.coeamyd.net/SyndicationService.asmx/GetEntryCommentsRss?guid=86fa0bfb-fee6-4d91-92b9-c55bcf33a968</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
While I was building an ASP.NET user control, I ran across the problem, how to serialize
a property as the inner text of the Control in the ASPX-Code. I found a nice attribute
named <code>PersistenceModeAttribute</code>, that allows you to specify, how a property
is supposed to be persisted. Setting it to <code>InnerDefaultProperty</code> or <code>EncodedInnerDefaultProperty</code> should
do the trick, I thought.
</p>
        <p>
But, as I had to find out, this is only part of what needs to be done. There are two
more Attributes, that control the parsing of a control: <code>ParseChildrenAttribute</code> and <code>PersistChildrenAttribute</code>.
When you use <code>InnerDefaultProperty</code> to persist a property, you must add <code>[ParseChildren(true,
"&lt;YourPropertyName&gt;")]</code> and <code>[PersistChildren(false)]</code> to your
control's class declaration. Otherwise things won't persist.
</p>
        <p>
It took me a while to find this solution, and I found a nice explanation of things
here: <a href="http://alvinzc.blogspot.com/2006/10/aspnet-basic-of-custom-server-control_25.html">http://alvinzc.blogspot.com/2006/10/aspnet-basic-of-custom-server-control_25.html</a>.
</p>
        <p>
Alvin did a really nice job of explaining, what the attributes do. So if you want
the details, just visit his blog.
</p>
        <img width="0" height="0" src="http://www.coeamyd.net/aggbug.ashx?id=86fa0bfb-fee6-4d91-92b9-c55bcf33a968" />
      </body>
      <title>PersistenceMode.InnerDefaultProperty</title>
      <guid isPermaLink="false">http://www.coeamyd.net/PermaLink,guid,86fa0bfb-fee6-4d91-92b9-c55bcf33a968.aspx</guid>
      <link>http://www.coeamyd.net/PermaLink,guid,86fa0bfb-fee6-4d91-92b9-c55bcf33a968.aspx</link>
      <pubDate>Thu, 21 Dec 2006 10:33:40 GMT</pubDate>
      <description>&lt;p&gt;
While I was building an ASP.NET user control, I ran across the problem, how to serialize
a property as the inner text of the Control in the ASPX-Code. I found a nice attribute
named &lt;code&gt;PersistenceModeAttribute&lt;/code&gt;, that allows you to specify, how a property
is supposed to be persisted. Setting it to &lt;code&gt;InnerDefaultProperty&lt;/code&gt; or &lt;code&gt;EncodedInnerDefaultProperty&lt;/code&gt; should
do the trick, I thought.
&lt;/p&gt;
&lt;p&gt;
But, as I had to find out, this is only part of what needs to be done. There are two
more Attributes, that control the parsing of a control: &lt;code&gt;ParseChildrenAttribute&lt;/code&gt; and &lt;code&gt;PersistChildrenAttribute&lt;/code&gt;.
When you use &lt;code&gt;InnerDefaultProperty&lt;/code&gt; to persist a property, you must add &lt;code&gt;[ParseChildren(true,
"&amp;lt;YourPropertyName&amp;gt;")]&lt;/code&gt; and &lt;code&gt;[PersistChildren(false)]&lt;/code&gt; to your
control's class declaration. Otherwise things won't persist.
&lt;/p&gt;
&lt;p&gt;
It took me a while to find this solution, and I found a nice explanation of things
here: &lt;a href="http://alvinzc.blogspot.com/2006/10/aspnet-basic-of-custom-server-control_25.html"&gt;http://alvinzc.blogspot.com/2006/10/aspnet-basic-of-custom-server-control_25.html&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
Alvin did a really nice job of explaining, what the attributes do. So if you want
the details, just visit his blog.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.coeamyd.net/aggbug.ashx?id=86fa0bfb-fee6-4d91-92b9-c55bcf33a968" /&gt;</description>
      <comments>http://www.coeamyd.net/CommentView,guid,86fa0bfb-fee6-4d91-92b9-c55bcf33a968.aspx</comments>
      <category>.NET;ASP.NET;Development;Web</category>
    </item>
    <item>
      <trackback:ping>http://www.coeamyd.net/Trackback.aspx?guid=cfd87034-5102-46ef-aac6-b7b5c014939f</trackback:ping>
      <pingback:server>http://www.coeamyd.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.coeamyd.net/PermaLink,guid,cfd87034-5102-46ef-aac6-b7b5c014939f.aspx</pingback:target>
      <dc:creator>Christoph Herold</dc:creator>
      <wfw:comment>http://www.coeamyd.net/CommentView,guid,cfd87034-5102-46ef-aac6-b7b5c014939f.aspx</wfw:comment>
      <wfw:commentRss>http://www.coeamyd.net/SyndicationService.asmx/GetEntryCommentsRss?guid=cfd87034-5102-46ef-aac6-b7b5c014939f</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
For the time being, I have built myself a helper class, that tries to fix the "timeout-bug"
when using TransactionScope. And since I'm such a nice guy, I decided to let everyone
have it ;-)
</p>
        <p>
So here goes, completely commented including a usage example:
</p>
        <pre>using System;
using System.Threading;
using System.Transactions;

namespace Succell.Framework.Utils
{
    /// &lt;summary&gt;
    /// This class is used to abort transactions when the timeout occurs.
    /// &lt;/summary&gt;
    /// &lt;remarks&gt;
    /// &lt;para&gt;This class is required, because TransactionScopes do not abort processing, when they expire. Instead
    /// all actions done after the timeout occurs are not included in the transaction, but instead carried out
    /// normally. This can lead to inconsistencies in your data, when processing large amounts.&lt;/para&gt;
    ///
    /// &lt;para&gt;This class can be used nestedly, i.e. methods called in the supplied working delegate can safely
    /// create instances of this class.&lt;/para&gt;
    /// &lt;/remarks&gt;
    /// &lt;example&gt;&lt;code&gt;
    /// try
    /// {
    ///     using (TransactionScope ts = new TransactionScope(TransactionScopeOption.Required, new TimeSpan(0, 0, 2)))
    ///     {
    ///         new TransactionHelper(ts, delegate() {
    ///                 // do transactive work here
    ///             });
    ///         ts.Complete();
    ///     }
    /// }
    /// catch (TransactionAbortedException tae)
    /// {
    ///     // handle aborted transaction
    /// }
    /// &lt;/code&gt;
    /// &lt;/example&gt;
    public sealed class TransactionHelper
    {
        /// &lt;summary&gt;
        /// A tagging object to determine, whether the thread is aborted due to a transaction timeout
        /// &lt;/summary&gt;
        private object _abortObject;

        /// &lt;summary&gt;
        /// The current thread executing the transactive work
        /// &lt;/summary&gt;
        private Thread _currentThread;

        /// &lt;summary&gt;
        /// Creates a new TransactionHelper that executes transactive statements and aborts the process
        /// if a timeout occurs.
        /// &lt;/summary&gt;
        /// &lt;param name="toExecute"&gt;The delegate to call for processing&lt;/param&gt;
        public TransactionHelper(ThreadStart toExecute)
        {
            if (null == toExecute)
                throw new ArgumentNullException("toExecute");

            // get current transaction
            Transaction tx = Transaction.Current;

            if (null == tx)
                throw new InvalidOperationException("You must create an ambient transaction before using the TransactionHelper");

            // Don't execute, if the transaction is already aborted
            if (tx.TransactionInformation.Status != TransactionStatus.Aborted)
            {
                // keep handle to current thread for aborting
                _currentThread = Thread.CurrentThread;

                // register completion handler
                tx.TransactionCompleted += new TransactionCompletedEventHandler(Current_TransactionCompleted);

                // execute transactive code
                try
                {
                    toExecute();
                }
                catch (ThreadAbortException tae)
                {
                    // was the thread aborted by our TransactionCompleted handler?
                    if (null != _abortObject &amp;&amp; tae.ExceptionState == _abortObject)
                    {
                        Thread.ResetAbort();
                    }
                }
                // unregister completion handler (required when using multiple TxHelpers in one transaction,
                // otherwise multiple ThreadAbortExceptions are thrown on timeout)
                tx.TransactionCompleted -= new TransactionCompletedEventHandler(Current_TransactionCompleted);
            }
        }

        /// &lt;summary&gt;
        /// Transaction completion event handler, that checks, whether a timeout occured
        /// and, if so, causes the registered executing thread to abort
        /// &lt;/summary&gt;
        /// &lt;param name="sender"&gt;The originating transaction&lt;/param&gt;
        /// &lt;param name="e"&gt;The event args for this event&lt;/param&gt;
        void Current_TransactionCompleted(object sender, TransactionEventArgs e)
        {
            // Is the transaction aborted (possibly due to timeout)?
            if (e.Transaction.TransactionInformation.Status == TransactionStatus.Aborted)
            {
                // Is the executing thread registered?
                if (null != _currentThread)
                {
                    // generate a new abortion tagging object
                    _abortObject = new object();

                    // abort the executing thread
                    _currentThread.Abort(_abortObject);
                }
            }
        }
    }
}</pre>
        <p>
I hope, this helps some of you. Of course, I'll be updating my blog, as soon as some
notice of how TransactionScope is supposed to be used reaches me. I know, that ThreadAbortExceptions
aren't something to use lightly, but currently I see no other way.
</p>
        <img width="0" height="0" src="http://www.coeamyd.net/aggbug.ashx?id=cfd87034-5102-46ef-aac6-b7b5c014939f" />
      </body>
      <title>TransactionHelper</title>
      <guid isPermaLink="false">http://www.coeamyd.net/PermaLink,guid,cfd87034-5102-46ef-aac6-b7b5c014939f.aspx</guid>
      <link>http://www.coeamyd.net/PermaLink,guid,cfd87034-5102-46ef-aac6-b7b5c014939f.aspx</link>
      <pubDate>Mon, 27 Nov 2006 10:28:20 GMT</pubDate>
      <description>&lt;p&gt;
For the time being, I have built myself a helper class, that tries to fix the "timeout-bug"
when using TransactionScope. And since I'm such a nice guy, I decided to let everyone
have it ;-)
&lt;/p&gt;
&lt;p&gt;
So here goes, completely commented including a usage example:
&lt;/p&gt;
&lt;pre&gt;using System;
using System.Threading;
using System.Transactions;

namespace Succell.Framework.Utils
{
    /// &amp;lt;summary&amp;gt;
    /// This class is used to abort transactions when the timeout occurs.
    /// &amp;lt;/summary&amp;gt;
    /// &amp;lt;remarks&amp;gt;
    /// &amp;lt;para&amp;gt;This class is required, because TransactionScopes do not abort processing, when they expire. Instead
    /// all actions done after the timeout occurs are not included in the transaction, but instead carried out
    /// normally. This can lead to inconsistencies in your data, when processing large amounts.&amp;lt;/para&amp;gt;
    ///
    /// &amp;lt;para&amp;gt;This class can be used nestedly, i.e. methods called in the supplied working delegate can safely
    /// create instances of this class.&amp;lt;/para&amp;gt;
    /// &amp;lt;/remarks&amp;gt;
    /// &amp;lt;example&amp;gt;&amp;lt;code&amp;gt;
    /// try
    /// {
    ///     using (TransactionScope ts = new TransactionScope(TransactionScopeOption.Required, new TimeSpan(0, 0, 2)))
    ///     {
    ///         new TransactionHelper(ts, delegate() {
    ///                 // do transactive work here
    ///             });
    ///         ts.Complete();
    ///     }
    /// }
    /// catch (TransactionAbortedException tae)
    /// {
    ///     // handle aborted transaction
    /// }
    /// &amp;lt;/code&amp;gt;
    /// &amp;lt;/example&amp;gt;
    public sealed class TransactionHelper
    {
        /// &amp;lt;summary&amp;gt;
        /// A tagging object to determine, whether the thread is aborted due to a transaction timeout
        /// &amp;lt;/summary&amp;gt;
        private object _abortObject;

        /// &amp;lt;summary&amp;gt;
        /// The current thread executing the transactive work
        /// &amp;lt;/summary&amp;gt;
        private Thread _currentThread;

        /// &amp;lt;summary&amp;gt;
        /// Creates a new TransactionHelper that executes transactive statements and aborts the process
        /// if a timeout occurs.
        /// &amp;lt;/summary&amp;gt;
        /// &amp;lt;param name="toExecute"&amp;gt;The delegate to call for processing&amp;lt;/param&amp;gt;
        public TransactionHelper(ThreadStart toExecute)
        {
            if (null == toExecute)
                throw new ArgumentNullException("toExecute");

            // get current transaction
            Transaction tx = Transaction.Current;

            if (null == tx)
                throw new InvalidOperationException("You must create an ambient transaction before using the TransactionHelper");

            // Don't execute, if the transaction is already aborted
            if (tx.TransactionInformation.Status != TransactionStatus.Aborted)
            {
                // keep handle to current thread for aborting
                _currentThread = Thread.CurrentThread;

                // register completion handler
                tx.TransactionCompleted += new TransactionCompletedEventHandler(Current_TransactionCompleted);

                // execute transactive code
                try
                {
                    toExecute();
                }
                catch (ThreadAbortException tae)
                {
                    // was the thread aborted by our TransactionCompleted handler?
                    if (null != _abortObject &amp;amp;&amp;amp; tae.ExceptionState == _abortObject)
                    {
                        Thread.ResetAbort();
                    }
                }
                // unregister completion handler (required when using multiple TxHelpers in one transaction,
                // otherwise multiple ThreadAbortExceptions are thrown on timeout)
                tx.TransactionCompleted -= new TransactionCompletedEventHandler(Current_TransactionCompleted);
            }
        }

        /// &amp;lt;summary&amp;gt;
        /// Transaction completion event handler, that checks, whether a timeout occured
        /// and, if so, causes the registered executing thread to abort
        /// &amp;lt;/summary&amp;gt;
        /// &amp;lt;param name="sender"&amp;gt;The originating transaction&amp;lt;/param&amp;gt;
        /// &amp;lt;param name="e"&amp;gt;The event args for this event&amp;lt;/param&amp;gt;
        void Current_TransactionCompleted(object sender, TransactionEventArgs e)
        {
            // Is the transaction aborted (possibly due to timeout)?
            if (e.Transaction.TransactionInformation.Status == TransactionStatus.Aborted)
            {
                // Is the executing thread registered?
                if (null != _currentThread)
                {
                    // generate a new abortion tagging object
                    _abortObject = new object();

                    // abort the executing thread
                    _currentThread.Abort(_abortObject);
                }
            }
        }
    }
}&lt;/pre&gt;
&lt;p&gt;
I hope, this helps some of you. Of course, I'll be updating my blog, as soon as some
notice of how TransactionScope is supposed to be used reaches me. I know, that ThreadAbortExceptions
aren't something to use lightly, but currently I see no other way.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.coeamyd.net/aggbug.ashx?id=cfd87034-5102-46ef-aac6-b7b5c014939f" /&gt;</description>
      <comments>http://www.coeamyd.net/CommentView,guid,cfd87034-5102-46ef-aac6-b7b5c014939f.aspx</comments>
      <category>.NET;ADO.NET;Development</category>
    </item>
    <item>
      <trackback:ping>http://www.coeamyd.net/Trackback.aspx?guid=835db6eb-f771-4f53-afd1-a3463d12393e</trackback:ping>
      <pingback:server>http://www.coeamyd.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.coeamyd.net/PermaLink,guid,835db6eb-f771-4f53-afd1-a3463d12393e.aspx</pingback:target>
      <dc:creator>Christoph Herold</dc:creator>
      <wfw:comment>http://www.coeamyd.net/CommentView,guid,835db6eb-f771-4f53-afd1-a3463d12393e.aspx</wfw:comment>
      <wfw:commentRss>http://www.coeamyd.net/SyndicationService.asmx/GetEntryCommentsRss?guid=835db6eb-f771-4f53-afd1-a3463d12393e</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">One of the biggest pains for web developers
is probably the fact, that Microsoft does not support installing multiple versions
of IE in one Windows. But there is hope: The folks at tredosoft came up with a nice
installer, that allows you to install most versions of IE. There are some small drawbacks,
but it should suffice for most tests. You can get it here: <a href="http://tredosoft.com/Multiple_IE">http://tredosoft.com/Multiple_IE</a>.<br /><br /><p></p><img width="0" height="0" src="http://www.coeamyd.net/aggbug.ashx?id=835db6eb-f771-4f53-afd1-a3463d12393e" /></body>
      <title>Installing multiple versions of IE</title>
      <guid isPermaLink="false">http://www.coeamyd.net/PermaLink,guid,835db6eb-f771-4f53-afd1-a3463d12393e.aspx</guid>
      <link>http://www.coeamyd.net/PermaLink,guid,835db6eb-f771-4f53-afd1-a3463d12393e.aspx</link>
      <pubDate>Mon, 20 Nov 2006 10:11:44 GMT</pubDate>
      <description>One of the biggest pains for web developers is probably the fact, that Microsoft does not support installing multiple versions of IE in one Windows. But there is hope: The folks at tredosoft came up with a nice installer, that allows you to install most versions of IE. There are some small drawbacks, but it should suffice for most tests. You can get it here: &lt;a href="http://tredosoft.com/Multiple_IE"&gt;http://tredosoft.com/Multiple_IE&lt;/a&gt;.&lt;br&gt;
&lt;br&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.coeamyd.net/aggbug.ashx?id=835db6eb-f771-4f53-afd1-a3463d12393e" /&gt;</description>
      <comments>http://www.coeamyd.net/CommentView,guid,835db6eb-f771-4f53-afd1-a3463d12393e.aspx</comments>
      <category>Development;Web</category>
    </item>
    <item>
      <trackback:ping>http://www.coeamyd.net/Trackback.aspx?guid=243074de-9dc5-40e0-8b66-abd939b53835</trackback:ping>
      <pingback:server>http://www.coeamyd.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.coeamyd.net/PermaLink,guid,243074de-9dc5-40e0-8b66-abd939b53835.aspx</pingback:target>
      <dc:creator>Christoph Herold</dc:creator>
      <wfw:comment>http://www.coeamyd.net/CommentView,guid,243074de-9dc5-40e0-8b66-abd939b53835.aspx</wfw:comment>
      <wfw:commentRss>http://www.coeamyd.net/SyndicationService.asmx/GetEntryCommentsRss?guid=243074de-9dc5-40e0-8b66-abd939b53835</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Someone has finally found a dirty, yet working solution to the TransactionScope problem.
You can register an event on the transaction, that fires, when the transaction finishes,
which also happens on a timeout. You can then abort the main thread, to keep further
commands from executing.
</p>
        <p>
And this is also the dirty part: ThreadAbortExceptions are a little dangerous and
can cause unexpected behavior. But for now it works for me, and as long as Microsoft
does not come up with a better solution, I'll have to use this.
</p>
        <p>
You can find more details here: <a href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=876150&amp;SiteID=1">http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=876150&amp;SiteID=1</a></p>
        <img width="0" height="0" src="http://www.coeamyd.net/aggbug.ashx?id=243074de-9dc5-40e0-8b66-abd939b53835" />
      </body>
      <title>TransactionScope, ADO.NET, and Timeouts</title>
      <guid isPermaLink="false">http://www.coeamyd.net/PermaLink,guid,243074de-9dc5-40e0-8b66-abd939b53835.aspx</guid>
      <link>http://www.coeamyd.net/PermaLink,guid,243074de-9dc5-40e0-8b66-abd939b53835.aspx</link>
      <pubDate>Sat, 18 Nov 2006 10:10:16 GMT</pubDate>
      <description>&lt;p&gt;
Someone has finally found a dirty, yet working solution to the TransactionScope problem.
You can register an event on the transaction, that fires, when the transaction finishes,
which also happens on a timeout. You can then abort the main thread, to keep further
commands from executing.
&lt;/p&gt;
&lt;p&gt;
And this is also the dirty part: ThreadAbortExceptions are a little dangerous and
can cause unexpected behavior. But for now it works for me, and as long as Microsoft
does not come up with a better solution, I'll have to use this.
&lt;/p&gt;
&lt;p&gt;
You can find more details here: &lt;a href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=876150&amp;amp;SiteID=1"&gt;http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=876150&amp;amp;SiteID=1&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.coeamyd.net/aggbug.ashx?id=243074de-9dc5-40e0-8b66-abd939b53835" /&gt;</description>
      <comments>http://www.coeamyd.net/CommentView,guid,243074de-9dc5-40e0-8b66-abd939b53835.aspx</comments>
      <category>.NET;ADO.NET;Development</category>
    </item>
    <item>
      <trackback:ping>http://www.coeamyd.net/Trackback.aspx?guid=df5d0c40-8876-45ac-abce-f05e96c9426a</trackback:ping>
      <pingback:server>http://www.coeamyd.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.coeamyd.net/PermaLink,guid,df5d0c40-8876-45ac-abce-f05e96c9426a.aspx</pingback:target>
      <dc:creator>Christoph Herold</dc:creator>
      <wfw:comment>http://www.coeamyd.net/CommentView,guid,df5d0c40-8876-45ac-abce-f05e96c9426a.aspx</wfw:comment>
      <wfw:commentRss>http://www.coeamyd.net/SyndicationService.asmx/GetEntryCommentsRss?guid=df5d0c40-8876-45ac-abce-f05e96c9426a</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Happy Halloween everyone!
</p>
        <p>
Today I'll tell you about some problems I've been having with the TransactionScope
class. Namely, I've had timeouts running out, but the application still running the
nested queries until they were finished. Amazingly, the data seemed to be in the tables,
although the TimeoutException was thrown.
</p>
        <p>
This has now happened to me in multiple applications. But today I read an article
on the System.Transactions namespace (<a href="http://msdn.microsoft.com/msdnmag/issues/06/11/DataPoints/default.aspx">http://msdn.microsoft.com/msdnmag/issues/06/11/DataPoints/default.aspx</a>).   
There the author states, that you should open the database connection INSIDE the TransactionScope.
This becomes logical, when you know that there is also a parameter you can add to
the connection string named "auto-enlist" defaulting to true, that tells ADO.NET to
look for an ambient transaction when connecting. So, if you open the database connection
and then open a TransactionScope, the database does not seem to care about the ambient
transaction.
</p>
        <p>
I haven't tried yet, if this solves my problems. But since this is quite an important
matter, I wonder why Microsoft does not point this out clearly. The TransactionScope
may be a really great invention, but if you don't know how to use it, it causes damage
instead of making things safer.
</p>
        <p>
          <b>[Update]</b>: This did not fix the problem. Instead, I built a test-app containing
both a method, which first opens the database, then the TransactionScope, and a method
doing it the other way around. Both methods have the same result. And that is VERY
disappointing: The changes to the database made during the Transaction's non-timeout-ed
period are rolled back, all changes AFTER the transaction times out are committed.
I've written a post in the MSDN-Forum concerning Transactions Programming (<a href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=876150&amp;SiteID=1">http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=876150&amp;SiteID=1</a>).
Let's see what they come up with.
</p>
        <img width="0" height="0" src="http://www.coeamyd.net/aggbug.ashx?id=df5d0c40-8876-45ac-abce-f05e96c9426a" />
      </body>
      <title>TransactionScope, ADO.NET, and Timeouts</title>
      <guid isPermaLink="false">http://www.coeamyd.net/PermaLink,guid,df5d0c40-8876-45ac-abce-f05e96c9426a.aspx</guid>
      <link>http://www.coeamyd.net/PermaLink,guid,df5d0c40-8876-45ac-abce-f05e96c9426a.aspx</link>
      <pubDate>Tue, 31 Oct 2006 09:58:24 GMT</pubDate>
      <description>&lt;p&gt;
Happy Halloween everyone!
&lt;/p&gt;
&lt;p&gt;
Today I'll tell you about some problems I've been having with the TransactionScope
class. Namely, I've had timeouts running out, but the application still running the
nested queries until they were finished. Amazingly, the data seemed to be in the tables,
although the TimeoutException was thrown.
&lt;/p&gt;
&lt;p&gt;
This has now happened to me in multiple applications. But today I read an article
on the System.Transactions namespace (&lt;a href="http://msdn.microsoft.com/msdnmag/issues/06/11/DataPoints/default.aspx"&gt;http://msdn.microsoft.com/msdnmag/issues/06/11/DataPoints/default.aspx&lt;/a&gt;).&amp;nbsp;&amp;nbsp;&amp;nbsp;
There the author states, that you should open the database connection INSIDE the TransactionScope.
This becomes logical, when you know that there is also a parameter you can add to
the connection string named "auto-enlist" defaulting to true, that tells ADO.NET to
look for an ambient transaction when connecting. So, if you open the database connection
and then open a TransactionScope, the database does not seem to care about the ambient
transaction.
&lt;/p&gt;
&lt;p&gt;
I haven't tried yet, if this solves my problems. But since this is quite an important
matter, I wonder why Microsoft does not point this out clearly. The TransactionScope
may be a really great invention, but if you don't know how to use it, it causes damage
instead of making things safer.
&lt;/p&gt;
&lt;p&gt;
&lt;b&gt;[Update]&lt;/b&gt;: This did not fix the problem. Instead, I built a test-app containing
both a method, which first opens the database, then the TransactionScope, and a method
doing it the other way around. Both methods have the same result. And that is VERY
disappointing: The changes to the database made during the Transaction's non-timeout-ed
period are rolled back, all changes AFTER the transaction times out are committed.
I've written a post in the MSDN-Forum concerning Transactions Programming (&lt;a href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=876150&amp;amp;SiteID=1"&gt;http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=876150&amp;amp;SiteID=1&lt;/a&gt;).
Let's see what they come up with.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.coeamyd.net/aggbug.ashx?id=df5d0c40-8876-45ac-abce-f05e96c9426a" /&gt;</description>
      <comments>http://www.coeamyd.net/CommentView,guid,df5d0c40-8876-45ac-abce-f05e96c9426a.aspx</comments>
      <category>.NET;Development;ADO.NET</category>
    </item>
    <item>
      <trackback:ping>http://www.coeamyd.net/Trackback.aspx?guid=7f039f87-ad00-41a6-a174-19a32ba2c139</trackback:ping>
      <pingback:server>http://www.coeamyd.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.coeamyd.net/PermaLink,guid,7f039f87-ad00-41a6-a174-19a32ba2c139.aspx</pingback:target>
      <dc:creator>Christoph Herold</dc:creator>
      <wfw:comment>http://www.coeamyd.net/CommentView,guid,7f039f87-ad00-41a6-a174-19a32ba2c139.aspx</wfw:comment>
      <wfw:commentRss>http://www.coeamyd.net/SyndicationService.asmx/GetEntryCommentsRss?guid=7f039f87-ad00-41a6-a174-19a32ba2c139</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
The Microsoft Patterns and Practices team published a Service Factory Add-On recently,
that enables the Service Factory to also create WCF services. Sorrily, just after
the release of the Add-On, the .NET Team released .NET 3.0 RC1, which is not supported
by the Add-On.
</p>
        <p>
If you still wish to install it, you can install the Orca tool located in the <code>bin/</code> directory
of the Windows Vista SDK, open the Service Factory WCF installer package, and change
the value of the <code>LaunchCondition</code> variable <code>FRAMEWORK30</code> to
the Version of RC1 (<code>3.0.04324.17</code>). Save it and then you can install it.
</p>
        <p>
You can find more information at <a href="http://www.gotdotnet.com/codegallery/messageBoard/Thread.aspx?id=6fde9247-53a8-4879-853d-500cd2d97a83&amp;mbid=fc07ebfb-4369-48e1-ab74-d6098ed220fe&amp;threadid=99894479-0335-4a1b-bf91-bf771237cdfb">http://www.gotdotnet.com/codegallery/messageBoard/Thread.aspx?id=6fde9247-53a8-4879-853d-500cd2d97a83&amp;mbid=fc07ebfb-4369-48e1-ab74-d6098ed220fe&amp;threadid=99894479-0335-4a1b-bf91-bf771237cdfb</a>.
</p>
        <img width="0" height="0" src="http://www.coeamyd.net/aggbug.ashx?id=7f039f87-ad00-41a6-a174-19a32ba2c139" />
      </body>
      <title>Service Factory with WCF</title>
      <guid isPermaLink="false">http://www.coeamyd.net/PermaLink,guid,7f039f87-ad00-41a6-a174-19a32ba2c139.aspx</guid>
      <link>http://www.coeamyd.net/PermaLink,guid,7f039f87-ad00-41a6-a174-19a32ba2c139.aspx</link>
      <pubDate>Sun, 24 Sep 2006 08:52:42 GMT</pubDate>
      <description>&lt;p&gt;
The Microsoft Patterns and Practices team published a Service Factory Add-On recently,
that enables the Service Factory to also create WCF services. Sorrily, just after
the release of the Add-On, the .NET Team released .NET 3.0 RC1, which is not supported
by the Add-On.
&lt;/p&gt;
&lt;p&gt;
If you still wish to install it, you can install the Orca tool located in the &lt;code&gt;bin/&lt;/code&gt; directory
of the Windows Vista SDK, open the Service Factory WCF installer package, and change
the value of the &lt;code&gt;LaunchCondition&lt;/code&gt; variable &lt;code&gt;FRAMEWORK30&lt;/code&gt; to
the Version of RC1 (&lt;code&gt;3.0.04324.17&lt;/code&gt;). Save it and then you can install it.
&lt;/p&gt;
&lt;p&gt;
You can find more information at &lt;a href="http://www.gotdotnet.com/codegallery/messageBoard/Thread.aspx?id=6fde9247-53a8-4879-853d-500cd2d97a83&amp;amp;mbid=fc07ebfb-4369-48e1-ab74-d6098ed220fe&amp;amp;threadid=99894479-0335-4a1b-bf91-bf771237cdfb"&gt;http://www.gotdotnet.com/codegallery/messageBoard/Thread.aspx?id=6fde9247-53a8-4879-853d-500cd2d97a83&amp;amp;mbid=fc07ebfb-4369-48e1-ab74-d6098ed220fe&amp;amp;threadid=99894479-0335-4a1b-bf91-bf771237cdfb&lt;/a&gt;.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.coeamyd.net/aggbug.ashx?id=7f039f87-ad00-41a6-a174-19a32ba2c139" /&gt;</description>
      <comments>http://www.coeamyd.net/CommentView,guid,7f039f87-ad00-41a6-a174-19a32ba2c139.aspx</comments>
      <category>.NET;Development;WCF</category>
    </item>
    <item>
      <trackback:ping>http://www.coeamyd.net/Trackback.aspx?guid=0dce2222-5323-4685-91e2-10dfa66a5b50</trackback:ping>
      <pingback:server>http://www.coeamyd.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.coeamyd.net/PermaLink,guid,0dce2222-5323-4685-91e2-10dfa66a5b50.aspx</pingback:target>
      <dc:creator>Christoph Herold</dc:creator>
      <wfw:comment>http://www.coeamyd.net/CommentView,guid,0dce2222-5323-4685-91e2-10dfa66a5b50.aspx</wfw:comment>
      <wfw:commentRss>http://www.coeamyd.net/SyndicationService.asmx/GetEntryCommentsRss?guid=0dce2222-5323-4685-91e2-10dfa66a5b50</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Today I was wondering, how you are supposed to use the ToolStripContainer when you
want to build an MDI application. I found some solutions in forums speaking about
enumerating all controls and finding the MDIClient control, bringing it to the front,
and resizing it to match the size of the content panel. But I thought, this is quite
a workaround and can't be the way Microsoft meant for things to be done.
</p>
        <p>
A quick search actually ended with the explanation of how you should do it right.
There is an article in the msdn library containing a summary of the ToolStrip technology.
And in one paragraph, they actually tell you, that there is also a ToolStripPanel
component you can use on your form. This component is not present in the toolbox,
but you can activate it.
</p>
        <p>
So then you can simply drop as many ToolStripPanels onto your form, dock them accordingly,
and leave the content area free for the MDIClient.
</p>
        <p>
For reference: <a href="http://msdn2.microsoft.com/en-us/library/a5swc13h.aspx">http://msdn2.microsoft.com/en-us/library/a5swc13h.aspx</a></p>
        <img width="0" height="0" src="http://www.coeamyd.net/aggbug.ashx?id=0dce2222-5323-4685-91e2-10dfa66a5b50" />
      </body>
      <title>ToolStripContainer and MDI</title>
      <guid isPermaLink="false">http://www.coeamyd.net/PermaLink,guid,0dce2222-5323-4685-91e2-10dfa66a5b50.aspx</guid>
      <link>http://www.coeamyd.net/PermaLink,guid,0dce2222-5323-4685-91e2-10dfa66a5b50.aspx</link>
      <pubDate>Wed, 30 Aug 2006 08:49:49 GMT</pubDate>
      <description>&lt;p&gt;
Today I was wondering, how you are supposed to use the ToolStripContainer when you
want to build an MDI application. I found some solutions in forums speaking about
enumerating all controls and finding the MDIClient control, bringing it to the front,
and resizing it to match the size of the content panel. But I thought, this is quite
a workaround and can't be the way Microsoft meant for things to be done.
&lt;/p&gt;
&lt;p&gt;
A quick search actually ended with the explanation of how you should do it right.
There is an article in the msdn library containing a summary of the ToolStrip technology.
And in one paragraph, they actually tell you, that there is also a ToolStripPanel
component you can use on your form. This component is not present in the toolbox,
but you can activate it.
&lt;/p&gt;
&lt;p&gt;
So then you can simply drop as many ToolStripPanels onto your form, dock them accordingly,
and leave the content area free for the MDIClient.
&lt;/p&gt;
&lt;p&gt;
For reference: &lt;a href="http://msdn2.microsoft.com/en-us/library/a5swc13h.aspx"&gt;http://msdn2.microsoft.com/en-us/library/a5swc13h.aspx&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.coeamyd.net/aggbug.ashx?id=0dce2222-5323-4685-91e2-10dfa66a5b50" /&gt;</description>
      <comments>http://www.coeamyd.net/CommentView,guid,0dce2222-5323-4685-91e2-10dfa66a5b50.aspx</comments>
      <category>.NET;Development;Windows Forms</category>
    </item>
    <item>
      <trackback:ping>http://www.coeamyd.net/Trackback.aspx?guid=f3af1717-cf57-401f-b250-89c210180535</trackback:ping>
      <pingback:server>http://www.coeamyd.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.coeamyd.net/PermaLink,guid,f3af1717-cf57-401f-b250-89c210180535.aspx</pingback:target>
      <dc:creator>Christoph Herold</dc:creator>
      <wfw:comment>http://www.coeamyd.net/CommentView,guid,f3af1717-cf57-401f-b250-89c210180535.aspx</wfw:comment>
      <wfw:commentRss>http://www.coeamyd.net/SyndicationService.asmx/GetEntryCommentsRss?guid=f3af1717-cf57-401f-b250-89c210180535</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">After a quick search in Google, I found
this nice page, describing a way to perform recursive queries for hierarchical data
in SQL Server 2000 and 2005. So, for everyone interested, here's the link: <a href="http://www.yafla.com/papers/sqlhierarchies/sqlhierarchies.htm">http://www.yafla.com/papers/sqlhierarchies/sqlhierarchies.htm</a><br /><br /><p></p><img width="0" height="0" src="http://www.coeamyd.net/aggbug.ashx?id=f3af1717-cf57-401f-b250-89c210180535" /></body>
      <title>Recursive queries for SQL Server</title>
      <guid isPermaLink="false">http://www.coeamyd.net/PermaLink,guid,f3af1717-cf57-401f-b250-89c210180535.aspx</guid>
      <link>http://www.coeamyd.net/PermaLink,guid,f3af1717-cf57-401f-b250-89c210180535.aspx</link>
      <pubDate>Fri, 31 Mar 2006 08:46:52 GMT</pubDate>
      <description>After a quick search in Google, I found this nice page, describing a way to perform recursive queries for hierarchical data in SQL Server 2000 and 2005. So, for everyone interested, here's the link: &lt;a href="http://www.yafla.com/papers/sqlhierarchies/sqlhierarchies.htm"&gt;http://www.yafla.com/papers/sqlhierarchies/sqlhierarchies.htm&lt;/a&gt;
&lt;br&gt;
&lt;br&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.coeamyd.net/aggbug.ashx?id=f3af1717-cf57-401f-b250-89c210180535" /&gt;</description>
      <comments>http://www.coeamyd.net/CommentView,guid,f3af1717-cf57-401f-b250-89c210180535.aspx</comments>
      <category>SQL Server;Development</category>
    </item>
    <item>
      <trackback:ping>http://www.coeamyd.net/Trackback.aspx?guid=324a07fb-2572-4331-bee5-9d535328859d</trackback:ping>
      <pingback:server>http://www.coeamyd.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.coeamyd.net/PermaLink,guid,324a07fb-2572-4331-bee5-9d535328859d.aspx</pingback:target>
      <dc:creator>Christoph Herold</dc:creator>
      <wfw:comment>http://www.coeamyd.net/CommentView,guid,324a07fb-2572-4331-bee5-9d535328859d.aspx</wfw:comment>
      <wfw:commentRss>http://www.coeamyd.net/SyndicationService.asmx/GetEntryCommentsRss?guid=324a07fb-2572-4331-bee5-9d535328859d</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Sometimes, the developers of the .NET framework seem not to have thought things through.
This is also the case with the windows.forms namespace concerning the maximizing of
windows. When you have a fixed size dialog, you will probably also disable resizing
using the SizeGripStyle property. Furthermore, you'll want to disable the maximize
button, either by setting the MaximizeBox property to false, or by hiding the titlebar
controls altogether using the ControlBox property.
</p>
        <p>
This is all well, but I've noticed, that disabling all of these things doesn't disable
maximizing of windows completely. When you double-click the titlebar of the window,
you'll still be able to maximize it, probably making the contents of the form quite
ugly. If you REALLY want to disable maximizing, you'll have to handle some window
messages.
</p>
        <p>
This is actually not that difficult. All you have to do is override the WndProc method
and search for some constants in the windows API. What you'll need here are WM_SYSCOMMAND
and SC_MAXIMIZE, both found in winuser.h. Then all there's left to do is implement
the method as follows:
</p>
        <pre>    private const int WM_SYSCOMMAND = 0x0112;<br />
    private const int SC_MAXIMIZE = 0xF030;<br /><br />
    protected override void WndProc(ref Message m)<br />
    {<br />
        if (m.Msg == WM_SYSCOMMAND)<br />
        {<br />
            if (((int)m.WParam &amp; 0xFFF0) ==
SC_MAXIMIZE)<br />
            {<br />
                if (this.WindowState
!= FormWindowState.Normal)<br />
                {<br />
                    this.WindowState
= FormWindowState.Normal;<br />
                }<br />
                m.Result = new IntPtr(0);<br />
                return;<br />
            }<br />
        }<br />
        base.WndProc(ref m);<br />
    }</pre>
        <p>
That's it! You've now got a window, that WON'T MAXIMIZE.
</p>
        <p>
If you want a window, that can ONLY be maximized or minimized (as in there's no WindowState.Normal),
you will follow the same approach. But you'll find that in an article I wrote on codeproject.com
a while ago. If you want all the details, just read them here: <a href="http://www.codeproject.com/useritems/DisableNormalWindowState.asp">http://www.codeproject.com/useritems/DisableNormalWindowState.asp</a></p>
        <img width="0" height="0" src="http://www.coeamyd.net/aggbug.ashx?id=324a07fb-2572-4331-bee5-9d535328859d" />
      </body>
      <title>Disabling Double-Click maximizing of windows</title>
      <guid isPermaLink="false">http://www.coeamyd.net/PermaLink,guid,324a07fb-2572-4331-bee5-9d535328859d.aspx</guid>
      <link>http://www.coeamyd.net/PermaLink,guid,324a07fb-2572-4331-bee5-9d535328859d.aspx</link>
      <pubDate>Thu, 30 Mar 2006 08:43:02 GMT</pubDate>
      <description>&lt;p&gt;
Sometimes, the developers of the .NET framework seem not to have thought things through.
This is also the case with the windows.forms namespace concerning the maximizing of
windows. When you have a fixed size dialog, you will probably also disable resizing
using the SizeGripStyle property. Furthermore, you'll want to disable the maximize
button, either by setting the MaximizeBox property to false, or by hiding the titlebar
controls altogether using the ControlBox property.
&lt;/p&gt;
&lt;p&gt;
This is all well, but I've noticed, that disabling all of these things doesn't disable
maximizing of windows completely. When you double-click the titlebar of the window,
you'll still be able to maximize it, probably making the contents of the form quite
ugly. If you REALLY want to disable maximizing, you'll have to handle some window
messages.
&lt;/p&gt;
&lt;p&gt;
This is actually not that difficult. All you have to do is override the WndProc method
and search for some constants in the windows API. What you'll need here are WM_SYSCOMMAND
and SC_MAXIMIZE, both found in winuser.h. Then all there's left to do is implement
the method as follows:
&lt;/p&gt;
&lt;pre&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; private const int WM_SYSCOMMAND = 0x0112;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; private const int SC_MAXIMIZE = 0xF030;&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; protected override void WndProc(ref Message m)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (m.Msg == WM_SYSCOMMAND)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; if (((int)m.WParam &amp;amp; 0xFFF0) ==
SC_MAXIMIZE)&lt;br&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; {&lt;br&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; if (this.WindowState
!= FormWindowState.Normal)&lt;br&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; this.WindowState
= FormWindowState.Normal;&lt;br&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; }&lt;br&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; m.Result = new IntPtr(0);&lt;br&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; return;&lt;br&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; }&lt;br&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; }&lt;br&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; base.WndProc(ref m);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/pre&gt;
&lt;p&gt;
That's it! You've now got a window, that WON'T MAXIMIZE.
&lt;/p&gt;
&lt;p&gt;
If you want a window, that can ONLY be maximized or minimized (as in there's no WindowState.Normal),
you will follow the same approach. But you'll find that in an article I wrote on codeproject.com
a while ago. If you want all the details, just read them here: &lt;a href="http://www.codeproject.com/useritems/DisableNormalWindowState.asp"&gt;http://www.codeproject.com/useritems/DisableNormalWindowState.asp&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.coeamyd.net/aggbug.ashx?id=324a07fb-2572-4331-bee5-9d535328859d" /&gt;</description>
      <comments>http://www.coeamyd.net/CommentView,guid,324a07fb-2572-4331-bee5-9d535328859d.aspx</comments>
      <category>.NET;Development;Windows Forms</category>
    </item>
    <item>
      <trackback:ping>http://www.coeamyd.net/Trackback.aspx?guid=7e5a84c4-e6ff-46e9-ba75-4e01a5b42ebe</trackback:ping>
      <pingback:server>http://www.coeamyd.net/pingback.aspx</pingback:server>
      <pingback:target>http://www.coeamyd.net/PermaLink,guid,7e5a84c4-e6ff-46e9-ba75-4e01a5b42ebe.aspx</pingback:target>
      <dc:creator>Christoph Herold</dc:creator>
      <wfw:comment>http://www.coeamyd.net/CommentView,guid,7e5a84c4-e6ff-46e9-ba75-4e01a5b42ebe.aspx</wfw:comment>
      <wfw:commentRss>http://www.coeamyd.net/SyndicationService.asmx/GetEntryCommentsRss?guid=7e5a84c4-e6ff-46e9-ba75-4e01a5b42ebe</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
When using ASP.NET membership, you should always be sure to specify the applicationName
attribute on all providers. If you omit it, and deploy your database to the web server,
you will find, that all your users have vanished (or at least cannot be found). So
make sure your web.config looks similar to this:
</p>
        <pre>&lt;membership&gt;<br />
    &lt;providers&gt;<br />
        &lt;remove name="AspNetSqlMembershipProvider"
/&gt;<br />
        &lt;add name="AspNetSqlMembershipProvider"
applicationName="/" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="LocalSqlServer"
/&gt;<br />
    &lt;/providers&gt;<br />
&lt;/membership&gt;</pre>
        <p>
After setting the application name, you can start adding users. If you added users
before specifying it, they will probably no longer be available.
</p>
        <img width="0" height="0" src="http://www.coeamyd.net/aggbug.ashx?id=7e5a84c4-e6ff-46e9-ba75-4e01a5b42ebe" />
      </body>
      <title>On using SQL Express membership providers</title>
      <guid isPermaLink="false">http://www.coeamyd.net/PermaLink,guid,7e5a84c4-e6ff-46e9-ba75-4e01a5b42ebe.aspx</guid>
      <link>http://www.coeamyd.net/PermaLink,guid,7e5a84c4-e6ff-46e9-ba75-4e01a5b42ebe.aspx</link>
      <pubDate>Mon, 27 Mar 2006 08:35:22 GMT</pubDate>
      <description>&lt;p&gt;
When using ASP.NET membership, you should always be sure to specify the applicationName
attribute on all providers. If you omit it, and deploy your database to the web server,
you will find, that all your users have vanished (or at least cannot be found). So
make sure your web.config looks similar to this:
&lt;/p&gt;
&lt;pre&gt;&amp;lt;membership&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;providers&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;remove name="AspNetSqlMembershipProvider"
/&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;add name="AspNetSqlMembershipProvider"
applicationName="/" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="LocalSqlServer"
/&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/providers&amp;gt;&lt;br&gt;
&amp;lt;/membership&amp;gt;&lt;/pre&gt;
&lt;p&gt;
After setting the application name, you can start adding users. If you added users
before specifying it, they will probably no longer be available.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.coeamyd.net/aggbug.ashx?id=7e5a84c4-e6ff-46e9-ba75-4e01a5b42ebe" /&gt;</description>
      <comments>http://www.coeamyd.net/CommentView,guid,7e5a84c4-e6ff-46e9-ba75-4e01a5b42ebe.aspx</comments>
      <category>.NET;ASP.NET;Development;Web</category>
    </item>
  </channel>
</rss>