locked
Impersonate user in web.config RRS feed

  • Question

  • User-1250458480 posted

    Hi, i am using the getdirectories and it seems from other posts that if i am using this on a server and map the drive on the server then iam going to have to impersonate a user account so that i can access the mapped drive. I have never heard of this before today and was wondering if anybody has some input on how to do this. thanks

    Monday, March 3, 2008 9:01 AM

Answers

  • User1564875471 posted

    If you used the GetDirectores Methods of the System.IO.DirectoryInfo Class,

    I don't think you need to Use Impersonation ,

    you may need that if you used  My.Computer.FileSystem.GetDirectories Method .

    you should used the First Method for ASP.Net . 

     

    anyway , if you want to apply impersonation , 

    try this

    Under System.Web Configuration section in web.config , add the following

     

        <identity impersonate="true" />

      

    hope it helps 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, March 3, 2008 11:09 AM
  • User-1804440612 posted

    I think u need to embed user id, password in below way:(Place it under <configuration>--><system.web> block)
    <identity impersonate="true" userName="shawpnendu" password="xxxxxxxx"/>

    U can override asp user by impersonation. Hope it will helpful for u.

    MARK AS ANSWER if its helpful for you.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, March 3, 2008 1:21 PM

All replies

  • User1564875471 posted

    If you used the GetDirectores Methods of the System.IO.DirectoryInfo Class,

    I don't think you need to Use Impersonation ,

    you may need that if you used  My.Computer.FileSystem.GetDirectories Method .

    you should used the First Method for ASP.Net . 

     

    anyway , if you want to apply impersonation , 

    try this

    Under System.Web Configuration section in web.config , add the following

     

        <identity impersonate="true" />

      

    hope it helps 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, March 3, 2008 11:09 AM
  • User-1804440612 posted

    I think u need to embed user id, password in below way:(Place it under <configuration>--><system.web> block)
    <identity impersonate="true" userName="shawpnendu" password="xxxxxxxx"/>

    U can override asp user by impersonation. Hope it will helpful for u.

    MARK AS ANSWER if its helpful for you.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, March 3, 2008 1:21 PM