473,503 Members | 1,650 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Error: Not associated with a trusted SQL Server connection

123 New Member
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 4704
kestrel
1,071 Recognized Expert Top Contributor
I'm moving this to the SQL Server / MSSQL Forum, please do not post in the Articles Section
Jun 7 '07 #2
Newbie19
123 New Member
Problem solved, thanks again everyone.
Jun 18 '07 #3
ArtZ
1 New Member
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

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

Similar topics

5
2224
by: Dave | last post by:
I reinstalled SQL 2000 server after reformatting my drive. Now I cannot open a database in my C## program as before. If I use "Provider=SQLOLEDB;Data Source=localhost; Initial...
1
2697
by: Mark | last post by:
We are using impersonation so that a user on our domain will login into our SQL Server using their own domain login and/or associated domain groups. To do this, we've added: <authentication...
0
1476
by: Frederik | last post by:
Bonjour , J'ai développé une petite application web sur winxp IIS5.0 avec Sql Server Developper edition. Tout fonctionne parfaitement. Par contre ca ne fonctionne pas lorsque je fais rouler l'app...
5
2780
by: Ben | last post by:
Hi I am updating a project from Access to run on our SQL Server DB. Currently I am struggling to connect to the database. I have this code which is throwing this error: SQL Server does not...
1
2100
by: fl | last post by:
I am running ASPNET on my local machine. I have a problem when I try to connect to a SQL server database table. The data looks good when I right click SqlDataAdapter1 to preview the data. When F5...
2
1408
by: news.microsoft.com | last post by:
Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection. I guess I get this because, my pages are hosted on WinXP IIS and the sql server is on Win2k3. ...
6
4938
by: Chris Love | last post by:
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not...
5
1621
by: CFTK | last post by:
we´re having problems to put our Website at IIS: We have achieved it all works using the connectionString with user and password of the superuser (sa), but with IntegratedSecurity we get the...
3
2497
by: Newbie19 | last post by:
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...
0
7201
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
1
6988
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7456
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5578
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5011
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3166
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3153
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
734
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
379
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.