Framework configuration

  • Thread starter Thread starter Rufus
  • Start date Start date
R

Rufus

I have a vb.net program that runs locally on my local
machine where it was developed and on various other
machines but fails to run on some other machines. I think
this is a framework conguration issue involving full
trust am i right and how do i resolve this issue
 
In what way is it failing? Do you have an exception trace?

Is the application installed on the failing machine's hard disks or is it being run over a network?

Regards

Richard Blewett - DevelopMentor
http://staff.develop.com/richardb/weblog

nntp://news.microsoft.com/microsoft.public.dotnet.framework/<[email protected]>

I have a vb.net program that runs locally on my local
machine where it was developed and on various other
machines but fails to run on some other machines. I think
this is a framework conguration issue involving full
trust am i right and how do i resolve this issue
 
As i try to run the program I get an application popup
error Common language runtime debugging services:
Application has generated an exception that could not be
handled.
the exe is copied to the failings machines hdd and run
from there, i do not have an exception trace
Thank you
-----Original Message-----
In what way is it failing? Do you have an exception trace?

Is the application installed on the failing machine's
hard disks or is it being run over a network?
Regards

Richard Blewett - DevelopMentor
http://staff.develop.com/richardb/weblog
nntp://news.microsoft.com/microsoft.public.dotnet.framewor
 
Does the message box tell you what the the type of the exception is (SecurityException? FileNotFoundException? FileLoadException?)? Maybe you could put in some diagnostics to the application so you can capture the exception trace.

Does the application use any assemblies other than the system one? Maybe its failing loading a subordinate assembly that hasn't been copied to the other machine - maybe you code use the fusion log viewer (fuslogvw.exe) to trap any assembly resolution failures.

If the application is being run off the other machines hard disk its unlikely to be an issue about partial trust because, unless they have being playing with their machine CAS settings the assembly will be running with fulltrust.

Oh, just checking - the failing machines do have the .NET runtime on them, yes?

Regards

Richard Blewett - DevelopMentor
http://staff.develop.com/richardb/weblog

nntp://news.microsoft.com/microsoft.public.dotnet.framework/<[email protected]>

As i try to run the program I get an application popup
error Common language runtime debugging services:
Application has generated an exception that could not be
handled.
the exe is copied to the failings machines hdd and run
from there, i do not have an exception trace
Thank you
 
Just to add to Richard's excellent answer:

Your application has generated an exception that you, as the programmer, did
not handle.

If you use a try-catch block in your main body of code, you are likely to
catch this error. You can save a stack trace to a file, or display it in a
window, fairly easily (Exception.ToString() returns a nice listing)

Once you have put this into your code, compile in Debug mode and place the
EXE onto a machine that is likely to trigger a failure.

Then you will have a very good idea of where in your code the exception
occurs, since the error message will contain the names of files and line
numbers... very nice.

Please let me know if you would like to elaborate further. (and tell me
what language you are writing in).

--- Nick
 
Back
Top