|
-
May 1st, 2007, 11:37 AM
#1
Thread Starter
New Member
[RESOLVED] Deployment and Exception Handling
I have an application which has a "global" exception handler that runs at the very begining of the application (see code below). Everything runs fine in the IDE, however, when I install the application on computers the "global" exception never fires. I am using the VS.NET 2005 Setup Project to create the setup files which are installed on pc's. It would seem that there is some problem with the deployment version of the application, but I dont know for sure.
Any idea's how to fix the problem?
Code:
Try
Application.Run(LogInForm)
Catch eData As DataException
MessageBox.Show(eData.Message, "ADO.NET Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
Catch eSql As SqlException
MessageBox.Show(eSql.Message, "SQL Server Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
Catch eSystem As Exception
MessageBox.Show(eSystem.Message, "General System Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
-
May 1st, 2007, 03:49 PM
#2
Re: Deployment and Exception Handling
If you run the exe run on your development machine does the event fire?
-
May 1st, 2007, 04:53 PM
#3
Re: Deployment and Exception Handling
Make sure you set to "Release" instead of "Debug" when compiling the app before deploying it.
-tg
-
May 2nd, 2007, 08:19 AM
#4
Thread Starter
New Member
Re: Deployment and Exception Handling
I tried to run the .exe on my development machine and it didn't fire.
I also tried setting both the application and deployment configurations to release instead of debug.... still no luck.
Any other suggestions? Are there any other preq's it needs other than the defaults?
-
May 2nd, 2007, 12:13 PM
#5
Thread Starter
New Member
Re: Deployment and Exception Handling
I decided to try a different way to handle the exceptions. I used something similar to what is show at this website. Seems to be working alright after I deploy the application.
Thanks for the help!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|