Re: access files on a UNC virtual directory

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Rasmus (Rasmus_at_nospam.nospam)
Date: 01/13/05


Date: Thu, 13 Jan 2005 05:39:06 -0800

Thank you for taking the time to explain this to me.

I’ve read the transcript of the webcast- and found it most clarifying in
many areas. But it still don’t help me in this special situation.

To go over it again:

- website MUST run with anonymous access (user IUSER_<MachineName>)
- website user access an aspx page (show.aspx)
- on the aspx page the user fill out 4 input fields (“unc to
fileshare”,”user name” and “password”) with this information and presses the
submit botton.
- The website user is now shown the files and folders on the fileshare as
requested

Code being executed:
DirectoryInfo baseDirInfo = new DirectoryInfo(TextUnc.Text);
FileInfo[] aFileInfos = baseDirInfo.GetFiles();
string sFiles = "";
foreach (FileInfo fileInfo in aFileInfos){
        sFiles += fileInfo.Name;
}

I just can’t seem to understand why, when I have all the necessary login
information, I cannot retrieve the files and folders on the UNC share.

Thanks in advance



Relevant Pages