Results 1 to 10 of 10

Thread: [RESOLVED] Impersonate

Hybrid View

  1. #1

    Thread Starter
    Learning .Net danasegarane's Avatar
    Join Date
    Aug 2004
    Location
    VBForums
    Posts
    5,853

    Resolved [RESOLVED] Impersonate

    I am doing excel automation in asp.net project. For this I need to impersonate and I am using

    Code:
     <identity impersonate="true" userName="DomainName\dana" password="Password"/>
    For this MS Article , I am adding my name to the Users Group of Local computer. But I am getting error that Could not load assmebly. But I add my username as Admin/Power users, the page works well.

    And my question is For Impersonate, what is the User type ?
    Last edited by danasegarane; Mar 2nd, 2010 at 02:16 AM.
    Please mark you thread resolved using the Thread Tools as shown

  2. #2
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Impersonate

    Hey Dana,

    Can you show the exact error message that you are getting?

    Also, can you show the code that is failing?

    Gary

  3. #3

    Thread Starter
    Learning .Net danasegarane's Avatar
    Join Date
    Aug 2004
    Location
    VBForums
    Posts
    5,853

    Re: Impersonate

    Hi Gary,
    The exact Error message is
    Code:
    Access denied for the user xxx to access  Tempory Internet files
    Please mark you thread resolved using the Thread Tools as shown

  4. #4
    Hyperactive Member
    Join Date
    Sep 2006
    Location
    India
    Posts
    310

    Re: Impersonate

    i am also using the same.... i am using power user login to access the folder. I never get such error. If i enter wrong password or different user then i got access denied error.
    http://msdn.microsoft.com/en-us/libr...18(VS.71).aspx
    Sagar
    VB6, VB.net,C#,ASP, ASP.net MSSQL, MYSQL

  5. #5

    Thread Starter
    Learning .Net danasegarane's Avatar
    Join Date
    Aug 2004
    Location
    VBForums
    Posts
    5,853

    Re: Impersonate

    Quote Originally Posted by sagarpassion View Post
    i am also using the same.... i am using power user login to access the folder. I never get such error. If i enter wrong password or different user then i got access denied error.
    http://msdn.microsoft.com/en-us/libr...18(VS.71).aspx
    Thanks for the Reply

    Currently I gave the Power Users Access only. But the Client is reluctant to Power Users. He says only Give the Users Role
    Please mark you thread resolved using the Thread Tools as shown

  6. #6

    Thread Starter
    Learning .Net danasegarane's Avatar
    Join Date
    Aug 2004
    Location
    VBForums
    Posts
    5,853

    Re: Impersonate

    Quote Originally Posted by sagarpassion View Post
    i am also using the same.... i am using power user login to access the folder. I never get such error. If i enter wrong password or different user then i got access denied error.
    http://msdn.microsoft.com/en-us/libr...18(VS.71).aspx
    But in the Link there is no role information ?
    Please mark you thread resolved using the Thread Tools as shown

  7. #7
    Hyperactive Member
    Join Date
    Sep 2006
    Location
    India
    Posts
    310

    Re: Impersonate

    The identity of the process that impersonates a specific user on a thread must have the "Act as part of the operating system" privilege. By default, the Aspnet_wp.exe process runs under a computer account named ASPNET. However, this account does not have the required privileges to impersonate a specific user. You receive an error message if you try to impersonate a specific user. This information applies only to the .NET Framework 1.0. This privilege is not required for the .NET Framework 1.1.

    To work around this problem, use one of the following methods:
    Grant the "Act as part of the operating system" privilege to the ASPNET account (the least privileged account).

    Note Although you can use this method to work around the problem, Microsoft does not recommend this method.
    Change the account that the Aspnet_wp.exe process runs under to the System account in the <processModel> configuration section of the Machine.config file.
    -----------
    http://support.microsoft.com/kb/306158#2
    Sagar
    VB6, VB.net,C#,ASP, ASP.net MSSQL, MYSQL

  8. #8

    Thread Starter
    Learning .Net danasegarane's Avatar
    Join Date
    Aug 2004
    Location
    VBForums
    Posts
    5,853

    Re: Impersonate

    Just now I checked the
    Code:
    "Act as part of the operating system"
    type.Its not working. Only Power users and Admin works
    Please mark you thread resolved using the Thread Tools as shown

  9. #9
    Fanatic Member
    Join Date
    Jul 2006
    Location
    Anchorage, Alaska
    Posts
    545

    Re: Impersonate

    Like what has already been pointed out:

    You may need to give access to ASPNET, IUSR_ComputerName, and/or IWAM_ComputerName read/write permissions to the tmp and Temp folders.

    As what was also stated, posting the code would help determine a bit more for you.
    Please RATE posts, click the RATE button to the left under the Users Name.

    Once your thread has been answered, Please use the Thread Tools and select RESOLVED so everyone knows your question has been answered.


    "As I look past the light, I see the world I wished tonight, never the less, sleep has come, and death shall soon follow..." © 1998 Jeremy J Swartwood

  10. #10

    Thread Starter
    Learning .Net danasegarane's Avatar
    Join Date
    Aug 2004
    Location
    VBForums
    Posts
    5,853

    Re: Impersonate

    This worked for me
    Please mark you thread resolved using the Thread Tools as shown

Posting Permissions

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



Click Here to Expand Forum to Full Width