473,850 Members | 2,111 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Unhandled Exception Not Being Caught

I'm still looking into this problem, but to summarize:

I wrote a very simple Windows Service in VB.NET, as part of a larger
application. I created a deployment project for the application the
resulting MSI explicitly installs the service. I've ran the installer
on 4 machines at our office (2 are running Windows 2000 Pro, 1 is
running XP Pro, and the other is running Windows 98). On each of these
machines, the installation goes without a hitch and the application
runs fine (the Windows Service basically runs a timer with a 1-minute
interval -- each minute, it checks a registry value to see whether or
not it should run a particular EXE, using the
System.Diagnost ics.Process.Sta rt(string) overload, i.e. it's a very
simple task scheduler so to speak). The service runs great on the 4
previously-mentioned machines, and when it decides it's time to run the
other EXE, it works without a hitch. However, when we installed the
application on a customer's machine (running Windows 2000 pro), the
service runs fine until it comes time to fire off this other EXE. At
that point, an UnhandledExcept ion is quietly logged in the Event Log -
the EXE it is supposed to fire off starts and then stops almost
instantaneously . I should note that the EXE which this scheduler
service fires off is a .NET application, and it is in the same
directory as the scheduler service's EXE. The problem is:

a) the message in the Event Log is extremely unhelpful: it amounts to
saying that an UnhandledExcept ion occurred and that it (supposedly)
occurred in the EXE which the scheduler service attempts to fire off.
There is no explanation of *what* the exception actually is.

b) the EXE which the scheduler service fires off has a Sub Main as its
startup object. I wrapped all the code in Sub Main in one big
Try...Catch e As Exception block, to provide a quick-and-dirty
"catch-all" mechanism, thinking I could catch this mysterious unhandled
exception. The strange thing is that catching Exception doesn't catch
the unhandled exception!! Do I need to explicitly add an
AppDomain.Unhan dledException handler or something similar (I'd try that
now, but I'm not at work) ? In any event, I don't understand how the
exception still goes unhandled, even when I explicitly catch the base
Exception class in Main.

Again, this issue can only be reproduced on our customer's machine (go
figure...) and we've been having a heck of a time seeing what else
could be causing the issue. On that note, we did notice that this app
we're installing shows up twice in the .NET Wizard's "Fix This App"
list of currently-installed managed apps. One entry shows up for the
current version (which is installed to Program Files), and another
entry shows up for an older version of the application (back then it
was also installed to a different directory). The problem here is that
the second entry shouldn't be showing up: the previous version was
completely uninstalled and we can't find any dangling references to it
anywhere, not on the hard drive, not in .config files, not in the
Registry, nowhere...I'm digressing from my original question, but does
anyone know how to remove the duplicate entries and for that matter
*how* that list of managed application is built, i.e. where it pulls
the data from which it builds the list? We think this duplicate entry
issue could be the real problem, since we've encountered this issue
before with other .NET applications.

--
Mike S

Jul 27 '06 #1
0 1467

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
2324
by: RalphTheExpert | last post by:
I'm getting different behavior if my code is running under the debugger or not. I have modified Winmain to look like this: // Copyright (C) 2002 Microsoft Corporation // All rights reserved. // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER // EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
5
5757
by: Lucvdv | last post by:
Can someone explain why this code pops up a messagebox saying the ThreadAbortException wasn't handled? The first exception is reported only in the debug pane, as expected. The second (caused by thread.Abort()) is reported twice: once in the debug window, and once through the message box. Is it because the thread was sleeping when the exception occurred?
5
3317
by: Samuel R. Neff | last post by:
When you have an unhandled exception in vb.net how do you view the exception information in the debugger? In C# the debugger creates a local variable that points to the exception and you can view it in one of the windows (autos or locals, don't remember which). That doesn't appear to be the case with vb.net. I also tried using the command window to inspect "Err" but that gave nothing useful (always empty).
0
1994
by: Colmeister | last post by:
I recently read Jason Clark's excellent article on Unhandled Exceptions (http://msdn.microsoft.com/msdnmag/issues/04/06/NET/default.aspx) and have attempted to incorporate the features he talks about in a new application I'm writing. However, when I try to use ThreadStart to do some work in a separate thread from my GUI, the methods Jason described don't seem to catch the exception. Take the following source code: Public Class...
5
3408
by: Simon Tamman {Uchiha Jax} | last post by:
Now this is bugging me. I just released software for a client and they have reported an unhandled stack overflow exception. My first concern is that the entirity of the UI and any threaded operations are all within Try Catches to help me locate the problem and the origination of any problem by specifiying an error code in the "Catch" section. So theoretically this shouldn't have been possible (at which point we all say "yeah,...
0
9895
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
11011
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10666
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10724
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7899
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7071
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5735
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
4140
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3178
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.