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

How to get the size of the sharded server which is currently used in a mongoDB sharded cluster

mongodb sharding

I have a sharded cluster which is set up , Since my data is seamlessly growing , I need to keep monitoring the size of data and add new shards to the cluster .