New C# application won't run from Shared drive

M

musosdev

Hi guys

I've just written a new C# application which needs to go on a Shared drive
on our network.

Now, the application works perfectly well from my local C: drive. I've
copied the EXE and the config file and when you double-click the EXE, it
works perfectly.

However, from the shared drive, 2 things happen....

Firstly, I get a security warning ... "The publisher could not be verified."
- I can continue, but I'd like to get rid of this if at all possible?

Then my application crashes, "there was a problem and the application needs
to close". I'm really not sure why this is happening.. as I say, it works
fine when it's not on a network share.

Here is the error signature...

EventType : clr20r3 P1 : artifaxreport.exe P2 : 1.0.0.0
P3 : 4905d285 P4 : mscorlib P5 : 2.0.0.0 P6 : 471ebc5b P7 :
37d0
P8 : b P9 : system.security.security

Can someone help me with why this might be happening!?!

Thanks,


Dan
 
M

Marc Gravell

"caspol".

Code running from your local drive runs with full trust. Code running on
a network drive has local intranet trust (i.e. much less, often not
enough to run successfully).

IIRC, there was a patch recently (3.5SP1 maybe?) that means that mapped
shares run as full trust - i.e. "f:" will work, but "\\foo\bar" won't
(even if they are the same place).

The other options:
* use caspol (at each client) to assign trust to the network share
and/or that application
* use ClickOnce to deploy the app (still residing on the network share)

Of all of these, ClickOnce is the simplest, most reliable, and frankly
the best way: you should probably be using it.

Marc
 

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