Re: IIS vs ASP.Net Authentication problem
From: Joe Kaplan \(MVP - ADSI\) (joseph.e.kaplan_at_removethis.accenture.com)
Date: 11/12/04
- Next message: Novice: "Impersonation and PrincipalPermission"
- Previous message: njtom: "IIS vs ASP.Net Authentication problem"
- In reply to: njtom: "IIS vs ASP.Net Authentication problem"
- Next in thread: njtom: "Re: IIS vs ASP.Net Authentication problem"
- Reply: njtom: "Re: IIS vs ASP.Net Authentication problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Fri, 12 Nov 2004 12:21:11 -0600
If you want domain\iisuser to be the account that accesses SQL, you need to
change the ASP.NET processModel to use that account and make sure
impersonation is set to false. That way, the token on the thread will be
the process token.
Joe K.
"njtom" <njtom@discussions.microsoft.com> wrote in message
news:A4CFD238-3832-4D10-BD1B-A9CCEDF449D9@microsoft.com...
> ------
> Setup
> ------
>
> - IIS runs with a domain user account 'domain\iisuser'
> - SQL Server has 'domain\iisuser' login setup to act as a data
> reader/writer
>
> Requirement is to use 'domain\iisuser' to authenticate in SQL Server
>
> -------------------
> More info on setup
> -------------------
> - asp.net 1.1
> - processModel in machine.config has userName='machine'
> password='AutoGenerate'
> - Only Integrated Windows Authentication enabled (Anonymous/basic/digest
> unchecked) in IIS 5
> - Connection string used : "Provider=SQLOLEDB;Data
> Source=CCMIWS05;Database=t5CONV;Integrated Security=SSPI;"
> - Using Windows XP SP2 as a development box.
>
> ----------------------------
> Microsoft Documentation says
> ----------------------------
> Check the url given here for an exact description
>
>
> Impersonation is disabled ->
> This is the default setting for backward compatibility with ASP. In this
> instance, the ASP.NET thread will run using the process token of the
>
> application worker process, which by default is the IIS system account,
> regardless of which combination of IIS and ASP.NET authentication
>
> have been used.
> <identity impersonate="false"/>
>
>
>
> (URL:
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/authaspdotnet.asp)
>
> ------------
> The problem
> ------------
>
> The 'domain\iisuser' is not authenticated in SQL Server and ASPNet seems
> to
> get authenticated which fails as it's not a user in SQL Server.
>
> The error message I am getting is:
>
> Login failed for user 'CCMIWS05\ASPNET'.
> 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.OleDb.OleDbException: Login failed for user
> 'CCMIWS05\ASPNET'.
>
>
> ***What am I doing wrong per documentation?***
- Next message: Novice: "Impersonation and PrincipalPermission"
- Previous message: njtom: "IIS vs ASP.Net Authentication problem"
- In reply to: njtom: "IIS vs ASP.Net Authentication problem"
- Next in thread: njtom: "Re: IIS vs ASP.Net Authentication problem"
- Reply: njtom: "Re: IIS vs ASP.Net Authentication problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|