I'm very new to ASP.NET (but not to programming) and I'm having some trouble with connecting to a database.
I am using C#.NET and I dragged the SqlConnection component onto the form, set the connection string to (local) and to use integrated security, and on that data link properties page I can press the test connection and it works fine, and I can see the databases in "select database on server" drop down box... but when I try and Open() the connection I get a
Exception Details: System.Data.SqlClient.SqlException: Login failed for user 'AMD2500\ASPNET'.
Can anyone help me?
Thanks,
RobboIf you want your web app to impersonate the user, you need to have the following two sections in web.config:
<configuration>
<system.web>
<identity impersonate="true"/>
<authentication mode="Windows" />
</system.web>
</configuration>
No comments:
Post a Comment