<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://weblogs.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Alex Chang's WebLog</title><link>http://weblogs.asp.net/achang/default.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Debug Build: 20510.895)</generator><item><title>FREE XDN Professional for .NET Bloggers during May 2004</title><link>http://weblogs.asp.net/achang/archive/2004/05/29/144339.aspx</link><pubDate>Sat, 29 May 2004 08:59:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:144339</guid><dc:creator>AChang</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/achang/rsscomments.aspx?PostID=144339</wfw:commentRss><comments>http://weblogs.asp.net/achang/archive/2004/05/29/144339.aspx#comments</comments><description>&lt;STRONG&gt;&lt;FONT color=#000080&gt;FREE &lt;/FONT&gt;&lt;/STRONG&gt;&lt;A href="http://blogs.xtras.net/mikes/ct.ashx?id=2650d93d-0994-4f74-ae52-900173d03ebd&amp;amp;url=http%3a%2f%2fwww.xtras.net%2fxdn" ?&gt;&lt;STRONG&gt;&lt;FONT color=#000080&gt;XDN&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/A&gt;&lt;FONT color=#000080&gt;&lt;STRONG&gt; Professional for .NET Bloggers during May 2004&lt;BR&gt;&lt;/STRONG&gt;&lt;EM&gt;&lt;A href="http://blogs.xtras.net/mikes/"&gt;Mike Schinkel&lt;/A&gt;, president of &lt;A href="http://blogs.xtras.net/mikes/ct.ashx?id=2650d93d-0994-4f74-ae52-900173d03ebd&amp;amp;url=http%3a%2f%2fwww.xtras.net%2f" ?&gt;Xtras.Net&lt;/A&gt;, made &lt;A href="http://blogs.xtras.net/mikes/PermaLink,guid,2650d93d-0994-4f74-ae52-900173d03ebd.aspx"&gt;an offer&lt;/A&gt; on his &lt;A href="http://blogs.xtras.net/mikes/"&gt;personal blog&lt;/A&gt; of a free &lt;A href="http://blogs.xtras.net/mikes/ct.ashx?id=2650d93d-0994-4f74-ae52-900173d03ebd&amp;amp;url=http%3a%2f%2fwww.xtras.net%2fxdn" ?&gt;XDN&lt;/A&gt; Professional membership (&lt;/EM&gt;&lt;/FONT&gt;&lt;A href="http://blogs.xtras.net/mikes/ct.ashx?id=2650d93d-0994-4f74-ae52-900173d03ebd&amp;amp;url=http%3a%2f%2fwww.xtras.net%2fxdn" ?&gt;&lt;EM&gt;&lt;FONT color=#000080&gt;http://www.xtras.net/xdn&lt;/FONT&gt;&lt;/EM&gt;&lt;/A&gt;&lt;EM&gt;&lt;FONT color=#000080&gt;) during the month of May 2004 for anyone that blogs about .NET frequently. If you are a .NET blogger, see &lt;/FONT&gt;&lt;A href="http://blogs.xtras.net/mikes/PermaLink,guid,2650d93d-0994-4f74-ae52-900173d03ebd.aspx"&gt;&lt;FONT color=#000080&gt;Mike's post&lt;/FONT&gt;&lt;/A&gt;&lt;FONT color=#000080&gt; for how to get your free &lt;/FONT&gt;&lt;A href="http://blogs.xtras.net/mikes/ct.ashx?id=2650d93d-0994-4f74-ae52-900173d03ebd&amp;amp;url=http%3a%2f%2fwww.xtras.net%2fxdn" ?&gt;&lt;FONT color=#000080&gt;XDN&lt;/FONT&gt;&lt;/A&gt;&lt;FONT color=#000080&gt; membership.&lt;/FONT&gt;&lt;/EM&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=144339" width="1" height="1"&gt;</description></item><item><title>A fix for when Visual Studio .NET is slow in starting up/opening</title><link>http://weblogs.asp.net/achang/archive/2004/05/04/125645.aspx</link><pubDate>Tue, 04 May 2004 13:18:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:125645</guid><dc:creator>AChang</dc:creator><slash:comments>8</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/achang/rsscomments.aspx?PostID=125645</wfw:commentRss><comments>http://weblogs.asp.net/achang/archive/2004/05/04/125645.aspx#comments</comments><description>&lt;P&gt;&lt;FONT face=Arial color=#000080 size=2&gt;One of our developers had been suffering from extremely slow load/start-up time with the Visual Studio .NET 2003 on his developement machine (it took more than 1 minute to get through the splash screen). He tried uninstalling and re-installing VS.NET, but the problem still persisted. So today, I set out to find a solution. After about an hour of googling and searching on the web, forums, blogs, and newsgroups (it seems that there aren't that many mentionings of this issue out there), I finally came across a posting that lead us to the fix: &lt;BR&gt;&lt;/FONT&gt;&lt;A href="http://dotnetjunkies.com/Newsgroups/microsoft.public.vsnet.ide/2004/3/29/97325.aspx"&gt;&lt;FONT face=Arial color=#000080 size=2&gt;http://dotnetjunkies.com/Newsgroups/microsoft.public.vsnet.ide/2004/3/29/97325.aspx&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial color=#000080 size=2&gt;What caught my eye was that, as mentioned in this newsgroup posting, we also noticed that the slow start-up problem only occurred when the developer's workstation was connected to the network. Visual Studio.NET would load without delay when we disconnected the network cable from his machine. The newsgroup posting pointed out that this is an issue with the MRU list (Most Recently Used list). We think that our developer may have tried to access/open a solution or a project across the network some time in the past. So Visual Studio.NET must've cached the file references in its Most Recently Used list. So everytime the Visual Studio.NET launched, it may have been trying to find those files on the network (which may no longer have existed). The recommended fix was to set the number of the display items in most recently used list to 1 (1 is the minimum number, default is 4 I believe) from the Tools-&amp;gt;Option menu to clear the MRU list.&amp;nbsp; However, after setting the MRU list to only display one item, the problem still remained! After further searching on "Visual Studio .NET MRU list", I found one of the &lt;A href="http://www.gotdotnet.com/team/ide/"&gt;Developer PowerToys&lt;/A&gt; (&lt;/FONT&gt;&lt;A href="http://www.gotdotnet.com/team/ide/"&gt;&lt;FONT face=Arial color=#000080 size=2&gt;http://www.gotdotnet.com/team/ide/&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Arial color=#000080 size=2&gt;) called &lt;A href="http://www.gotdotnet.com/community/workspaces/viewuploads.aspx?id=b9330ea5-096d-45b7-8a5b-17450d7a0d5a"&gt;VSTweak&lt;/A&gt;&lt;/FONT&gt;&lt;FONT face=Arial color=#000080 size=2&gt;.&amp;nbsp; This nifty tool has a MRU Lists Manager that allows you to clear recent files and projects.&amp;nbsp; After clearing out the MRU lists, the Visual Studio .NET launched in a heartbeat without any delay.&amp;nbsp; Woo hoo!&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial color=#000080 size=2&gt;Hope this is of help for some developers out there.&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=125645" width="1" height="1"&gt;</description></item><item><title>nTierGen</title><link>http://weblogs.asp.net/achang/archive/2004/04/25/119974.aspx</link><pubDate>Sun, 25 Apr 2004 23:53:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:119974</guid><dc:creator>AChang</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/achang/rsscomments.aspx?PostID=119974</wfw:commentRss><comments>http://weblogs.asp.net/achang/archive/2004/04/25/119974.aspx#comments</comments><description>&lt;P&gt;&lt;FONT face=Arial color=#000080 size=2&gt;Thanks to Gavin Joyce, I also received my free copy of nTierGen.&amp;nbsp; If you are a weblogs.asp.net blogger, take a look at: &lt;A href="http://weblogs.asp.net/gavinjoyce/archive/2004/04/21/117477.aspx"&gt;http://weblogs.asp.net/gavinjoyce/archive/2004/04/21/117477.aspx&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=119974" width="1" height="1"&gt;</description></item><item><title>How to use Trusted Connection when SQL server and web Server are on two separate machines.</title><link>http://weblogs.asp.net/achang/archive/2004/04/15/113866.aspx</link><pubDate>Thu, 15 Apr 2004 15:05:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:113866</guid><dc:creator>AChang</dc:creator><slash:comments>18</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/achang/rsscomments.aspx?PostID=113866</wfw:commentRss><comments>http://weblogs.asp.net/achang/archive/2004/04/15/113866.aspx#comments</comments><description>&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"&gt;Recently, in our&amp;nbsp;consideration to make&amp;nbsp;the production server environment more secure, one of the things we looked&amp;nbsp;into was&amp;nbsp;securing the database connection information between the web server and SQL server.&amp;nbsp; I received much help from attending DevDays 2004 and also from doing some research on the Internet on this matter.&amp;nbsp; There are&amp;nbsp;some options when it comes to securing the connection&amp;nbsp;string between&amp;nbsp;a database server and a web server.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;I'll just list a few here:&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 39pt; TEXT-INDENT: -21pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level1 lfo2; tab-stops: list 39.0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial; mso-fareast-font-family: Arial; mso-bidi-font-size: 12.0pt"&gt;&lt;SPAN style="mso-list: Ignore"&gt;1&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"&gt;Use a&amp;nbsp;trusted connection with integrated authentication.&lt;/SPAN&gt;&lt;SPAN style="COLOR: navy"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 39pt; TEXT-INDENT: -21pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level1 lfo2; tab-stops: list .5in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial; mso-fareast-font-family: Arial; mso-bidi-font-size: 12.0pt"&gt;&lt;SPAN style="mso-list: Ignore"&gt;2&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;Use the&amp;nbsp;Aspnet_setreg.exe utility to encrypt the connection string&amp;nbsp;and store it in the registry.&amp;nbsp; You can refer to these two articles for detailed instructions on how to do this:&amp;nbsp; &lt;A href="http://support.microsoft.com/default.aspx?scid=kb;EN-US;329290"&gt;http://support.microsoft.com/default.aspx?scid=kb;EN-US;329290&lt;/A&gt;&amp;nbsp;and &lt;A href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/SecNetHT11.asp"&gt;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/SecNetHT11.asp&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: navy"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 39pt; TEXT-INDENT: -21pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level1 lfo2; tab-stops: list .5in 39.0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial; mso-fareast-font-family: Arial; mso-bidi-font-size: 12.0pt"&gt;&lt;SPAN style="mso-list: Ignore"&gt;3&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;Using DPAPI (Data Protection application programming interface) to secure the connection string.&amp;nbsp; You can refer to these articles: &lt;A href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/SecNetHT08.asp"&gt;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/SecNetHT08.asp&lt;/A&gt;&amp;nbsp;and &lt;A href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsecure/html/windataprotection-dpapi.asp"&gt;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsecure/html/windataprotection-dpapi.asp&lt;/A&gt;&amp;nbsp;and &lt;A href="http://www.codeproject.com/system/protected_data.asp"&gt;http://www.codeproject.com/system/protected_data.asp&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="COLOR: navy"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"&gt;In this blog, I'll focus more on option 1 - using a trusted connection.&amp;nbsp; You see, it's very straightforward&amp;nbsp;to configure&amp;nbsp;a trusted connection when the SQL server and web server are on the same machine.&amp;nbsp; For Windows 2000 Server or XP Pro machines, you just need to make sure the local &amp;#8220;ASPNET&amp;#8221; account (under which ASP.NET application runs) has appropriate access to the database that your application will be using.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;For Windows Server 2003, you need to make sure that the &amp;#8220;Network Services&amp;#8221; account (or &amp;#8220;IIS_WPG&amp;#8221; group &amp;#8211; of which the &amp;#8220;Network Services&amp;#8221; is a member) has the appropriate access to the database.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;You can follow a step-by-step procedure to configure this here: &lt;A href="http://www.asp.net/faq/AspNetAndIIS6.aspx#4"&gt;http://www.asp.net/faq/AspNetAndIIS6.aspx#4&lt;/A&gt; (under the section titled &amp;#8220;Supporting integrated authentication with SQL Server&amp;#8221;).&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"&gt;The problem arises, however, when the database server and the web server are on two separate machines (assuming they are on the same network).&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;The issue lies in the fact that the local accounts/credentials (&amp;#8220;ASPNET&amp;#8221; in Windows 2000 Server and Windows XP Pro., &amp;#8220;Network Services&amp;#8221; in Windows Server 2003) under which ASP.NET worker process runs are local accounts (local to the web server).&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Therefore the database server on a separate machine will not be able to see/recognize these accounts.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;So if you try using the same steps mentioned above to configure a trusted connection between the web server and the SQL server, you will most likely see an error message such as &amp;#8220;Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.&amp;#8221; , when you try to launch your ASP.NET application.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"&gt;One solution is to set up a domain account with minimal access (the same level of access as the local &amp;#8220;ASPNET&amp;#8221; or &amp;#8220;Network Services&amp;#8221; account on the web server) and grant this account the appropriate access to the database on the SQL server&amp;nbsp;that your web application will be accessing.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Then, you can use impersonation to make your ASP.NET application run under the domain account that you just created.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;(Does anyone know of a way to set up the trusted connection without impersonation?&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;I would very much like to know how we can avoid using impersonation and any overhead associated with it.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Some postings mentioned making the local accounts &amp;#8220;ASPNET&amp;#8221; or &amp;#8220;Network Services&amp;#8221; on both servers to have the same password, but I don&amp;#8217;t think this is a good solution).&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Here are some tips/steps on using impersonation for trusted connection with a domain account:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level1 lfo1; tab-stops: list .5in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial; mso-fareast-font-family: Arial"&gt;&lt;SPAN style="mso-list: Ignore"&gt;1&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"&gt;When creating the domain account, make sure it has the proper level of access to run ASP.NET applications.&amp;nbsp; You can refer to &lt;A href="http://www.microsoft.com/resources/documentation/WindowsServ/2003/enterprise/proddocs/en-us/aaconaspnetrequiredaccesscontrollistsacls.asp?frame=true"&gt;this page&lt;/A&gt;&amp;nbsp;for a list of directories and the permissions that this domain account must have to them.&amp;nbsp;&amp;nbsp;For security purposes, don't give this&amp;nbsp;domain account any more permission than&amp;nbsp;you have to.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level1 lfo1; tab-stops: list .5in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial; mso-fareast-font-family: Arial"&gt;&lt;SPAN style="mso-list: Ignore"&gt;2&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"&gt;Assign the domain account the necessary permission to the database (you can still follow the instructions at &lt;A href="http://www.asp.net/faq/AspNetAndIIS6.aspx#4"&gt;http://www.asp.net/faq/AspNetAndIIS6.aspx#4&lt;/A&gt;.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Just make sure you choose the domain account that you just created).&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level1 lfo1; tab-stops: list .5in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial; mso-fareast-font-family: Arial"&gt;&lt;SPAN style="mso-list: Ignore"&gt;3&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"&gt;In order to turn on impersonation, there are two options: &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 1in; TEXT-INDENT: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level2 lfo1; tab-stops: list 1.0in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial; mso-fareast-font-family: Arial"&gt;&lt;SPAN style="mso-list: Ignore"&gt;a.&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"&gt;In the web.config file of your application, add the following line: &amp;lt;identity impersonate="true" userName="domain\user" password="password" /&amp;gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;(put it somewhere between the &amp;lt;system.web&amp;gt;&amp;lt;/system.web&amp;gt; tags)&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;However this really defeats the purpose of using the trusted connection to avoid having to include the credential and the password in the connection string.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;If you use this method, you will still need to encrypt the credential and the password in order to keep this information safe.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 1in; TEXT-INDENT: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level2 lfo1; tab-stops: list 1.0in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial; mso-fareast-font-family: Arial"&gt;&lt;SPAN style="mso-list: Ignore"&gt;b.&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"&gt;(This is the better method in my opinion)&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;In the web.config file, add the following: &amp;lt;identity impersonate="true" /&amp;gt; (this time without the user name and password).&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Then, from IIS Manager, right click on the virtual directory assigned to your application and select &amp;#8220;Properties&amp;#8221;.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Click on the &amp;#8220;Directory Security&amp;#8221; tab, then under &amp;#8220;Anonymous access and authentication control&amp;#8221; click &amp;#8220;Edit&amp;#8221;.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;If you are going to allow anonymous access to the application (not requiring users to login with windows authentication each time they access this web application), make sure &amp;#8220;Anonymous access&amp;#8221; checkbox IS checked.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Then uncheck &amp;#8220;Allow IIS to control password&amp;#8221;.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;In the &amp;#8220;User Name&amp;#8221; field, type in (or you can browse to) the domain account (domain\user) and type in the password for the domain account in the &amp;#8220;Password&amp;#8221; field (By default IIS uses IUSR_machinename for the anonymous account, you can refer to &lt;A href="http://www.microsoft.com/technet/community/columns/insider/iisi0102.mspx#XSLTsection124121120120"&gt;this page&lt;/A&gt; if you would like to find its default password in case you want to change it back later for some reason) .&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Then under &amp;#8220;Authenticated Access&amp;#8221;, make sure NONE of the boxes are checked.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Press &amp;#8220;OK&amp;#8221; and &amp;#8220;OK&amp;#8221; to save the settings and exit IIS.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level1 lfo1; tab-stops: list .5in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial; mso-fareast-font-family: Arial"&gt;&lt;SPAN style="mso-list: Ignore"&gt;4&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"&gt;Then in web.config you can use either one of these connection strings:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 1in; TEXT-INDENT: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level2 lfo1; tab-stops: list 1.0in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial; mso-fareast-font-family: Arial"&gt;&lt;SPAN style="mso-list: Ignore"&gt;a.&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"&gt;"data source=yourservername;initial catalog=databasename;Integrated Security=SSPI"&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt 1in; TEXT-INDENT: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level2 lfo1; tab-stops: list 1.0in"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial; mso-fareast-font-family: Arial"&gt;&lt;SPAN style="mso-list: Ignore"&gt;b.&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"&gt;"server=yourservername; database=databasename;Trusted_Connection=true"&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"&gt;Hopefully, by using the tips and steps above, you should be able to get the trusted connection to work between the SQL server and the web server.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"&gt;I hope this long-winded blog will be helpful to some.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;I don&amp;#8217;t claim to be an expert in this, so as I mentioned earlier, if anyone has a better solution for configuring the trusted connection, I am all ears.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;I really would like to know if there is anyway to use trusted connection without impersonation.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"&gt;Here are also some good references/discussions related to this topic:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"&gt;&lt;A href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbtskaccessingsqlserverusingmappedwindowsdomainuser.asp"&gt;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbtskaccessingsqlserverusingmappedwindowsdomainuser.asp&lt;/A&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"&gt;&lt;A href="http://weblogs.asp.net/cschittko/archive/2004/03/05/85035.aspx"&gt;http://weblogs.asp.net/cschittko/archive/2004/03/05/85035.aspx&lt;/A&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"&gt;&lt;A href="http://support.microsoft.com/default.aspx?kbid=316989"&gt;http://support.microsoft.com/default.aspx?kbid=316989&lt;/A&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"&gt;&lt;A href="http://dotnetjunkies.com/Newsgroups/microsoft.public.dotnet.framework.aspnet.security/2004/3/22/75451.aspx"&gt;http://dotnetjunkies.com/Newsgroups/microsoft.public.dotnet.framework.aspnet.security/2004/3/22/75451.aspx&lt;/A&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"&gt;&lt;A href="http://dotnetjunkies.com/Newsgroups/microsoft.public.dotnet.framework.aspnet.security/2004/3/22/74067.aspx"&gt;http://dotnetjunkies.com/Newsgroups/microsoft.public.dotnet.framework.aspnet.security/2004/3/22/74067.aspx&lt;/A&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"&gt;&lt;A href="http://www.winnetmag.com/Article/ArticleID/9002/9002.html"&gt;http://www.winnetmag.com/Article/ArticleID/9002/9002.html&lt;/A&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"&gt;&lt;A href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/SecNetAP05.asp"&gt;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/SecNetAP05.asp&lt;/A&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"&gt;&lt;A href="http://www.kamath.com/tutorials/tut002_iisanon.asp"&gt;http://www.kamath.com/tutorials/tut002_iisanon.asp&lt;/A&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"&gt;&lt;A href="http://www.microsoft.com/technet/community/columns/insider/iisi0102.mspx#XSLTsection124121120120"&gt;http://www.microsoft.com/technet/community/columns/insider/iisi0102.mspx#XSLTsection124121120120&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"&gt;&lt;STRONG&gt;&lt;FONT color=#ff0000&gt;Update:&lt;/FONT&gt;&lt;/STRONG&gt; Frans Bouma &lt;A href="http://weblogs.asp.net/achang/archive/2004/04/15/113866.aspx#113915"&gt;mentioned&lt;/A&gt; that running web server on a domain may not be according to Microsoft's best practice for security.&amp;nbsp; Could someone confirm this?&amp;nbsp; Is there a better way then to configure a trusted connection when IIS and SQL server are on separate machines without the use of impersonation?&lt;/SPAN&gt;&lt;/P&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=113866" width="1" height="1"&gt;</description></item></channel></rss>