.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

Parallel Debugging: Debugging Task-Based Parallel Applications in Visual Studio 2010

Posted By:      Posted Date: August 21, 2010    Points: 0   Category :ASP.Net

In Visual C++ 10 and the Microsoft .NET Framework 4, Microsoft is introducing new libraries and runtimes to significantly ease the process of expressing parallelism in your code base, together with new tool support for performance analysis and debugging of parallel applications. In this article, you will learn about debugging support in Visual Studio 2010, much of which is focused on task-based programming models.

Stephen Toub, Daniel Moth

MSDN Magazine September 2009

View Complete Post

More Related Resource Links

Debugging Tips with Visual Studio 2010

This is the twenty-sixth in a series of blog posts I'm doing on the VS 2010 and .NET 4 release. Today's blog post covers some useful debugging tips that you can use with Visual Studio.  My friend Scott Cate (who has blogged dozens of great VS tips and tricks here ) recently highlighted these to me as good tips that most developers using Visual Studio don't seem to know about (even though most have been in the product for awhile).  Hopefully this post will help you discover them if you aren't already taking advantage of them.  They are all easy to learn, and can help save you a bunch of time. Run to Cursor (Ctrl + F10) Often I see people debugging applications by hitting a breakpoint early in their application, and then repeatedly...(read more)

Visual Studio 2010 is generating an error when i try to debugging !! ( some dll dependencies error)


Error    1   :  Could not load file or assembly 'file:///C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\website8\fc57c8f4\9cd69aba\App_global.asax.f2udfgci.dll' or one of its dependencies. The system cannot find the file specified.      



Server Error in '/WebSite8' Application.

Could not load file or assembly 'file:///C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\website8\07dcfacd\cdec788c\App_global.asax.thpappgt.dll' or one of its dependencies. The system cannot find the file specified.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IO.FileNotFoundException: Could not load file or assembly 'file:///C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\we

Pin features while debugging in Visual Studio 2010.


Visual Studio 2010 is one of most awesome tool to debug Microsoft.NET related code. I have found one more interesting feature with the Visual studio 2010. That is called Pin Data Tip feature. This features can be very useful when you are debugging the code with loops. Normally when you debug with the code if you want to know the value of variable then you have to put your cursor on that variable and tool tip will show the values of that variable. The pin feature will pin that tool tip and you don't have to put mouse over there. Let's take a simple example to examine that feature. Below is the code for that. I have created a simple for loop and I am printing variable value with Response.Write on asp.net page. Below is the code for that.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Blogging
    public partial class _Default : System.Web.UI.Page
        protected void Page_Load(object sender, EventArgs e)
            for (int i = 1; i <= 20; i++)

Now let's put the break point on for loop like following and then start debugging via pressing F5.

HttpHandler works with Visual Studio Development Server debugging, but not otherwise


Hi all,

I'm new to HttpHandlers.  I am writing an HttpHandler that reads uploaded files directly from the request stream to provide progress that can be queried using an AJAX request.  For large files, this seems to be faster than having ASP.NET load the file contents into Request.Files and then streaming the file from there to wherever it goes (Linq to SQL into a VARBINARY column in an SQL Server database.)

My HttpHandler works perfectly when I'm debugging using the Visual Studio Development Server, but doesn't work otherwise.  The application pool for this application in IIS 7 is set to run in Classic Mode, and the Handler Mappings screen in IIS says that I must manage managed handlers in system.web/httpHandlers. 

I set up in my applications Web.config file.

<add verb="GET,POST" path="*.upload" type="Namespace.For.UploadHandler, AssemblyForUploadHandler"/>

It works great, so long as I don't debug with the "Use Local IIS Web server" option.

What else do I need to do to get this to work?


Basic Instincts: Multi-Targeting Visual Basic Applications in Visual Studio 2010


Visual Studio 2010 lets you create applications that target versions of the Microsoft .NET Framework from 2.0 to 4, and each step in between. We take a look at how multi-targeting works in Visual Studio today, and explain how you should approach multi-targeting in your projects.

Spotty Bowles

MSDN Magazine June 2010

Windows With C++: Visual C++ 2010 And The Parallel Patterns Library


The Parallel Patterns Library allows you to more easily take advantage of parallelism. See what this and other Visual C++ 2010 features are in store.

Kenny Kerr

MSDN Magazine February 2009

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)

How to enable debugging in Visual Studio 2008 upgraded from Visual Studio 2005?

Hi,  I have upgraded a Visual Studio 2005 Web Site in a 32 bit server to Visual Studio 2008 maintaining the same 2.0 framework in a 64 bit server with Windows 2008 R2 Server.  The Web Site has several class libraries.  After porting to Visual Studio 2008 2.0 Framework using the Upgrade Wizard, I found that I was unable to hit a break point in the Project code behind files while I was able to in the class libraries.  The bin folder has the dlls and the corresponding pdb files for the class libraries. I did start the Web site as an Administrator and made sure whole bunch of IIS7 properties are properly set.  I tried to rebuild the solution as a Web Application in Visual Studio 2008 and gave up that approach as I faced hundreds of error messages pointing to missing references and namespaces inspite of adding whole lot of references and namespaces to the Web pages.   Appreciate your help in solving this puzzle.thanks,Dallas Developer  

Debugging Issues in Windos 7 & Visual Studio 2008

I have Strange issue.I have Windows 7 and Visual Studio 2008.When I try to debug a web application by inserting BreakPoint. It will go fine for few seconds or couple of  minutesAfter that the debugging stops automatically. But were else if did not insert Break point in the application the webpage is alright. (I can see debugger still running)Does any one have come across the same issue please shed me some light.Thanking you in advanceNathanI had the same issue in the XP after installing IE 8. The below line solved the issue but this wont work for windows 7Add a DWORD value called TabProcGrowth with a value of 0

create task edit form issues for sharepoint 2010 workflow using visual studio 2010

I use infopath 2007 created a task edit form and I use VS 2010 to create a sequential workflow.I want to use the custom tash edit form in the workflow.The problem I got is the InfoPath form doesn't get deployed to sharepoint. I'm able to upload the infopath form to sharepoint though central admin app. here is the element.xml :<Elements xmlns="http://schemas.microsoft.com/sharepoint/">  <Workflow     Name="WorkflowProject4 - Workflow1"     Description="My SharePoint Workflow"     Id="e6aa6cdb-667f-456a-b216-7639a1dcd3c7"     CodeBesideClass="WorkflowProject4.Workflow1.Workflow1"     CodeBesideAssembly="$assemblyname$">    <Categories/>    <MetaData>      <AssociationCategories>List</AssociationCategories>            <Task0_FormURN>urn:schemas-microsoft-com:office:infopath:TaskForm:-myXSD-2009-12-10T22-33-23</Task0_FormURN>      <StatusPageUrl>_layouts/WrkStat.aspx</StatusPageUrl>    </MetaData>  </Workflow></Elements>and here is the feature1.template.xml<Feature xmlns="http://schemas.microsoft.com/sharepoint/">  <Properties>    <Property Key="GloballyAvailable" Value="true" />    <Property Key="RegisterForms" Value="*.xsn"/>  </Properties></Feature>anything

How add custom form field in workflow task using visual studio 2010



I need to create a simple workflow using Visual Studio 2010.

Workflow having following activities:

1. Create a task assign to workflow initiator. This task have one dropdown field with two choice (Approved,Rejected). 

2. Wait for the task change.

3. In Task edit form, only title and custom drop-down field are visible. User need to select from one of the choice and complete the task.

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

Visual Studio - Debugging Stops Working


We keep having problems with the Visual Studio debugger (2005 and 2010).

It just stops hitting breakpoints and the only way to fix the problem is to close every open VS instance.

After all instances are closed, we can open a project in Visual Studio and the debugging breakpoints work again.

Any comments would be appreciated. 

SQL/CLR Debugging hangs on Visual Studio 2003 and SQL 2005


I am unable to debug code from a SQL Database Project using the CLR.  After VS 2005 does the auto-attaching to the SQL server, VS hangs until I tell it to stop debugging.  Many others have reported this as a similar problem, however this only seems to affect me when I'm connecting to specific servers.  Specifically it seems to be remote connections.  When I attempt to connect to my SQL 2005 Developer Edition "locally" I get right through and can debug.

From my VS output window:


Auto-attach to process '[1688] [SQL] gx620-eric' on machine 'gx620-eric' succeeded.

Debugging script from project script file.



No rows affected.

(0 row(s) returned)

Finished running sp_executesql.

The thread 'gx620-eric [59]' (0x1730) has exited with code 0 (0x0).

The thread 'gx620-eric [59]' (0x1730) has exited with code 0 (0x0).

The thread 'gx620-eric [59]' (0x1730) has exited with code 0 (0x0).

The thread 'gx620-eric [59]' (0x1730) has exited with code 0 (0x0).

The program '[1688] [SQL] gx620-eric: gx620-eric' has exited with code 0 (0x0).


When I attempt to connect to a remote server running Enterprise Edition, it hangs after a successful attach. 


Multiple Approvers Parallel Approval using Visual Studio Workflow


I have created a Custom Visual Studio WF. I have used the Replicator control and set the executionType to Parallel.As Parallel excution replicator will set the index to last. So after searching i found I need to create custom Sequence Activity and we need to place the activities there.

In my custom Sequence Activities I have placed like this


  • Create Task with ContentType
  • OnTaskCreated
  • While
  • OnTaskChanged
  • OnTaskCompleted
While contain Code Condition. I placed the custom activity in my workflow. Task is created successfully. But when the task get changed, the OnTaskChanged event is not fired. Anybody please help me.







Debugging in Visual Studio 2008 Second level form


I'm using Visual Studio 2008 in developing VB.NET windows application , this application contains MDI_PARENT form and many MDI_CHILDS forms.

when i run F5 (start debugging) , and stop in BREAK-POINTS and need to edit the code , it allows me to edit in MDI-PARENT form code , but when i try to edit the MDI-CHILD code it gave me the following message :

changes are not allowed when the debugger has been attached to an already running process.....

I went to:

Tools -> Options -> Debugging -> Edit and Continue

then i disable "Enable Edit and Continue" remove the Checkbox before it . then when i tried to edit it gave me the following error

cannot currently modify this text in the editor. it is read-only

so, how could I enable Edit and Continue in MDI-CHILDS forms ???


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