views:

93

answers:

2

Hi!

I am having a hard time on this one, I have a folder over the network with public access (no credential restriction). I am trying to do a File.Exist or Directory.Exist and I keep on having a exception.

Can someone tell me the good way to do IO over the network.

EDIT 1 FOR DETAILS:

if i do execture => \agoodip\Public\test.txt I get the file etc etc

In my code it look like a basic

Directory.Exist(@"\\agoodip\Public") or File.exist(@"\\agoodip\Public\test.txt")

The exception I get is Path not found.

EDIT 2 :

I am using Silverlight 3, Is there any security pattern to be aware of to lookup file on the network?

Thanks!

A: 

You need to begin your UNC path with two backslashes ("\\") if it refers to a network path rather than a local path.

BlueMonkMN
it is already with "\\" i edit my post
Polo
+1  A: 

I don't believe that is going to work for you. Silverlight doesn't allow arbitrary access to the file system or shares. Silverlight runs within a sandbox environment so you have restricted access to the file system.

anthonyv
I dont try to lookup file system... I juste want to see the picture on my server and be able to upload by the LAN Network not by ftp or other...
Polo