473,387 Members | 1,504 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

.NET 2.0 app crashes without normal verbose dialog??

I've got a .NET 2.0 app that works quite well on all of my test boxes.

However, at the client's site, it crashes with

'has encounted a problem' basic dialog. No useful info.

I've yet to see a .NET app crash like this, without the verbose dialog that will
tell me the line # of the problem (the app was compiled in debug mode).

What steps can I take to track this down?

The app uses some .NET dlls for remoting, and a COM objects.

But, it crashes before even loading a window.

I'm looking into adding some ThreadExceptionEventHandler and
UnhandledExceptionEventHandler's to the app.

But, I'd like to try to resolve this without throwing too many different
versions at my client, who is not very computer savy and is probably as
frustrated as I am.

I've never encountered this before, in all the years I've worked with .NET.
--
Thanks in advance, Les Caudle
Jun 5 '07 #1
12 3526
On Jun 5, 10:59 pm, Les Caudle <DotNetWann...@newsgroup.nospamwrote:
I've got a .NET 2.0 app that works quite well on all of my test boxes.

However, at the client's site, it crashes with

'has encounted a problem' basic dialog. No useful info.

I've yet to see a .NET app crash like this, without the verbose dialog that will
tell me the line # of the problem (the app was compiled in debug mode).

What steps can I take to track this down?

The app uses some .NET dlls for remoting, and a COM objects.

But, it crashes before even loading a window.

I'm looking into adding some ThreadExceptionEventHandler and
UnhandledExceptionEventHandler's to the app.

But, I'd like to try to resolve this without throwing too many different
versions at my client, who is not very computer savy and is probably as
frustrated as I am.

I've never encountered this before, in all the years I've worked with .NET.
--
Thanks in advance, Les Caudle
May be a problem with .Net framework installation. Uninstall framework
and VS(if installed) completely and reboot. Re-install everything.and
try. I don't see any other way.

Jun 5 '07 #2
I had her 'repair' .NET 2.0.

We tested with a simple .NET app that opens a window, so .NET seems to be
installed ok.

The only problem is with my more complex app, which crashes.

Guess I'll modify to see about any untrapped exceptions.

Thanks, Les Caudle

On Tue, 05 Jun 2007 11:10:01 -0700, Aneesh Pulukkul <an******@gmail.comwrote:
>On Jun 5, 10:59 pm, Les Caudle <DotNetWann...@newsgroup.nospamwrote:
>I've got a .NET 2.0 app that works quite well on all of my test boxes.

However, at the client's site, it crashes with

'has encounted a problem' basic dialog. No useful info.

I've yet to see a .NET app crash like this, without the verbose dialog that will
tell me the line # of the problem (the app was compiled in debug mode).

What steps can I take to track this down?

The app uses some .NET dlls for remoting, and a COM objects.

But, it crashes before even loading a window.

I'm looking into adding some ThreadExceptionEventHandler and
UnhandledExceptionEventHandler's to the app.

But, I'd like to try to resolve this without throwing too many different
versions at my client, who is not very computer savy and is probably as
frustrated as I am.

I've never encountered this before, in all the years I've worked with .NET.
--
Thanks in advance, Les Caudle

May be a problem with .Net framework installation. Uninstall framework
and VS(if installed) completely and reboot. Re-install everything.and
try. I don't see any other way.
--
Thanks in advance, Les Caudle
Jun 5 '07 #3
It seems that is the security issue or one of your app files missing.

--
cheers,
RL
"Les Caudle" <Do***********@newsgroup.nospamwrote in message
news:9e********************************@4ax.com...
>I had her 'repair' .NET 2.0.

We tested with a simple .NET app that opens a window, so .NET seems to be
installed ok.

The only problem is with my more complex app, which crashes.

Guess I'll modify to see about any untrapped exceptions.

Thanks, Les Caudle

On Tue, 05 Jun 2007 11:10:01 -0700, Aneesh Pulukkul <an******@gmail.com>
wrote:
>>On Jun 5, 10:59 pm, Les Caudle <DotNetWann...@newsgroup.nospamwrote:
>>I've got a .NET 2.0 app that works quite well on all of my test boxes.

However, at the client's site, it crashes with

'has encounted a problem' basic dialog. No useful info.

I've yet to see a .NET app crash like this, without the verbose dialog
that will
tell me the line # of the problem (the app was compiled in debug mode).

What steps can I take to track this down?

The app uses some .NET dlls for remoting, and a COM objects.

But, it crashes before even loading a window.

I'm looking into adding some ThreadExceptionEventHandler and
UnhandledExceptionEventHandler's to the app.

But, I'd like to try to resolve this without throwing too many different
versions at my client, who is not very computer savy and is probably as
frustrated as I am.

I've never encountered this before, in all the years I've worked with
.NET.
--
Thanks in advance, Les Caudle

May be a problem with .Net framework installation. Uninstall framework
and VS(if installed) completely and reboot. Re-install everything.and
try. I don't see any other way.

--
Thanks in advance, Les Caudle

Jun 5 '07 #4
User installed it on a network share, which caused the problem, a security
violation.

Still usure why it didn't fail with the normal dialog - as it is very hard to
guess at this remotely with so little information.

Regards, Les Caudle

On Tue, 5 Jun 2007 16:51:43 -0600, "Egghead" <robertlo@NO_SHAW.CAwrote:
>It seems that is the security issue or one of your app files missing.
Jun 5 '07 #5
Hi Les,

Can you tell me the type of your .Net application, is it console, Winform?
Normally, the verbose error dialog will only show in the .Net Winform
application. .Net console application will not show verbose error dialog.
Please refer to the link below to understand the default behavior of
unhandled error in different type of .Net applications:
http://msdn.microsoft.com/msdnmag/is...T/default.aspx

However, in .Net Winform, if the .Net unhandled exception is generated
before Application.Run() method is called, the verbose error dialog will
not show, the behavior will be same as console application, which pops a
'has encounted a problem' dialog in a clear machine. Also, if the exception
is generated in a non-GUI worker thread, it will behave like console
application.

You may register AppDomain.UnhandledException event yourself to be notified
the error in the current AppDomain. In this event, you may use
Environment.StackTrace to examine the stace trace of this unhandled
exception. This will help you to examine the cause of this problem.

If you want to perform an intensive debugging for this problem in the
client machine, I would recommend you to installed a light-weight windbg on
the client machine to catch this unhandled exception, see my blog entry
below for the configuration and details:
"How to debug application crash/hang in production environment?"
http://blogs.msdn.com/msdnts/archive...pplication-cra
sh-hang-in-production-environment.aspx

Additionally, based on your last reply, it seems that your problem is
caused by .Net Code Access Security check. You may run "caspol.exe -s off"
in "Visual Studio 2005 Command Prompt" to turn off the .Net2.0 CAS check
temparily. If this error goes away, it means that it is caused by CAS
check. If you have determined that the problem is caused by CAS, you may
follow the following steps to evaluate the permission set and code group of
your application assembly:

You can open ".Net Configuration 2.0" tool from "Administrative tools" in
Control Panel. Click "Runtime Security Policy" node the left panel. Then
click "Evaluate Assembly" link in the right panel.

In the popup dialog, input your assembly path, and click next to evaluate
your assembly permission set. Normally, it should be Unrestricted.

Please paste any details here for further analysis, thanks.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Jun 6 '07 #6
Jeffrey - it is a windows form app. It uses several .NET remoting DLLS, and it
might be possible that they are somehow called (as they are set up in the config
file) and cause the behavior where there is no useful dialog.

Thank you for the detailed response. I think I have a handle on it now.

I was just stressed a bit as the 1st thing my client saw when trying to run the
software was this crash, and I had no idea she'd copied the code to a network
share.

Regards, Les Caudle

On Wed, 06 Jun 2007 03:29:58 GMT, je***@online.microsoft.com ("Jeffrey
Tan[MSFT]") wrote:
>Hi Les,

Can you tell me the type of your .Net application, is it console, Winform?
Normally, the verbose error dialog will only show in the .Net Winform
application. .Net console application will not show verbose error dialog.
Please refer to the link below to understand the default behavior of
unhandled error in different type of .Net applications:
http://msdn.microsoft.com/msdnmag/is...T/default.aspx

However, in .Net Winform, if the .Net unhandled exception is generated
before Application.Run() method is called, the verbose error dialog will
not show, the behavior will be same as console application, which pops a
'has encounted a problem' dialog in a clear machine. Also, if the exception
is generated in a non-GUI worker thread, it will behave like console
application.

You may register AppDomain.UnhandledException event yourself to be notified
the error in the current AppDomain. In this event, you may use
Environment.StackTrace to examine the stace trace of this unhandled
exception. This will help you to examine the cause of this problem.

If you want to perform an intensive debugging for this problem in the
client machine, I would recommend you to installed a light-weight windbg on
the client machine to catch this unhandled exception, see my blog entry
below for the configuration and details:
"How to debug application crash/hang in production environment?"
http://blogs.msdn.com/msdnts/archive...pplication-cra
sh-hang-in-production-environment.aspx

Additionally, based on your last reply, it seems that your problem is
caused by .Net Code Access Security check. You may run "caspol.exe -s off"
in "Visual Studio 2005 Command Prompt" to turn off the .Net2.0 CAS check
temparily. If this error goes away, it means that it is caused by CAS
check. If you have determined that the problem is caused by CAS, you may
follow the following steps to evaluate the permission set and code group of
your application assembly:

You can open ".Net Configuration 2.0" tool from "Administrative tools" in
Control Panel. Click "Runtime Security Policy" node the left panel. Then
click "Evaluate Assembly" link in the right panel.

In the popup dialog, input your assembly path, and click next to evaluate
your assembly permission set. Normally, it should be Unrestricted.

Please paste any details here for further analysis, thanks.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
================================================= =
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
================================================= =
This posting is provided "AS IS" with no warranties, and confers no rights.
--
Thanks in advance, Les Caudle
Jun 6 '07 #7
Ok, if you need further help, please feel free to feedback, thanks.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Jun 7 '07 #8
I came across a similar 'problem'. It turned out to be that in the initial
load of the form there was a call to a config file that I had not included in
the build, once this was placed in the correct location the application
loaded correctly. I seem to recall it threw an unhandled error.

From this point on I now include full try{} catch{} blocks whenever. Also
use multiple catch{} blocks to enable better debugging information.

Simon

Jun 7 '07 #9

"Les Caudle" <Do***********@newsgroup.nospamwrote in message
news:92********************************@4ax.com...
Jeffrey - it is a windows form app. It uses several .NET remoting DLLS,
and it
Jeffrey said that it isn't considered a Forms app until Application.Run is
called. And certainly a startup permissions problem would happen before
that.
Jun 7 '07 #10
Hi Les,

How about this issue now? Have you managed to resolve it? If you still need
any help or have any concern, please feel free to feedback, thanks.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Jun 12 '07 #11
Jeffrey - no worries. Once I realized she'd instaled on a network drive, I knew
what to do.

Thanks, Les Caudle
Jun 12 '07 #12
Hi Les,

Thank you for confirming the status. Ok, if you need further help, please
feel free to post, I will work with you, thanks.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Jun 13 '07 #13

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

Similar topics

4
by: Pascal | last post by:
Hello, I've a function like this: def myfunction(data, verbose = False): dothis... if verbose: print 'I do this' dothisother if verbose: print 'I do this other' ...
1
by: George | last post by:
I have an application in Access97 which operates very normal on pc's with Win98 S.E. as an operating system.When I install the same application on a PC wich runs Windows 2000 Server (and...
9
by: hhh12347 | last post by:
FolderBrowserDialog crashes on my Windows 2000 computer. Here is a C# test program: using System; using System.Windows.Forms; public class TestForm : Form { FolderBrowserDialog...
5
by: Benoit Martin | last post by:
Hello, I am not expecting to get THE fix for my problem but I need help to get started in the right direction In one of my classes, I instantiate an object inherited from the...
1
by: rogsonl | last post by:
The latest versoin of Microsoft Visual Studio 2005 (Version 8.0.50727.42 RTM.050727-4200 Microsoft .NET Framework Version 2.0.50727) crashes very often in debug. 1. If you modify a case statement...
1
by: powersof2 | last post by:
Hello, I need some help with SQL Server 2000 SP4. I've been using the developer product for a few years now on my PC with very few problems. Today when I try to start up Enterprise Manager, it...
0
by: Steven Spits | last post by:
Hi, I'm creating an embedded control for IE in VS 2005. For testing purpose, I have left the user control completely blank and only changed the background color. When navigating to the page...
1
by: =?Utf-8?B?SmVycnk=?= | last post by:
I've created an assembly that, because of 3rd party controls, requires full trust to run. This is no problem when running from the local harddrive, but when the application is run from a network...
2
by: qhimq | last post by:
Hi, I was wondering if anyone encountered the following error with GetOpenFileName(). The open dialog opens, and I hover my mouse over a file. The dialog shows the detailed info of the file...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
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...

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.