Re: Network access from c# code (called from ASP.Net)

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Yan-Hong Huang[MSFT] (yhhuang_at_online.microsoft.com)
Date: 05/05/04


Date: Wed, 05 May 2004 01:52:45 GMT

Hello Jose,

For this question, please refer to this KB artile:
"INFO: Implementing Impersonation in an ASP.NET Application"
http://support.microsoft.com/?id=306158

You can refer to the "Impersonate a Specific User for All the Requests of
an ASP.NET Application" part in this article.
1) Grant the "Act as part of the operating system" privilege to the ASPNET
account (the least privileged account). In this way, you can grant right in
a special location and then undoimpersonate it when finished.
2) Change the account that the Aspnet_wp.exe process runs under. However,
this may not what you want.

Specially, you can Impersonate a user in code according to the other two
methods in that KB article. Please try them and let us know whether it
works for you.

Does that answer your question?

Best regards,
Yanhong Huang
Microsoft Community Support

Get Secure! ¨C www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.



Relevant Pages

  • Re: Sql Reporting Serviced - > ASP.NET ACCESS DENIED!
    ... The account you are logging in to when on the server doesn't have the ... do you have <Impersonate> set to True? ... > Exception Details: System.UnauthorizedAccessException: Access to the path ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: How to use WindowsPrincipal properly??
    ... > If you want to check if the user is in the local computers security group ... > used by the general public you have to use Basic Authentication of course. ... You can logon a set account ... > WindowsIndentity which is then used to Impersonate. ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • RE: Impersonate
    ... saving a Excel document in ASP.NET webapplication, ... Regarding on the problem you mentioned, I think the account is the first ... You should either impersonate through the web.config setting or use code. ... Microsoft MSDN Online Support Lead ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Impersonating Users
    ... i'm not sure about the cert store impl in NT, ... > running the service as Local System Account, ... > CERT_SYSTEM_STORE_CURRENT_USER fails to find the cert. ... > //Logon to user acount and Impersonate. ...
    (microsoft.public.platformsdk.security)
  • Re: SetPassword access denied
    ... Developer's Guide to Directory Services Programming". ... administrator who is delegated admin rights on that OU. ... the same account logged in interactively on the same box can execute the ... I also wonder why you impersonate in code rather than having the service ...
    (microsoft.public.windows.server.active_directory)