Solved

VB.NET App runs on some computers and not others.

Posted on 2007-03-20
6
547 Views
Last Modified: 2013-11-07
I have written a VB.net 2005 app.  It installs and runs on some computers but on others it returns the following error message immediately:

WindowsApplication1 has encountered a problem and needs to close. We are sorry for the inconvenience.

This tells me nothing.  Is there a way to find out where the conflict is?  I have Try-Catch statements on everything but it isn't getting that far.
0
Comment
Question by:jamesrbarnes
6 Comments
 
LVL 5

Accepted Solution

by:
jef06 earned 175 total points
ID: 18757405
We need more information, try to log error you can use Log4net very easy to use.

You can try to catch the ThreadException and log the exception, in the Program class.

Here in c#

Application.ThreadException += new ThreadExceptionEventHandler(Application_ThreadException);
void Application_ThreadException(object sender, ThreadExceptionEventArgs e)
        {
            Log.LogError("Application_ThreadException", e.Exception);
        }
0
 
LVL 10

Assisted Solution

by:ericwong27
ericwong27 earned 175 total points
ID: 18757481
Try to run that application with administrator credentials first. Probably due to restricts access on some PC.
0
 
LVL 6

Assisted Solution

by:Jon_Raymond
Jon_Raymond earned 150 total points
ID: 18758265
Did you check the application log?
0
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 

Author Comment

by:jamesrbarnes
ID: 18763342
Jon Raymond,

I am not familiar with the application log.  Can you tell me what I am looking for?

Jim
0
 
LVL 5

Expert Comment

by:jef06
ID: 18763481
A log help you trace information, to know what is happening in your program. look at http://logging.apache.org/log4net/ and setup that up. Then you will be able to see what is wrong.
0
 
LVL 6

Expert Comment

by:Jon_Raymond
ID: 18764988
On a Windows OS go to administration tools and look for EVENT VIEWER. There are numerous logs there. Check the application log and system log
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

821 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