Re: Login failed for user (null)
- From: Paul Clement <UseAdddressAtEndofMessage@xxxxxxxxxxxxxx>
- Date: Wed, 10 Aug 2005 12:39:24 -0500
On Wed, 10 Aug 2005 08:26:02 -0500, Bob Segrest <Bob.Segrest@xxxxxxxxx> wrote:
¤ Hello Paul,
¤
¤ Thank you for your response!
¤
¤ I am using VB to create an ASP.Net web application rather than a
¤ traditional windows application. I appologize for failing to make
¤ this clear.
¤
¤ Your question leads me to suspect I have missed something...
¤
¤ How do I solve my problem?
¤
If you're not using impersonation then go with Bill's suggestion. When impersonation is disabled
(the default) the identity under which the thread executes is ASPNET (or NetworkService under
Windows 2003). Just keep in mind that ASPNET is a local account so you will need an identical
account on the SQL Server box with the exact credentials for delegation to succeed.
If you want to impersonate the authenticated user through your ASP.NET app then you will need to
enable impersonation. This is the first step.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsent7/html/vxconimpersonation.asp
The second step involves setting the appropriate security for your web app. If you have Anonymous
authentication enabled the impersonated identity is either the IUSR or IWAM account. Probably not
what you want. If you enable Basic authentication then you can impersonate and delegate the (clear
text) credentials of the authenticated user (via IIS) to a remote resource (such as SQL Server).
If you configure your web app for Integrated Windows Security you *cannot* delegate credentials (via
IIS) to a remote resource without enabling Kerberos. This is because NTLM performs the
authentication (by default) and IIS never actually receives the encrypted credentials.
The above scenario is what typically stop folks cold, because Integrated Windows security will
appear to work on their development machine, but only because they are logged on locally, but will
fail once they move the ASP.NET app to their production web server.
Paul
~~~~
Microsoft MVP (Visual Basic)
.
- References:
- Login failed for user (null)
- From: Bob Segrest
- Re: Login failed for user (null)
- From: William \(Bill\) Vaughn
- Re: Login failed for user (null)
- From: Bob Segrest
- Re: Login failed for user (null)
- From: Paul Clement
- Re: Login failed for user (null)
- From: Bob Segrest
- Login failed for user (null)
- Prev by Date: RE: SqlClient Data Adapter Fill Method
- Next by Date: MS data provider for Oracle - SELECT COUNT(*)
- Previous by thread: Re: Login failed for user (null)
- Next by thread: really stuck on ExecuteReader
- Index(es):
Relevant Pages
|