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

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Dwaine (dwainew_at_cox.net)
Date: 02/16/04


Date: 16 Feb 2004 15:53:35 -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?
    ... I got stumpped on this a while back and used a workaround that involved the "same local username/pwd on both servers" method. ... IUSR_Machinename) doesn't have access to this 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? ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Server Mngt- Backup and Monitor and report Broken after SP2 in
    ... On the backup question the tab says directory, not virtual directory. ... On the monitoring question. ... I select Maintenance on Server Tools. ... Configuration Wizard to enable monitoring, reporting, and alerts. ...
    (microsoft.public.windows.server.sbs)
  • new backup server
    ... I've had the configuration and pricing set ... comments on my choice of tape changer, or comments on issues related to ... I have a number of hand-me-down Sun Enterprise 250 servers. ... Amanda seems to be flexible enough that I can just ...
    (SunManagers)
  • Re: OWA has stopped giving graphical mailbox, I just get a text listing of all folders
    ... first there was no application set, therefore the configuration button was ... scripts, then it got worse and now all I get a Windows logon prompt, asking ... If I go to services there is not a NNTP service, but in Exchange ... > It might be caused by corruption of the Exchange virtual directory data, ...
    (microsoft.public.windows.server.sbs)
  • Re: Exchange 2000 - Domain Controller Failover - could not send or
    ... > ESM DSAccess tab as Global Catalog Servers. ... clients could not send or receive email. ... >>> Enterprise Configuration to the second DC and still no luck. ...
    (microsoft.public.exchange2000.active.directory.integration)