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

  1. #1

    Default Re: Asp.net impersonate

    I don't think impersonation loads the user profile of the account being
    impersonated. If you think about it, that would make impersonation very
    slow.

    Do you need the user profile loaded for some reason?

    Joe K.

    "Frederik Vermeersch via .NET 247" <anonymous@dotnet247.com> wrote in
    message news:%23$tKgsPjEHA.3148@TK2MSFTNGP10.phx.gbl...
    > Hi,
    >
    > My global.asax contains:
    > <authentication mode="Windows" />
    > <identity impersonate="true"/>
    >
    > in my aspx page Environment.UserName returns the correct impersonated
    username,
    > but Environment.GetEnvironmentVariable("USERPROFILE") returns the
    userprofile of the ASPNET user, being: C:\Documents and
    Settings\COMPUTERNAME\ASPNET
    > (Strange behaviour, but I asume that this is by design.)
    > Is there no way to return the userprofile for the impersonated account?
    >
    > Thanks,
    > Frederik
    >
    > -----------------------
    > Posted by a user from .NET 247 ([url]http://www.dotnet247.com/[/url])
    >
    > <Id>EUpSiezJAUCDSil1IuWbOg==</Id>

    Joe Kaplan \(MVP - ADSI\) Guest

  2. Similar Questions and Discussions

    1. Impersonate + AD
      Hi, I've got a difficult situation... Is a website that runs on IIS with Anonymous Authentication, the tag <identity impersonate="false"> on the...
    2. To Be or To Impersonate, that is the Question
      Alrighty, my continued foray into accessing network resources from the web server continues... When employees hit the intranet ASP.NET...
    3. DirectoryEntry Impersonate or WindowsIdentity Impersonate?
      Another security question. Our project interfaces with the Active Directory. To satisfy the security issues, we have a couple options when we talk...
    4. impersonate
      Hi all, I create a aspnet web app for my company. I set it up on a win2000 server with IIS5 as a intranet app. For security, I want to restrict...
    5. Impersonate at runtime
      Hi, I want to move my files from web servers to a shared folder on the database server. For this I impersonate the aspnet user to common...
  3. #2

    Default Re: Asp.net impersonate

    Hi Joe,
    If i use this web config file:-
    <authorization>
    <deny users="?"/>
    <allow users="*"/>
    </authorization>
    Can i control the GROUPS the users would be able to validate against the
    Active Directory?For example if i allow only members in a security group in
    the Active Directory to authenticate and deny the others.Would it work?
    Check this link at :-
    [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sds/sds/act[/url]
    ive_directory_authentication_from_asp__net.asp
    Thanks




    "Joe Kaplan (MVP - ADSI)" <joseph.e.kaplan@removethis.accenture.com> wrote
    in message news:eW$kZLXjEHA.394e [email]4@tk2msftngp13.phx.gbl[/email]...
    > I don't think impersonation loads the user profile of the account being
    > impersonated. If you think about it, that would make impersonation very
    > slow.
    >
    > Do you need the user profile loaded for some reason?
    >
    > Joe K.
    >
    > "Frederik Vermeersch via .NET 247" <anonymous@dotnet247.com> wrote in
    > message news:%23$tKgsPjEHA.3148@TK2MSFTNGP10.phx.gbl...
    > > Hi,
    > >
    > > My global.asax contains:
    > > <authentication mode="Windows" />
    > > <identity impersonate="true"/>
    > >
    > > in my aspx page Environment.UserName returns the correct impersonated
    > username,
    > > but Environment.GetEnvironmentVariable("USERPROFILE") returns the
    > userprofile of the ASPNET user, being: C:\Documents and
    > Settings\COMPUTERNAME\ASPNET
    > > (Strange behaviour, but I asume that this is by design.)
    > > Is there no way to return the userprofile for the impersonated account?
    > >
    > > Thanks,
    > > Frederik
    > >
    > > -----------------------
    > > Posted by a user from .NET 247 ([url]http://www.dotnet247.com/[/url])
    > >
    > > <Id>EUpSiezJAUCDSil1IuWbOg==</Id>
    >
    >

    Patrick.O.Ige Guest

  4. #3

    Default Re: Asp.net impersonate

    For this you would usually do something like:

    <authorization>
    <allow roles="domain\groupname"/>
    <deny users="*"/>
    </authorization>

    You can use multiple groups separated by commas in the allow list.

    HTH,

    Joe K.

    "Patrick.O.Ige" <patrickige@acn.waw.pl> wrote in message
    news:Oqj4gJcjEHA.3428@TK2MSFTNGP11.phx.gbl...
    > Hi Joe,
    > If i use this web config file:-
    > <authorization>
    > <deny users="?"/>
    > <allow users="*"/>
    > </authorization>
    > Can i control the GROUPS the users would be able to validate against the
    > Active Directory?For example if i allow only members in a security group
    in
    > the Active Directory to authenticate and deny the others.Would it work?
    > Check this link at :-
    >
    [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sds/sds/act[/url]
    > ive_directory_authentication_from_asp__net.asp
    > Thanks
    >
    >
    >
    >
    > "Joe Kaplan (MVP - ADSI)" <joseph.e.kaplan@removethis.accenture.com> wrote
    > in message news:eW$kZLXjEHA.394e [email]4@tk2msftngp13.phx.gbl[/email]...
    > > I don't think impersonation loads the user profile of the account being
    > > impersonated. If you think about it, that would make impersonation very
    > > slow.
    > >
    > > Do you need the user profile loaded for some reason?
    > >
    > > Joe K.
    > >
    > > "Frederik Vermeersch via .NET 247" <anonymous@dotnet247.com> wrote in
    > > message news:%23$tKgsPjEHA.3148@TK2MSFTNGP10.phx.gbl...
    > > > Hi,
    > > >
    > > > My global.asax contains:
    > > > <authentication mode="Windows" />
    > > > <identity impersonate="true"/>
    > > >
    > > > in my aspx page Environment.UserName returns the correct impersonated
    > > username,
    > > > but Environment.GetEnvironmentVariable("USERPROFILE") returns the
    > > userprofile of the ASPNET user, being: C:\Documents and
    > > Settings\COMPUTERNAME\ASPNET
    > > > (Strange behaviour, but I asume that this is by design.)
    > > > Is there no way to return the userprofile for the impersonated
    account?
    > > >
    > > > Thanks,
    > > > Frederik
    > > >
    > > > -----------------------
    > > > Posted by a user from .NET 247 ([url]http://www.dotnet247.com/[/url])
    > > >
    > > > <Id>EUpSiezJAUCDSil1IuWbOg==</Id>
    > >
    > >
    >
    >

    Joe Kaplan \(MVP - ADSI\) Guest

  5. #4

    Default Re: Asp.net impersonate

    Web config problem:-
    -------------------
    If i want to Allow only some GROUPS to login and DENY the others how
    would i do it.

    For example i have security GROUPS S_A,S_B,S_V and i want all user to
    login but if they are not if the following groups above they should be
    denied.
    How should the WEB CONFIG look like.
    Thanks alot.
    This ine below doesn't work!!
    <deny users="?"/>
    <allow users="?"
    roles="S_A,S_B,S_V"//>


    *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!
    naijacoder naijacoder 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