Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sql Connection Error
Message
 
À
10/11/2004 11:12:17
Alvin Lourdes
Children and Youth Services Cluster
Toronto, Ontario, Canada
Information générale
Forum:
ASP.NET
Catégorie:
Bases de données
Versions des environnements
Environment:
ASP.NET
OS:
Windows 2000
Network:
Windows 2000 Server
Database:
MS SQL Server
Divers
Thread ID:
00960022
Message ID:
00960137
Vues:
9
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform