c# launch .exe from a remote folder

I made a .exe program in c# and locally works fine... but if I put the .exe into a remote path, when I launch, it gives error.. I use framework 2.0 how can I solve this?


edit: this is the error:

and if I launch the program locally, it works fine ( I copied all the folder with directories...)


That is "code access security"; a random network share has very little trust from the core engine by default. With 2.0, your options are:

  • use a ClickOnce instead (execute the .application, not the .exe)
  • use caspol.exe (on every client) to tell it to trust the share
  • don't deploy that way (i.e. use an installer)

With some of the later service packs (it might be SP 2, I can't remember), mapped shares get more trust, i.e. \\server\share won't have enough trust by default, but h: (which is mapped to \\server\share) will run.

My preference would be the ClickOnce deployment since it works on all versions.

Need Your Help

Python Overwriting List Element

python list append

Is there a quick and easy way that is not computationally expensive to overwrite an element in a list corresponding to an element in another list (of the same length)?

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.