Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sql Connection Error
Message
 
To
10/11/2004 11:12:17
Alvin Lourdes
Children and Youth Services Cluster
Toronto, Ontario, Canada
General information
Forum:
ASP.NET
Category:
Databases
Environment versions
Environment:
ASP.NET
OS:
Windows 2000
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
00960022
Message ID:
00960137
Views:
8
This message has been marked as the solution to the initial question of the thread.
>Have you encountered this problem when trying to connect to SQL Server 2000 with .NET?
>Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
>Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
>
>Exception Details: System.Data.SqlClient.SqlException: Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
>
>Source Error:
>An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
>
>
>
>
>Not sure why this keeps happening... Anyone have any ideas.?

Alvin;

I ran into this problem as an anonymous user. A different approach to security may require a different approach.
ASP NET Login Issues for anonymous users

Problem:

Error message – Login failed for user ‘NT AUTHORITY\ANONYMOUS LOGON’.

Reason:

IIS not set correctly

Resolution:

1.	Open IIS
2.	Go to Default Web Site
3.	Right Click on Web Project of interest
4.	Select Properties
5.	Select Directory Security
6.	Go to “Anonymous access and authentication control”
7.	Select “Edit”
8.	Uncheck “Anonymous access”
9.	Select OK
10.	Select Apply
11.	Select OK

Problem:

Error message – Login failed for user ‘(null)’. Reason”: Not associated with a trusted SQL Server connection.

Reason:

IIS and/or Web.config may not be set correctly

Resolution:

See above to set IIS.

In the Web.config file add the following line after the <system.web> tag and before the </system.web> end tag

<identity impersonate = "true"/>
Tom
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform