1

There is a server iis site asp.net, which is twisted in a domain. There is a file of the share that is not in the domain, with authorization by login and password.

A Task: This share should be used to save user files there, keeping them there and to see again through asp.net.

Already tried and did not work:

NetworkCredential theNetworkCredential = new NetworkCredential(@"username", "password");
CredentialCache theNetCache = new CredentialCache();
theNetCache.Add(new Uri(@"\\computer"), "Basic", theNetworkCredential);
string[] theFolders = Directory.GetDirectories(@"\\computer\share");

While working on the test machine. But apparently uses some special port that get blocked on work server.

How to provide user name and password when connecting to a network share - connects a network drive, and work is not entirely correct.

Community
  • 1
  • 1
trilobit
  • 39
  • 5
  • Silly question--is the web server on the same network as the computer you're trying to access? I hate to have to ask that, but you know. Less silly question--"apparently uses some special port that get blocked on work server," is that not your answer? If there are firewall or FS security settings that forbid this from happening, your attention needs to be given to them. If it's working in dev, this probably isn't completely a programming question. – Matthew Haugen Apr 10 '15 at 06:18

0 Answers0