News

Monday, May 14, 2007

How To: Connect to SQL Server Using Windows Authentication in ASP.NET 2.0

This How To shows you how to connect to SQL Server 2000 using a Windows service account from an ASP.NET version 2.0 application. You should use Windows authentication instead of SQL authentication whenever possible because you avoid storing credentials in connection strings and you avoid passing passwords over the network to your database server. You should consider encrypting your connection string to protect server connection details, such as the database server and name. By default, ASP.NET does not impersonate the caller to the database. On Windows Server 2003, you can use the network service account, which has network credentials (machine$), or you can configure an application pool identity. If you configure impersonation to use the original caller, you need to evaluate the scalability of per-user connection pools.

View SQL Link

No comments: