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

D

Dwaine

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,710
Latest member
bernietqt

Latest Threads

Top