Server Error in '/MyWebForm' Application

From: Edward Mitchell (emitchell_at_nospam.ieee.org)
Date: 09/16/04


Date: Thu, 16 Sep 2004 13:19:58 -0400

I have a problem that involves the error I receive when attempting to
complete the asp.net web application example (Walkthrough: Creating a Web
Application Using a Third-Party Business Object). When I first create the
SQL connection in VS.NET 2003, I test the connection and everything works
fine. However, when I attempt to run the first stage of the app (the bound
datagrid), I receive an error stating:

login failed for user 'DELL340\ASPNET'.

There was another post in this newsgroup on this subject (Difficulty
connecting to SQL Server 2000:2002-03-04) that suggested placing the line:

    <identity impersonate="true" />

in the Web.config file but when I run the app again, there is the following
failure message:

Login failed for user 'DELL340\IUSR_DELL340'.

How come the user changed and where did the user name come from?

What can I do to fix the problem?

I appended the full text of the second error message. System is Windows XP,
SP2. MSDE server.

Ed.

--
Edward E.L. Mitchell
Web: www.racesail.org
Phone: (508)771-0806
500 Ocean St., Unit 134,
Hyannis, MA 02601
Server Error in '/MyWebForm' Application.
--------------------------------------------------------------------------------
Login failed for user 'DELL340\IUSR_DELL340'.
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 
'DELL340\IUSR_DELL340'.
Source Error:
Line 48:         public void FillDataSet(myDataSet dSet)
Line 49:         {
Line 50:             sqlDataAdapter1.Fill(dSet);
Line 51:         }
Line 52:
Source File: c:\inetpub\wwwroot\mywebform\component1.cs    Line: 50
Stack Trace:
[SqlException: Login failed for user 'DELL340\IUSR_DELL340'.]
   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
   MyWebForm.Component1.FillDataSet(myDataSet dSet) in 
c:\inetpub\wwwroot\mywebform\component1.cs:50
   MyWebForm.WebForm1.Page_Load(Object sender, EventArgs e) in 
c:\inetpub\wwwroot\mywebform\webform1.aspx.cs:27
   System.Web.UI.Control.OnLoad(EventArgs e) +67
   System.Web.UI.Control.LoadRecursive() +35
   System.Web.UI.Page.ProcessRequestMain() +731
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET 
Version:1.1.4322.573 


Relevant Pages

  • Very strange SQL connection problem
    ... System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ... System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, ... Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: ASP.net and Oracle error System.Data.OleDb.OleDbException
    ... Here is some of my connection code: ... Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior ... >> on our test web server, There is only one oracle home on the test server. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: ExOLEDB SQL bug when dtend - dtstart > 732
    ... in the Exchange server, to limit the search to two years. ... dbParams, Object& executeResult) ... startRecord, Int32 maxRecords, String srcTable, IDbCommand command, ...
    (microsoft.public.exchange.development)
  • Re: Deploying Web Service to my hosting services server
    ... It means that neither ODBC nor ... > connection, ConnectionState& originalState) ... > startRecord, Int32 maxRecords, String srcTable, IDbCommand command, ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Very strange SQL connection problem
    ... Try creating a *new instance* of SqlConnection and then open and after the ... > connection string again and got the second exception after ... > Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior ...
    (microsoft.public.dotnet.framework.adonet)