LOGIN ERROR when Running Web Project:
If you get the following error when trying to run your web project:
“Login failed for user 'BLAB122\ASPNET'. ß(where BLAB122 is specific to your machine name)
Exception Details: System.Data.SqlClient.SqlException: Login failed for user 'BLAB122\ASPNET'.
Then you need to ensure that you add the following line:
<identity impersonate="true" />
In
the webconfig file of your project below the line
<authentication mode="Windows" />
You
must also ensure that you have properly setup the Security setting under the
Virtual Directory of your project in IIS.
Go
to the properties of your specific project and under Directory Security tab,
Click Edit under Anonymous Access, and then uncheck the top box that says
“Anonymous Access.”
For further information see pg.294 “Database Security for Web Applications” of the Advanced Programming Using Visual Basic.Net by Bradley and Millspaugh (1st Edition).