Re: Server Error in '/MyWebForm' Application

Tech-Archive recommends: Speed Up your PC by fixing your registry

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


Date: Thu, 16 Sep 2004 18:03:49 -0400

Greg,

I'm a neophyte here, just trying to get a first ASP.NET test program to
work. I am running IIS on my XP workstation. No one else needs to get at
it for now.

It seems that I shouldn't be using <identity impersonate="true">. All I
want to do at the moment is to run the test under my account which should be
the "integrated windows account" since I have admistrator privileges.

I don't have SQL Server, just the MSDE engine that I can use to test. The
"select @@version" from osql shows Desktop Engine 5.1; SP2 though after "SQL
Server 2000 - 8.00.760."

There is a user account on the machine "ASP.NET MachineA..." that is
described as a limited account, password protected although I didn't create
is as far as I know! I can't find an ASPNET account.
How would I give it rights under the SQL Enterprise Manager. Is this part of
MSDE?

Regards,

Ed

"Greg Burns" <greg_burns@DONT_SPAM_ME_hotmail.com> wrote in message
news:%23Cq9nUBnEHA.3988@tk2msftngp13.phx.gbl...
>> login failed for user 'DELL340\ASPNET'.
>
> Sounds like the ASPNET account, the account ASP.NET pages run under by
> default, doesn't have access to your database.
>
>> Login failed for user 'DELL340\IUSR_DELL340'.
>>
>> How come the user changed and where did the user name come from?
>>
>
> IUSR_<COMPUTER NAME> is the account IIS is running under. It switched to
> that account because you added <identity impersonate="true" /> to your
> web.config. And presumably, you left anonymous access checked in IIS
> security settings for your virtual directory.
>
> Is SQL server installed on your computer, or on a remote computer? If it
> is local, then you need to give ASPNET rights to the database using SQL
> Enterpise Manager.
>
> If SQL is remote, then things get stickier, but let us know first...
>
> HTH,
> Greg
>
>
> "Edward Mitchell" <emitchell@nospam.ieee.org> wrote in message
> news:uonLpFBnEHA.3684@TK2MSFTNGP10.phx.gbl...
>>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

  • Re: SQL account rights
    ... Please advice what is the best, suitable rights rather than domain admin ... Warren Brunk - MCITP - SQL 2005, ... Add it as a login to the SQL Server ... files, or backups, make sure that the service account has Full ...
    (microsoft.public.sqlserver.security)
  • Re: User authentication
    ... There are 2 SQL Server 2005 ... 1 SQL Server 2000 installed on another server ... Windows account instead to run backup jobs. ...
    (microsoft.public.sqlserver.clients)
  • Re: SQL 2000 Server gets hacked
    ... Thank you Beth. ... > placed a strong password on the 'sa' account?) ... Your SQl Service itself shouldn't be running as a ... (SQL Agent requires more, but not SQL Server). ...
    (microsoft.public.sqlserver.security)
  • Re: SQL 2000 Server gets hacked
    ... Thank you Beth. ... > placed a strong password on the 'sa' account?) ... Your SQl Service itself shouldn't be running as a ... (SQL Agent requires more, but not SQL Server). ...
    (microsoft.public.sqlserver.security)
  • Re: Microsoft Search service cannot be administered under the present user error SP3
    ... - Have not modified Administrator account, but i ran the SQL script anyway. ... SQL account is not a local administrator. ... > has this server ever been upgrade from SQL Server 7.0 or is this SQL ...
    (microsoft.public.sqlserver.server)