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
- Next message: Steve: "ASP.NET Exception on hosted server"
- Previous message: harrismax_at_nospam.com: "Putting a hole into forms authentication?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
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
- Next message: Steve: "ASP.NET Exception on hosted server"
- Previous message: harrismax_at_nospam.com: "Putting a hole into forms authentication?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|