views:

79

answers:

4

I have an application which does not read ANY files from the local disk or does not try to write anything.

It runs perfectly on the local filesystem, but it needs to run on a few 100 workstations, so I put it on a share on a Win2003 server.

But when I try to start it on a XP workstation from the UNC:

system.io.fileloadexception

What can be the issue here?

+7  A: 

The issue is that the XP machine is likely running an earlier version of .Net 2.0. Up until 3.5 SP1 it was a violation of CLR security policies to run a .Net application from an UNC share. To do so you must tweak the CAS (Code Access Security) policy on the local machine. Starting with 3.5SP1 this requirement was removed.

More Details:

JaredPar
Thank's I suggested the sysadmin to upgrade to the latest .NET version, I hope this will solve the issue!
Rogier21
+1  A: 

Only applications on the local file system have full trust to run. Try following the steps on this site:

http://dotnetdud.blogspot.com/2009/01/how-to-give-file-share-fulltrust.html

Joel Etherton
+1  A: 

.Net code access security might be one of reasons. You can adjust it in thru control panel and change the settings for "Local intranet" zone. The best solution is to create a custom policy, however.

naivists
+1  A: 

it is because of limited permissions. as far as i remember, if you go to explorer and find that exe, right click on it, you will see tab for extending permissions for app.

Andrey