DirectoryInfo UNC-path

G

glfrustum

Hi,

is there a "workaround" for the following problem that occurs on .NET
2.0:

DirectoryInfo someDir = new
DirectoryInfo(@"\\server.sub.domain.net\folder");
FileInfo[] someFiles = someDir.GetFiles("*.html");

On 1.1 this works fine, but version 2.0 it gives
************** Exception Text **************
System.IO.IOException: The network path was not found.

at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)

If I replace name from UNC path with IP address or "short name" like
\\server\, also 2.0 version starts to work.
 

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

Top