.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

BUG: Exceptions propagation behaviour is different if the application is run inside visual studio.

Posted By:      Posted Date: September 03, 2010    Points: 0   Category :.NET Framework
I'm going crazy. I have a simple application: one form, one module. The project is configured to start from sub main. The module contains: Module Module1 Public Sub main() Try Application.Run(New Form1) Catch ex As Exception MessageBox.Show(ex.Message, "Fatal Error") End Try End Sub End Module Form1 contains one button and one event: Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Throw New Exception("operation aborted") End Sub End Class I run the application inside visual studio... A new instance of Form1 is shown. I click the button. The exception is propagated to the sub main and the messagebox is shown. RIGHT!... I close visual studio (without recompiling anything) and I run the SAME .exe that was generated before... A new instance of Form1 is shown. I click the button. The exception IS NOT propagated to the main sub and a dialog appears: System.Exception: operation aborted in textexception.Form1.Button1_Click(Object sender, EventArgs e) in C:\Documents and Settings\Lino Barreca\Documenti\Visual Studio 2008\Projects\textexception\textexception\Form1.vb:riga 4 in System.Windows.Forms.Control.OnClick(EventArgs e) in System.Windows.Forms.Button.OnClick(EventArgs e) in System.Windows.Forms.ButtonBase.OnKeyUp(KeyEventArgs kevent)

View Complete Post

More Related Resource Links

Error while setting up application on Win7 using Visual Studio.NET 2003


Hi All,

Getting the below error while setting up application on Win 7 using visual studio.NET 2003.


cannot find the components for communiacting with the front page server extensions...


I understand by the error, i need to install Front page server extension, but not able to figure how to install using IIS 7.5.

I had XP machine with IIS 5.1, able to find the option.


Need your help in resolving this.




Toolbox: Easy File Backup, Exploring Files And Folders Inside Visual Studio, Multiple Monitor Softwa


If the responsibility for creating, managing, and executing routine backups is yours, these tools will make it easier. Also see how you can browse folders and files from inside Visual Studio.

Scott Mitchell

MSDN Magazine May 2009

Performance: Find Application Bottlenecks with Visual Studio Profiler


We will introduce you to the Visual Studio Profiler by walking through a sample performance investigation, pinpointing code inefficiencies in some sample applications.

Hari Pulapaka and Boris Vidolov

MSDN Magazine March 2008

Crystal Reports: Add Professional Quality Reports to Your Application with Visual Studio .NET


Crystal Reports for Visual Studio .NET provides a comprehensive reporting solution for .NET developers that is thoroughly integrated with both the Visual Studio .NET IDE and the .NET Framework. Crystal Reports supports ADO.NET, XML Web Services, and ASP.NET server controls and caching. It also integrates seamlessly with the Visual Studio .NET Server Explorer, toolbox, and design environment. It has a rich programming model and flexible options for customizing and deploying reports. These major features and others covered here take the drudge work out of data representation in your own applications.

Andrew Brust

MSDN Magazine May 2002

Tip #107 Did you know . How to improve debugging performance for MVC2 application in Visual Studio 2

VS2010 Ultimate included IntelliTrace functionality by default.  IntelliTrace captures events (e.g. exceptions), and can affect performance of debugging. The typical performance hit is about 5% in the default mode (collection can be increased to...(read more)

Chapter 3: SharePoint Developer Tools in Microsoft Visual Studio 2010 (Inside SharePoint 2010)

Learn what's new with the SharePoint developer platform from experts on Microsoft SharePoint Foundation 2010 and Microsoft SharePoint Server 2010.

Visual Studio asp C#.NEt web application publishing tweet/status on Twitter/Facebook

Hi guysIf you could give me some guidelines It would mean a lot to me. what type of authentication I use, how to do  id from localhost, how to modify web.config file etc 

Strange lockup in multithreaded application - Visual Studio debugger unable to break execution

Multithreaded C# application, Visual Studio 2008, Windows XP, Framework 3.5 SP1. This application is a little crawling utility to download pages from our website, extract some information and upload it into a database. It runs for a while, then somewhere between about 10 minutes and an hour in, it locks up totally, user interface and all. When I try to "break all" in the VS debugger, I get a message "cannot break execution". Now the confusing thing about this is that since the UI was locking up, I thought that some deadlock must be happening on the main UI thread. So I started stripping out any code and locks that were being acquired on that thread that might cause problems ... until there was nothing left. Even with the window simply spawning a bunch of worker threads on create, then totally forgetting about them and giving no reverse access, the lockup still happens, the UI still freezes and VS still can't break the execution.   There are 10 threads to do the crawling, and one each to do the processing and the uploading. The next thing I did was take out the uploading entirely to remove the possiblity of a deadlock in the SqlClient libraries. No difference. So now, the only things that could be really deadlocking the main thread that I can see are the centrally created HTTPWebRequest objects I'm using. WebRequest.create is supposedly thread safe

Cannot Show Visual Studio Tools For Application Editor

Hi All,I was wondering if someone would be kind enough to assist me with the following issue?Using Visual Studio 2008 and editing an SSIS project. Using a data flow task, create a script component, when I attempt to edit the script I get the following errorCannot show Visual Studio Tools for Applications EditorAdditional Information:The System Cannot Find The File Specified (Exception from HRESULT: 0x80070002) (EnvDTE80)I've gone through the following articlehttp://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=367845with no success and I also reinstalled SQL Server 2008 and VS 2008 still with no successRunning on Windows XP SP 2SQL Server 2008 SP 1VS 2008 SP 1Any ideas would be greatly appreciatedRegardsJohn

Is it possible to use a frameset in a Visual Studio 2010 Asp.NET MVC application

A reply to the following post says not:http://forums.asp.net/p/1563210/3879572.aspxIf it is possible, can anyone point me at an example?I'll hasten to add that I've not yet tried this yet - I'm just looking for advice as to if it's possible and if so, the best approach. For instance if using a frameset, is it recommended to have a master page?TIA,Mike

Create web application in Visual Studio 2010

Hi,I have a directory with sources of a web application (developed with visual studio 2008) without solution's files.Now I want to create a new web application in visual studio 2010, whit the existing sources.how can I do it?

how to convert web application to website in visual studio 2008

Dear all,                      I have to integrate web application into website. What are the changes i have to do. I need information very urgently. can any one help here. 

Visual studio converting from website to web application

I have followed the MSDN instructions in converting an VS 2008 Website project into a VS 2008 Web application project. I am running across the following two issues, let me know if anybody has any suggestions:1) When using the "Convert to Web Application" option, it shows an error "Generation of designer file failed. Unknown server tag XXXX"Most of the server controls are registered in web.config with:<add tagPrefix="UControls" namespace="APP_NAME.UI.WebApp.Utils" assembly="APP_NAME.UI.WebApp"/>How can I make the web application converter recognize the web.config settings?2) After the convertion above, when I try to compile the project I get errors of the form "Name 'CETest' Is not decaled". These are classes from an external library in the code behind files. The code behind files on the old website did not use "Imports" but again relied on web.config "<add namespace="APP_NAME.Business.Entities"/>"Is it possible to not use imports in the code behind file for web application ilike n the website project? Or is there other alternatives? Or will this be fixed if #1 is fixed?Any suggestions would be appreciated.

How to add Sharepoint dll reference to Windows Forms application project in Visual Studio 2010?

Hi,I am using Windows Forms application template in Visual Studio 2010 Beta. I created this for some R & D work. Now I am using Sharepoint object model in application. When I am trying to add Sharepoint dll reference from .NET tab, I can not see Windows Sharepoint Services there Which was available in Visual Studio 2005.Also If I am add this sharepoint dll from ISAPI folder (14 Hive), it is added succesfully, but it is not taking actually in project and showing me an error during running mode that theError 12 The type or namespace name 'SharePoint' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) Please suggest me how to add Sharepoint dll reference in Windows forms application in Visual Studio 2010?

Cannot launch application compiled in Visual Studio 2010


Hi all,

I have compiled and created an .msi file to install a WPF desktop application.

It installs fine but will not launch. The error is below.

The instllation machine is running windows 7, 32bit. Could it be that I am compiling a 64bit application. If so how do i change this in VS?

Cheers, Shane

Error Log:


Application: DTFStampingClient.DTFDesktop.exe

Framework Version: v4.0.30319

Description: The process was terminated due to an unhandled exception.

Exception Info: System.Reflection.TargetInvocationException


at System.Windows.Markup.WpfXamlLoader.Load(System.Xaml.XamlReader, System.Xaml.IXamlObjectWriterFactory, Boolean, System.Object, System.Xaml.XamlObjectWriterSettings, System.Uri)

at System.Windows.Markup.WpfXamlLoader.LoadBaml(System.Xaml.XamlReader, Boolean, System.Object, System.Xaml.Permissions.XamlAccessLevel, System.Uri)

at System.Windows.Markup.XamlReader.LoadBaml(System.IO.Stream, System.Windows.Markup.ParserContext, System.Object, Boolean)

at System.Windows.Application.LoadBamlStreamWithSyncInfo(System.IO.Stream, System.Windows.Markup.ParserContext)

at System.Windows.Application.LoadComponent(System.Uri, Boolean)

at System.Windows.Application.DoStartup()

at System.Windows.Applicati

Windows Application Migration - Visual Studio 2008 to 2010 - The "GenerateResource" task failed unex


I hav a windows forms application built using VS 2008 which I am trying to migrate to VS 2010 & .net 4.0.

I got this nasty bug and found that it is due to the embedded images in the resource file.

<!-- [if gte mso 10]> <mce:style>

The "GenerateResource" task failed unexpectedly. System.InvalidOperationException: The security state of an AppDomain was modified by an AppDomainManager configured with the NoSecurityChanges flag.

I tried the following solutions suggested in various forums.

I added the < NetFx40_LegacySecurityPolicy enabled

Cannot Publish Web Application in Visual Studio 2010 - Error: Get service of SVsBuildManagerAccessor


When attempting to publish a web application from Visual Studio 2010, I receive the following error:

Get service of SVsBuildManagerAccessor fails

I'm using Visual Studio 2010 Ultimate (x86) on Windows 7 Professional (x64).

I've attempted publishing the web app via FTP and Local File System and receive the above mentioned error.

I've searched the internet for the error but have found no solutions.

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend