?
Solved

Application has generated an exception that could not be handled

Posted on 2006-05-22
10
Medium Priority
?
4,931 Views
Last Modified: 2008-01-09
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.

0
Comment
Question by:cehrnow
9 Comments
 

Author Comment

by:cehrnow
ID: 16734547
btw. deployment PC mentioned is Windows NT Server but also see exactly the same problem on another deployment PC running Windows 2000.
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 16738788
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
 
LVL 8

Expert Comment

by:doobdave
ID: 16741625
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
Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

 

Author Comment

by:cehrnow
ID: 16749464
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
 
LVL 96

Expert Comment

by:Bob Learned
ID: 16750487
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
 

Author Comment

by:cehrnow
ID: 16750532
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
 

Author Comment

by:cehrnow
ID: 16758814
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
 

Author Comment

by:cehrnow
ID: 16758845
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
 

Accepted Solution

by:
GranMod earned 0 total points
ID: 16968231
PAQed with points refunded (500)

GranMod
Community Support Moderator
0

Featured Post

Get quick recovery of individual SharePoint items

Free tool – Veeam Explorer for Microsoft SharePoint, enables fast, easy restores of SharePoint sites, documents, libraries and lists — all with no agents to manage and no additional licenses to buy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses
Course of the Month17 days, 2 hours left to enroll

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question