How can I access the file system from aspx page without ASPNET user ?

Last post 12-20-2006 2:16 PM by jose_jimenez. 1 replies.

Sort Posts:

  • How can I access the file system from aspx page without ASPNET user ?

    12-20-2006, 1:15 PM
    • Loading...
    • sebabittel
    • Joined on 12-20-2006, 5:37 PM
    • Rafaela (SF) - Argentina
    • Posts 1

    My aspx page implements a DLL (maded with VB6). DLL offer a method to search on file system, all TIF files.
    Each folder has its own security, and each user access to the folder where it has permission

    I set my site with windows integrated security, and add to my web.config the elements
    <identity impersonate="true" />

    Then, I add to aspx page a line code for show the current user
    WindowsIdentity.GetCurrent().Name

    ... and add to DLL a method to show me the current user.

    Result: Aspx page show me the current user account correctly (example: MyDomain\username). But DLL show the ASPNET user account.

    Can I run a proccess or access a COM object with the current user ? Or allway take a ASPNET account to access to file system ?

    THANKS (and sorry by my english)

  • Re: How can I access the file system from aspx page without ASPNET user ?

    12-20-2006, 2:16 PM
    Answer

    I'm not sure I have the answer  you want, but why not implement the .Net DirectoryInfo object to use the GetFiles method.  This will allow you to discover all the TIF files without having to use a COM object at all.

    --JJ

    Please mark as answered if I helped.
    I don't answer personal emails unless I know you or of you. Feel free to post in the forum to get an answer from me.
Page 1 of 1 (2 items)
Microsoft Communities
Page view counter