Re: Server Error in '/MyWebForm' Application

From: bruce barker (nospam_brubar_at_safeco.com)
Date: 09/16/04


Date: Thu, 16 Sep 2004 13:07:20 -0700

IIS has a service account: DELL340\IUSR_DELL340 on your machine
ASP.Net has a service account: DELL340\ASPNET on your machine

the default is for you request to run under the asp.net account
setting <identity impersonate="true" /> means use the IIS security token for
the request.
if the web site is anonymous, then the IIS security token is the iis account
if anonymous is turned off, then the IIS security token will match the
authenicated account.

if you turn off anonymous, your connect will work, but there are
restrictions.

1) if basic or kerboreos (and kerboreos delegation is enabled) your ok.
2) if nt authenication is used, then the sqlserver must be on the iis box
except for
  a browser running on the local box (say you dev machine) or you will hit
the one hop rule.

if you need anonymous access to your site, then supply an domain account
    <identity impersonate="true" userName="domain\user" password
="mypassword" />

-- bruce (sqlwork.com)

"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(SqlConnec
tionString
> 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: Win 2000 service needs to access Win 2003 Web Server data
    ... Service that simply runs in the background getting data from the IIS logfiles ... simply running under the admin account that I set it up to run under. ... However, when a request for network access is sent from an web application, ... Microsoft Online Partner Support ...
    (microsoft.public.win32.programmer.networks)
  • RE: SOME Users cannot access OWA others do, error HTTP 500
    ... I understand that some account access OWA ... IIS 6.0 compression corruption causes access violations ... compressed copy of the affected files on the SBS server: ...
    (microsoft.public.windows.server.sbs)
  • RE: ASPNET account doesnt exist on Windows Server 2003
    ... However, after some of these installs, I can and after some other installs, ... I can not find the ASPNET account. ... IIS WPG are present in both situations. ... > granting access rights to the resource to the ASP.NET request identity. ...
    (microsoft.public.windows.server.general)
  • Re: Basic Authentication fails with Error 401.2 where Integrated s
    ... On the IIS directory security tab, anonymous access is disabled, digest ... authentication is disabled, integrated authentication is disabled and basic ... account created has full permissions for the folder and the file that's in it. ...
    (microsoft.public.inetserver.iis.security)
  • Re: IIS 6 ASP: Which Process Identity Is It Using? App Pool or Anon?
    ... But isn't the COM object running under the ... The COM object can be running under the impersonated account, ... example, even if IIS launched the COM object with the impersonated user, the ... It will now be using "TestService" identity. ...
    (microsoft.public.inetserver.iis)

Quantcast