Wednesday, June 08, 2005

Login failed for user 'sa'. Reason: Not associated with a trusted SQL Server connection.

Another MSSQL/IIS connection problem. Here's the solution to the problem that i've faced.

Login failed for user 'sa'. 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 'sa'. Reason: Not associated with a trusted SQL Server connection.

Source Error(Example):

The source where the error occured


CrispAds Blog Advertising
Stack Trace:


[SqlException: Login failed for user 'sa'. Reason:
Not associated with a trusted SQL Server connection.]
System.Data.SqlClient.ConnectionPool.GetConnection
(Boolean& isInTransaction) +472
System.Data.SqlClient.SqlConnectionPoolManager.
GetPooledConnection
(SqlConnectionString options, Boolean& isInTransaction) +372
System.Data.SqlClient.SqlConnection.Open() +384
ASP.WebForm1_aspx.Page_Load(Object Sender, EventArgs E)
in Location.of.form:13
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +750

Server Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET Version:1.1.4322.2032
CrispAds Blog Advertising

Solution: Add this statement: "Integrated Security=SSPI;" after Initial Catalog

Problem Solved!
*I found out this problem was faced by lotsa people, here i include the solution for those that need it.

Your Ad Here