Re: Impersonation in asp.net

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Stephen Shirley, MCSD .NET (viper_at_conwaycorp.net)
Date: 07/27/04


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



Relevant Pages

  • Re: Impersonation in asp.net
    ... permissions to read the registry key ASPNET_SETREG directly, ... > below and modify your configuration file appropriately. ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Impersonation in asp.net
    ... permissions to read the registry key ASPNET_SETREG directly, ... > below and modify your configuration file appropriately. ...
    (microsoft.public.inetserver.asp.general)
  • RE: Constant w3wp.exe and webengine.dll errors
    ... Grant NETWORK SERVICE the necessary permissions to access the ... the permissions on the registry key may be reset. ... To grant NETWORK SERVICE the necessary permissions to access the ASP.NET ... Microsoft CSS Online Newsgroup Support ...
    (microsoft.public.windows.server.sbs)
  • RE: missing system.mdw file
    ... permissions to create the file, ... >The registry key is not missing. ... Running the SCAN program from the Windows ... >>| I cannot create any new databases in Access 2002 on ...
    (microsoft.public.access.setupconfig)
  • Re: Problems with winexit.exe and "power users"
    ... the solution is to set appropriate permissions for the registry key discussed in that article. ... administrator then copy our administrator profile over our default user ... power users group is logged on, winexit fails when it attempts to log them ...
    (microsoft.public.windowsxp.customize)