B
Brent Waldrop
Ok everyone, i have been pulling my hair out on this one. I have been
working on it for 3 days with no sucess. This problem is occuring at home
where i am running a workgroup. I have Windows 2003 Ent Server on one
machine and windows xp sp2 on another. The db server is located on the
Windows 2003 machine. I am working locally with asp.net 1.1 on the xp
workstation and the web server is also locally on the xp workstation. Every
time i try to connect with the asp.net application to the database i get the
following error:
Server Error in '/WebApplication1' Application.
----------------------------------------------------------------------------
----
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:
Line 44:
Line 45: ' fill the dataset
Line 46: dataAdapter.Fill(ds, "Customers")
Line 47: Dim bldr As New SqlCommandBuilder(dataAdapter)
Line 48:
Source File: c:\inetpub\wwwroot\WebApplication1\WebForm1.aspx.vb Line: 46
Stack Trace:
[SqlException: Login failed for user '(null)'. Reason: Not associated with a
trusted SQL Server connection.]
System.Data.SqlClient.ConnectionPool.GetConnection(Boolean&
isInTransaction)
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnec
tionString options, Boolean& isInTransaction)
System.Data.SqlClient.SqlConnection.Open()
System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection,
ConnectionState& originalState)
System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior)
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord,
Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior
behavior)
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)
WebApplication1.WebForm1.Page_Load(Object sender, EventArgs e) in
c:\inetpub\wwwroot\WebApplication1\WebForm1.aspx.vb:46
System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()
I have tried to following to fix the problem.
1) Tried to add the asp.net user to sql server
2) Removed tcp/ip from the connect types to sql server
3) added a new user which i called "aspnetuser" to both computers then when
into anonymous logins on IIS and added this user as the anonymous login user
and unchecked the let IIS control the password and typed in the correct
password.
4) change the asp.net user that the install of vs.net added and added them
to the admin group on both machines. I have no problem login into sql server
(windows authentication) when i use my local account i created on the xp
workstation for me (im in the admin group).
The only thing i have not used is impersonation and id rather not unless i
have to. Course since i haven't tried it, i might have trouble with it too.
Scratch what i just said above. I tried impersonaltion and it worked but id
rather not use this if at all possible. I want to use the security that
vs.net set up for the "asp.net" user. Is this possible without using
impersonation?
Thanks,
Brent
working on it for 3 days with no sucess. This problem is occuring at home
where i am running a workgroup. I have Windows 2003 Ent Server on one
machine and windows xp sp2 on another. The db server is located on the
Windows 2003 machine. I am working locally with asp.net 1.1 on the xp
workstation and the web server is also locally on the xp workstation. Every
time i try to connect with the asp.net application to the database i get the
following error:
Server Error in '/WebApplication1' Application.
----------------------------------------------------------------------------
----
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:
Line 44:
Line 45: ' fill the dataset
Line 46: dataAdapter.Fill(ds, "Customers")
Line 47: Dim bldr As New SqlCommandBuilder(dataAdapter)
Line 48:
Source File: c:\inetpub\wwwroot\WebApplication1\WebForm1.aspx.vb Line: 46
Stack Trace:
[SqlException: Login failed for user '(null)'. Reason: Not associated with a
trusted SQL Server connection.]
System.Data.SqlClient.ConnectionPool.GetConnection(Boolean&
isInTransaction)
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnec
tionString options, Boolean& isInTransaction)
System.Data.SqlClient.SqlConnection.Open()
System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection,
ConnectionState& originalState)
System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior behavior)
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord,
Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior
behavior)
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)
WebApplication1.WebForm1.Page_Load(Object sender, EventArgs e) in
c:\inetpub\wwwroot\WebApplication1\WebForm1.aspx.vb:46
System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()
I have tried to following to fix the problem.
1) Tried to add the asp.net user to sql server
2) Removed tcp/ip from the connect types to sql server
3) added a new user which i called "aspnetuser" to both computers then when
into anonymous logins on IIS and added this user as the anonymous login user
and unchecked the let IIS control the password and typed in the correct
password.
4) change the asp.net user that the install of vs.net added and added them
to the admin group on both machines. I have no problem login into sql server
(windows authentication) when i use my local account i created on the xp
workstation for me (im in the admin group).
The only thing i have not used is impersonation and id rather not unless i
have to. Course since i haven't tried it, i might have trouble with it too.
Scratch what i just said above. I tried impersonaltion and it worked but id
rather not use this if at all possible. I want to use the security that
vs.net set up for the "asp.net" user. Is this possible without using
impersonation?
Thanks,
Brent