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

From: Dwaine (anonymous_at_discussions.microsoft.com)
Date: 02/17/04


Date: Mon, 16 Feb 2004 16:06:05 -0800

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 directory
(./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 (say
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... Dwaine



Relevant Pages

  • How to get system.IO access to UNC resources using virtual directory configuration SERVER SIDE?
    ... involved the "same local username/pwd on both servers" method. ... configuration works fine, as the Client-Side can browse ./Images just ... resource for security purposes. ... How can I get to the resources of a virtual directory from the server ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Recent Criticism about Ruby (Scalability, etc.)
    ... they have also invested in a ton of servers dedicated to running ... of software development with that of hardware upgrades. ... Actually, when people talk about something scaling well or poorly, ... ever-increasing inclusion of some resource. ...
    (comp.lang.ruby)
  • Re: Trust not working beyween 2 Windows 2003 Domains
    ... If you want to establish trust relationship for the purpose of resource ... the servers where the resource reside ... I have created a 2 way trust between the 2 domains, ... When a member server wants to add local groups from the opposing domain to ...
    (microsoft.public.windows.server.active_directory)
  • Re: Same Disk Resource for multiple virtual servers
    ... It is possible to use the same physical disk resource for multiple virtual ... servers but doing so might defeat the whole purpose of using virtual ...
    (microsoft.public.windows.server.clustering)
  • Re: Process Resource Manager (PRM) on HP UNIX
    ... Oracle has RAC and a product called Database Vault for this purpose. ... Oracle has it's own Resource Manager in the database. ... There will be two servers and databases can be set ... HP UNIX PRM is not based on UNIX process priority instead based on ...
    (comp.databases.oracle.server)