How to get system.IO access to UNC resources using virtual directory configuration SERVER SIDE?

Discussion in 'ASP .Net Security' started by Dwaine, Feb 17, 2004.

  1. Dwaine

    Dwaine Guest

    I got stumpped on this a while back and used a workaround that involved the "same local username/pwd on both servers" method. Now I'd like to find a cleaner method...

    The setup
    A webApp (lets say C:\WebApp\) with a subordinate virtual director
    (./Images) using an UNC path (e.g. \\ImageServer\Images\ ) to a remote directory, using pre-defined credientials configured via IIS manager or directoryservices using UNCUserName and UNCPassword. The configuration works fine, as the Client-Side can browse ./Images just fine using the configured credentials. programmatic acces from code-behind is another story..

    The problem
    in code-behind, using the system.io namespace objects require the physical path (\\ImageServer\Images\). But the current user (sa
    IUSR_Machinename) doesn't have access to this (or any other remote) resource for security purposes. Opening a file from the raw UNC bypasses the virtual directory's configuration and attempts access using the current user context

    How can I get to the resources of a virtual directory from the server side? Am I missing something with system.IO or maybe a totally different namespace

    any help or comments (no matter how brutal) will be greatly appreciated... Dwain
     
    Dwaine, Feb 17, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dwaine
    Replies:
    0
    Views:
    550
    Dwaine
    Feb 16, 2004
  2. Steve Singer
    Replies:
    0
    Views:
    540
    Steve Singer
    Feb 15, 2005
  3. Jeff Johnson [MVP: VB]

    Access to non-virtual-directory UNC paths from IIS 6.0

    Jeff Johnson [MVP: VB], Jul 27, 2004, in forum: ASP .Net Security
    Replies:
    1
    Views:
    438
    Tom Kaminski [MVP]
    Jul 27, 2004
  4. Colin Nicholls

    Impersonation and UNC network resources

    Colin Nicholls, Mar 8, 2005, in forum: ASP .Net Security
    Replies:
    11
    Views:
    370
    Colin Nicholls
    Mar 11, 2005
  5. Replies:
    5
    Views:
    315
Loading...

Share This Page