Re: Impersonation in asp.net
From: Stephen Shirley, MCSD .NET (viper_at_conwaycorp.net)
Date: 07/27/04
- Previous message: Joe Kaplan \(MVP - ADSI\): "Re: Query AD using Integrated Authentication?"
- In reply to: Samuel Shum: "Re: Impersonation in asp.net"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: 27 Jul 2004 13:45:45 -0700
Possible Solution: I have wrestled with this one also. I finally got
it to work by giving the MachineName(change this)\ASPNET account
permissions to read the registry key ASPNET_SETREG directly, not the
Identity key. Note, everytime you run aspnet_setreg it will drop and
recreate the key, so you will have to add the permissions everytime
you run it. Hope this helps.
Stephen Shirley,
MCSD .NET
"Samuel Shum" <samuelshum@hotmail.com> wrote in message news:<eKaIf6WaEHA.2908@TK2MSFTNGP10.phx.gbl>...
> Thanks Mark for the information, sorry if my query mislead you. I'd done the
> encryption part: the username and password are encrypted and stored in the
> registry with the tool "aspnet_setreg"
> (http://support.microsoft.com/default.aspx?scid=kb;en-us;329290) and those
> can be retrieved by stating the following entry in the web.config file:
>
> <identity impersonate="true"
> userName="registry:HKLM\Software\DummyApplication\Identity\ASPNET_SETREG,use
> rName"
> password="registry:HKLM\Software\DummyApplication\Identity\ASPNET_SETREG,pas
> sword" />
>
> I follow the procedures exactly but the browser returns the following error:
> ***
> Configuration Error
> Description: An error occurred during the processing of a configuration file
> required to service this request. Please review the specific error details
> below and modify your configuration file appropriately.
>
> Parser Error Message: Error reading the password from the registry.
>
> Source Error:
>
> Line 83: <globalization requestEncoding="utf-8" responseEncoding="utf-8"
> />
> Line 84:
> Line 85: <identity impersonate="true"
> userName="registry:HKLM\Software\DummyApplication\Identity\ASPNET_SETREG,use
> rName"
> password="registry:HKLM\Software\DummyApplication\Identity\ASPNET_SETREG,pas
> sword" />
> Line 86: </system.web>
>
> Source File: c:\inetpub\wwwroot\Encryption\web.config Line: 85
>
> ----------------------------------------------------------------------------
> ----
> Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET
> Version:1.1.4322.573
> ***
>
> I'd given the "aspnet" account the permission to read the entries, just
> don't know what the error exactly means.
>
> Samuel
- Previous message: Joe Kaplan \(MVP - ADSI\): "Re: Query AD using Integrated Authentication?"
- In reply to: Samuel Shum: "Re: Impersonation in asp.net"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|