Access UNC path from a network drive

A

anders

I have write a program that Copy/Move files on a unc path's
The program works fine, i it is stored on a local disk eg. C:\
If i store the program on a networkdrive it stopps working,
eg. don't show anyting.
The UNC path to files i like to COPY or MOVE don't changes
just the location of my C# program.

I have added full rights i VisualStudio to the program but
it don't seem to work

Any hint ?

best regards
Anders
 
F

Frank

Are you getting something that reads like "no permission exception" or
something when your app tries some file access?
Normally Assemblies, like your program or any other .net assembly, get
a FullTrust permission Set when its executed from any local drive
unless they specifically ask for less rights. The .Net Security Model
doesn't give out FullTrust permission sets to assemblies that are
executed from a network drive so your App would lack permissions to do
file access and things like that.

There is a .Net Configuration Editor unter Control Panel-
Administrative Tools where you can see what permission sets are
handed out to Assemblies.
 
J

Jay Riggs

I have write a program that Copy/Move files on a unc path's
The program works fine, i it is stored on a local disk eg. C:\
If i store the program on a networkdrive it stopps working,
eg. don't show anyting.
The UNC path to files i like to COPY or MOVE don't changes
just the location of my C# program.

I have added full rights i VisualStudio to the program but
it don't seem to work

Any hint ?

best regards
Anders



Anders,

Check out this article (and its second part) that describes the
problem Frank mentions and has a couple solution options:

http://www.codeproject.com/KB/dotnet/Using_MSI_or_a_strong_nam.aspx

-Jay
 

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