ADO DOT NET Posted December 29, 2007 Posted December 29, 2007 Hi, I want to catch CantStartSingleInstanceException exception. But I don't know where should I do this? It's not in form load. Because no code will cause this exception to occur. Anyone able to help me please? Thanks. Quote
Administrators PlausiblyDamp Posted December 29, 2007 Administrators Posted December 29, 2007 Can they be caught in the UnhandledExceptionEvent? Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
ADO DOT NET Posted December 29, 2007 Author Posted December 29, 2007 No, it does not work. You know, if you simply create a single instance application and run it, then run another instance, if you have some firewall like ZoneAlarm and it blocks the access of 2nd instance, this error occurs. I tested but could not catch it in the UnhandledExceptionEvent Quote
Administrators PlausiblyDamp Posted December 29, 2007 Administrators Posted December 29, 2007 If you don't handle this exception does your application crash? In other words are you sure it is getting raised (I'm only asking because my setup here doesn't have a local firewall so I can't force this to happen and there is no way I'm installing ZoneAlarm on a working pc just to try this out ;)). Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
ADO DOT NET Posted December 29, 2007 Author Posted December 29, 2007 Dear PlausiblyDamp, thanks for taking the time to help me:) I have snapshots of the problem here. If I press debug, I will see that CantStartSingleInstanceException occurred. I can find the related page on MSDN: http://msdn2.microsoft.com/en-us/library/microsoft.visualbasic.applicationservices.cantstartsingleinstanceexception.aspx But this page does not have a sample on how to use it and I really am confused how and where to catch this exception? Also, Merry Christmas :D Quote
Administrators PlausiblyDamp Posted December 30, 2007 Administrators Posted December 30, 2007 If you hit debug does the call stack show where the exception was raised? Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
ADO DOT NET Posted January 1, 2008 Author Posted January 1, 2008 Nothing! :( I don't know what to do :( Please help meeeeee :(( Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.