Forbinde til et UNC share fra en web applikation
Beklager at spg er formuleret på engelsk, men i forstår nok:Basically I want to do the following:
DirectoryInfo baseDirInfo = new DirectoryInfo(@"\\server2\files");
FileInfo[] aFileInfos = baseDirInfo.GetFiles();
string ss = "";
foreach (FileInfo fileInfo in aFileInfos){
ss += fileInfo.Name;
}
But I need a way to supply the username and password – otherwise I’m not
allowed to access the share.
Info:
The web application has anonymous access
No domain
A local user is created on server2
This user has access to share d:\files on server2
