468,290 Members | 1,998 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,290 developers. It's quick & easy.

Error: Not associated with a trusted SQL Server connection

123 100+
I'm having an issue with viewing my ASP/SQL application in Internet Explorer. I get the error from my Server (located on my PC using IIS 5.0) stating:

Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
I am connected to the database because I can view it in VS 05 and run test queries on it in VS.

This is the stack I get:
Expand|Select|Wrap|Line Numbers
  1. [SqlException (0x80131904): Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.]
  2.    System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +734931
  3.    System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +188
  4.    System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1838
  5.    System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +33
  6.    System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +628
  7.    System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +170
  8.    System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +359
  9.    System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28
  10.    System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +424
  11.    System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66
  12.    System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +496
  13.    System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +82
  14.    System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105
  15.    System.Data.SqlClient.SqlConnection.Open() +111
  16.    System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +121
  17.    System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +137
  18.    System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +83
  19.    System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +1770
  20.    System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +17
  21.    System.Web.UI.WebControls.DataBoundControl.PerformSelect() +149
  22.    System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70
  23.    System.Web.UI.WebControls.GridView.DataBind() +4
  24.    System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82
  25.    System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +69
  26.    System.Web.UI.Control.EnsureChildControls() +87
  27.    System.Web.UI.Control.PreRenderRecursiveInternal() +41
  28.    System.Web.UI.Control.PreRenderRecursiveInternal() +161
  29.    System.Web.UI.Control.PreRenderRecursiveInternal() +161
  30.    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1360
  31.  
Thank you for any help that can be provided.
Jun 7 '07 #1
3 4514
kestrel
1,071 Expert 1GB
I'm moving this to the SQL Server / MSSQL Forum, please do not post in the Articles Section
Jun 7 '07 #2
Newbie19
123 100+
Problem solved, thanks again everyone.
Jun 18 '07 #3
ArtZ
1
I understand this problem is solved for the given user but for the sake of others searching for the solution here are some of the causes:

There are many posts where people say to used mixed mode security (SQL Security and Windows Authentication) in SQL Server. This might be the solution in some cases.

If you are using Windows 2003 Server on either side of the linked server connection you MUST enable DTC access which by default is disabled (not installed) for pass through authentication to work.

1. Click Start, point to Control Panel, and then click Add or Remove Programs.
2. Click Add/Remove Windows Components.
3. Select Application Server, and then click Details.
4. Select Enable network DTC access, and then click OK.
5. Click Next.
6. Click Finish.
7. Stop and then restart the Distributed Transaction Coordinator service.
8. Stop and then restart any resource manager services that participates in the distributed transaction (such as Microsoft SQL Server).
Jun 19 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

5 posts views Thread by Dave | last post: by
1 post views Thread by fl | last post: by
2 posts views Thread by news.microsoft.com | last post: by
6 posts views Thread by Chris Love | last post: by
2 posts views Thread by MrBee | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.