Impersonation problem

Ask a Question related to ASP.NET Security, Design and Development.

  1. #1

    Default Impersonation problem

    Hi !

    I'm trying to secure my web application using impersonation within the
    web.config file as follows :

    <identity impersonate="true"
    userName="MyMachine\MyUser"
    password="MyPassword" />

    This gives me the error : Access to
    "C:\WINNT\Microsoft.NET\Framework\v1.1.4322\Tempor ary ASP.NET
    Files\webtests\5586467f\285b6247\hash.web" denied ...

    If I do the same using a user of the domain, then it works ...

    <identity impersonate="true"
    userName="MyDomain\DomainUser"
    password="MyPassword" />

    Any idea about what I'm doing wrong ?


    Of course, once this is working, I'm planning to encrypt this using
    aspnet_setreg.exe and the following web.config entry :
    <identity impersonate="true"
    userName="registry:HKLM\SOFTWARE\MyApp\identity\AS PNET_SETREG,userName"
    password="registry:HKLM\SOFTWARE\MyApp\identity\AS PNET_SETREG,password" />

    Again ... this works with my domain user, but not with the local user
    defined on my machine. By the way, my local user has full control on the web
    application folder

    Thanks for your help


    Marc Wuergler Guest

  2. Similar Questions and Discussions

    1. Impersonation problem.
      When I enable impersonation in web.config and show User identity in .aspx page, it is the user IIS authenticates. But when I try to access Sql...
    2. IsolatedStorage with impersonation in ASP.NET problem
      Hi, I have an ASP.NET application. I want to use IsolatedStorage in this application. When I run this application with anonymous access set in IIS...
    3. problem with impersonation using LogonUser
      Hello All This is what I am tring to do: I have some folders shared for specific users on network. Now from my web appl I have to access them....
    4. HttpWebRequest, impersonation and DefaultCredentials problem.
      I'm trying to create a HttpWebRequest object that uses the current logged in user's credentials. It's currently setup with: <identity...
    5. Problem with Impersonation
      I recently installed Active Directory on my webserver (yeah people say it's a bad idea but I had no other choice). Now when I access a web app with...
  3. #2

    Default Re: Impersonation problem

    The user you are impersonating with doesn't have access to "C:\winnt\microsoft.net\framework\v1.1.4322\tempor ary asp.net files", you must give them NTFS permissions to access this directory.

    "Marc Wuergler" <marc_wurgler@hotmail.com> wrote in message news:eMQONuDhEHA.3428@TK2MSFTNGP11.phx.gbl...
    > Hi !
    >
    > I'm trying to secure my web application using impersonation within the
    > web.config file as follows :
    >
    > <identity impersonate="true"
    > userName="MyMachine\MyUser"
    > password="MyPassword" />
    >
    > This gives me the error : Access to
    > "C:\WINNT\Microsoft.NET\Framework\v1.1.4322\Tempor ary ASP.NET
    > Files\webtests\5586467f\285b6247\hash.web" denied ...
    >
    > If I do the same using a user of the domain, then it works ...
    >
    > <identity impersonate="true"
    > userName="MyDomain\DomainUser"
    > password="MyPassword" />
    >
    > Any idea about what I'm doing wrong ?
    >
    >
    > Of course, once this is working, I'm planning to encrypt this using
    > aspnet_setreg.exe and the following web.config entry :
    > <identity impersonate="true"
    > userName="registry:HKLM\SOFTWARE\MyApp\identity\AS PNET_SETREG,userName"
    > password="registry:HKLM\SOFTWARE\MyApp\identity\AS PNET_SETREG,password"/>
    >
    > Again ... this works with my domain user, but not with the local user
    > defined on my machine. By the way, my local user has full control on the web
    > application folder
    >
    > Thanks for your help
    >
    >
    Raterus Guest

  4. #3

    Default Re: Impersonation problem

    Thanks a lot ... it works fine now
    "Raterus" <moc.liamtoh@suretar.reverse> a écrit dans le message de
    news:%232VAFKGhEHA.3236@TK2MSFTNGP10.phx.gbl...
    The user you are impersonating with doesn't have access to
    "C:\winnt\microsoft.net\framework\v1.1.4322\tempor ary asp.net files", you
    must give them NTFS permissions to access this directory.

    "Marc Wuergler" <marc_wurgler@hotmail.com> wrote in message
    news:eMQONuDhEHA.3428@TK2MSFTNGP11.phx.gbl...
    > Hi !
    >
    > I'm trying to secure my web application using impersonation within the
    > web.config file as follows :
    >
    > <identity impersonate="true"
    > userName="MyMachine\MyUser"
    > password="MyPassword" />
    >
    > This gives me the error : Access to
    > "C:\WINNT\Microsoft.NET\Framework\v1.1.4322\Tempor ary ASP.NET
    > Files\webtests\5586467f\285b6247\hash.web" denied ...
    >
    > If I do the same using a user of the domain, then it works ...
    >
    > <identity impersonate="true"
    > userName="MyDomain\DomainUser"
    > password="MyPassword" />
    >
    > Any idea about what I'm doing wrong ?
    >
    >
    > Of course, once this is working, I'm planning to encrypt this using
    > aspnet_setreg.exe and the following web.config entry :
    > <identity impersonate="true"
    > userName="registry:HKLM\SOFTWARE\MyApp\identity\AS PNET_SETREG,userName"
    > password="registry:HKLM\SOFTWARE\MyApp\identity\AS PNET_SETREG,password" />
    >
    > Again ... this works with my domain user, but not with the local user
    > defined on my machine. By the way, my local user has full control on the
    web
    > application folder
    >
    > Thanks for your help
    >
    >

    Marc Wuergler Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139