views:

173

answers:

1

Hello, got a interesting problem. I placed a c# .net .exe file on a network share. If i try to

Start->Run: \\hostname\test.exe

my software starts properly and everything is working.

We also have a DNS Alias set for this computer, so if I try to run my program by:

Start->Run: \\mydnsalias\test.exe

My programm will cause an error message: "test has encountered a problem and needs to close..."

On client .net 2.0, 3.0, 3.5sp1 is installed. There is a full trust caspol for the network share (set with dnsalias).

+3  A: 

Caspol "tweaks" are a bit of a pain to deploy robustly. IMO, the best way to run an exe off the network is in a way that the core framework isn't going to object to in the first place.

Since you have 3.5 SP1, one simple way is to map the share to a drive. IIRC, with this service pack, "j:\test.exe" will be trusted, even though "j:" is mapped to "\hostname", and "\hostname\test.exe" might not be trusted.

The other approach is ClickOnce; you publish to the network share and run "test.application" instead. This also gives you options like local-copy with auto-update, file extension handling, etc.

Marc Gravell
If i map the share (by dnsalias) i get the same error message. Its a problem with dnsalias only. If i use \\hostname everythign works fine, but as soon as i use \\mydnsalias it causes the error... SO i think this is no caspol failure.
Hans99
+1 for ClickOnce - solves this kind of problem straight away...
ck
ClickOnce is not an opinion for me in this case.
Hans99