Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 ASP.NET
 Login failed for user DOMAINNAME\COMPUTERNAME$

Author  Topic 

drdexter33
Starting Member

12 Posts

Posted - 2004-10-15 : 09:37:53
I have just moved an asp.net application using SQL Server 2000 from a Windows XP Pro to a test machine running Windows Server 2003 and IIS 6.

When I attempt to access 2 pages in this application I get this error:
----------------------------------------------------------------------------
Login failed for user DOMAINNAME\COMPUTERNAME$
----------------------------------------------------------------------------
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 DOMAINNAME\COMPUTERNAME$'.


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.

Stack Trace:


[SqlException: Login failed for user 'CWC\MIS-2003$'.]
System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction) +472
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction) +372
System.Data.SqlClient.SqlConnection.Open() +384
System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState) +44
System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +304
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +77
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +38
IntranetSupportAppliation.ComputerList.BindDataGrid() in C:\Inetpub\wwwroot\IntranetSupportAppliation_1\ComputerList.aspx.vb:297
IntranetSupportAppliation.ComputerList.Page_Load(Object sender, EventArgs e) in C:\Inetpub\wwwroot\IntranetSupportAppliation_1\ComputerList.aspx.vb:284
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731
----------------------------------------------------------------------------

THe funny thing is that the other pages are working fine, and on the XP Pro box everything works.

I'm really not a SQL Server Guru, my level of experience is fairly minimal.

I have set up the security to permit DOMAINNAME\COMPUTERNAME$ access to the database.
I have set up the security to permit COMPUTERNAME\ASPNET access to the database.

Any ideas of what I'm doing wrong?

Thanks.

Doug Dexter

chadmat
The Chadinator

1974 Posts

Posted - 2004-10-15 : 13:59:47
Are the other pages accessing SQL Server? Is the SQL Server on a seperate server? Or on the same box?

-Chad

http://www.clrsoft.com

Software built for the Common Language Runtime.
Go to Top of Page

drdexter33
Starting Member

12 Posts

Posted - 2004-10-15 : 14:10:32
Stupid me.

I just re-read the stack trace, and found out what the problem was.

I'm using a connection string for all of the pages except the two which were causing the problem.

Those two pages are using toolbox data controls (connection, dataset, data adapter) that had the connection string set in the IDE.

All the rest of the pages are using a connection string that's set in the WEB.CONFIG file.

As soon as I changed the connection string properties in the IDE, it worked.

Thanks for your help.

Doug Dexter
Go to Top of Page
   

- Advertisement -