Application won't launch from network

B

Bob L.

Hi everyone,

I have two small applications I have written that I am trying run from a
network directory. Both applications have a dependency on another assembly
(.dll), and I have .NET security wide open. One application is dependent on
an interop assembly (Interop.IWshRuntimeLibrary.dll), and it works fine. The
other application depends on three assemblies that I have written, and
although the executable starts successfully, as soon as any one of the
dependent assemblies attempt to load, I get the following error:

"Application has generated an exception that could not be handled."

Both applications work great when launched from my local drive (Windows
2000). Any help would be great.

Thanks,
Bob L.
 
P

Prasanna Padmanabhan

Maybe the framework is throwing a SecurityException
(System.Security.SecurityException)? I think this is due to the code access
security feature in .NET.
 
B

Bob L.

I'm a little dubious of security being the culprit, for three reasons:

1) I have opened up absolutely every security option that .NET allows.
2) One app works and the other does not. If security was an issue, I would
think that both apps would fail.
3) The error message says that it is an exception that can not be handled,
while security exceptions are able to be handled
 
N

Nick Malik [Microsoft]

This is most often caused because the system cannot find the dll that it
expects to call.

When you are running your app from the network, are all of the dependent
DLLs either in the GAC or in the directory where the executable are located,
or do some of your dependencies live on the hard drive?

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
 
A

AlexS

I think you have security issue there. Check if >net allows you to launch
from your network location

HTH
Alex
 
B

Bob L.

Everything is in the same folder (no GAC), but I did find a clue - If I
don't use strong names, everything works great off the network. As soon as I
recompile using strong names, it blows up with a security error, even though
my security settings are set to "Grant assemblies unrestricted access to all
security permissions". I am testing the URL membership condition using the
syntax file://server/folder/*.

This problem is extremely easy to reproduce by just creating an executable
with one button that makes a call to a DLL. If the DLL has a strong name,
it's toast.

- Bob
 

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