Application has generated an exception that could not be handled

Have 2 similar VB.NET applications both working okay on development PC.

On target PC both deployed using deployment projects, App1 works okay but App2 gives unhandled exception error. Appears to crash before InitializeComponent()(ie. try/catch around it sees nothing). Have tried deleting , rebuilding etc, to no avail.

cehrnowAsked:
Who is Participating?
 
GranModConnect With a Mentor Commented:
PAQed with points refunded (500)

GranMod
Community Support Moderator
0
 
cehrnowAuthor Commented:
btw. deployment PC mentioned is Windows NT Server but also see exactly the same problem on another deployment PC running Windows 2000.
0
 
Bob LearnedCommented:
1) Obvious question:  Is the .NET framework installed on the target machine when trying to execute the application?

2) .NET version?

3) Exact exception message.

Bob
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
doobdaveCommented:
Hi there,

One circumstance where I've seen this happen is when there some files that your application needs that have not been deployed ot the target machine.
Typically this occurs when the missing files are interop assemblies, but can happen with other missing dlls.

Please ensure you're deploying all the required files with your app.

David
0
 
cehrnowAuthor Commented:
Bob,
1. App1 works okay which is a veru similar .NET application, so yes.
2. 1.1
3. Application has generated an exception that could not be handled.
Process id=0xd95 (3484), Thread id=0xdec(3564)

David
Just cannot see any extra files required by App2 (which doesn't work) and App1 (which does work) which is really why I'm baffled.

Thanks
Cliff
0
 
Bob LearnedCommented:
Cliff,

There is a registry setting that controls JIT debugging:

http://msdn2.microsoft.com/en-US/library/2ac5yxx6.aspx

HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework\DbgJITDebugLaunchSetting

The value for mine is 2.  Check the value on the machine, and set it accordingly.

Bob
0
 
cehrnowAuthor Commented:
VS is not installed on target PC but have added DbgJITDebugLaunchSetting key and set to 2.
At the error message when clicking 'Cancel' gives: 'Registered JIT Debugger is not available'.


0
 
cehrnowAuthor Commented:
Have resolved this.

Didn't realise that declaration 'Dim oUtilsDB As New cUtilsDb' would be executed prior to InitializeComponent() which was confusing matters.
Straight-forward (untrapped!) error existed in Public Sub New() of cUtilsDb.

Thanks

0
 
cehrnowAuthor Commented:
Sorry, should also add that..the first part of cUtilsDb looks for a registry key value to help setup the database connection. This already existed on working machine via a different application but first-time install on second machine didn't have it. Yet another situation made to try us but in hindsight (as ever) reason was obvious.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.