.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

How to get web project to automatically attach to debug process?

Posted By:      Posted Date: October 15, 2010    Points: 0   Category :ASP.Net

In visual studio 2005 (using the Vista OS), I have an asp.net web project. When I debug, I have to manually attach to aspnet_wp.exe.

My project used to automatically attach to this process. How do I get it to automatically attach to it again?

View Complete Post

More Related Resource Links

How do i force SharePoint to open file automatically during check out process?

Currently, when checking out a file (doc., excel, pdf etc.) in Sharepoint, i right click on doc. and click "check out". Then a window pops up and saying " you are about to check out:...." and i choose the option of saving the file in my Local Drafts Folder. The issue is that the file does not open automatically once i click "ok" in pop up window. I have go back to file in SharePoint and click on it again to open it. How do i force SharePoint to automatically open the file, when i go through the check it out process? Thank you all for your feedback.

_CrtIsValidHeapPointer(pUserData) getting thrown in debug mode, /clr Forms project calling custom na

I'm working on a native DirectX11 project where I'm trying to use Windows Forms as a GUI for myself to modify things in the visual environment. I know the native static libraries are stable and not walking through memory since I have an .exe that can run it externally from the clr Form project. _CrtIsValidHeapPointer(pUserData) is getting thrown at runtime and I can see that this has alot to do with atexit and _onexit being called. The stack trace that directly relates to my code looks like the following: > HogsheadEd.exe!`dynamic initializer for 'Hogshead::Core::ResourceLibrary::_prototypes''()  Line 7 + 0x32 bytes C++ This line in code is a static member in a cpp: Vector<IResource*> ResourceLibrary::_prototypes; where Vector<type> is a static instance of custom templated class in one of my native static libraries, IResouce is a pure virtual class, and ResourceLibrary is essentially a singleton with all static members and methods. I've done alot of searching and http://social.msdn.microsoft.com/forums/en-US/vcgeneral/thread/62db4002-4ebc-4a3a-91ec-9fc702db821e/ appears to be very similar to my problem yet anything I try mentioned there does not work for me. I am using Visual Studio 2010 and to be honest I do not know much about debug symbols. This seems to be a solved problem from what I'm

Problem with Debugging - Cannot communicate with the debug host process


I'm trying to run (with debug) an SSIS  project and getting the following error


"Failed to start project


Cannot communicate with the debug host process. The IDtsHost interface is not registered. (Microsoft.DataTransformationServices.VsIntegration)"


It does run if I run without debug.


Any ideas?

Setting process priority on C# 3.5 service project

Hi all,
  I'm working on a windows service that uses WCF with names pipes and Quartz.net to perform process scheduling.  Everything is running well, except I've hit a snag.  I have one process that's quite I/O intensive, and it kills my server while it runs.  Unfortunately, I'm legacied in to some of the architecture, so the process is as optimized as I can get it.  As a result of this, I have 2 questions.

1. Each of my jobs are encapsulated within a class.  Each of these classes are instanciated and run by Quartz in it's own thread.  When the Job starts, I have the following code in the Execute function

  /// <summary>
        /// Called by the <see cref="T:Quartz.IScheduler"/> when a <see cref="T:Quartz.Trigger"/>
        ///             fires that is associated with the <see cref="T:Quartz.IJob"/>.
        /// </summary>
        /// <remarks>
        /// The implementation may wish to set a  result object on the 
        ///             JobExecutionContext before this method exits.  The result itself
        ///             is meaningless to Quartz, but may be informative to 
        ///             <see cref="T:Quartz.IJobListener"/>s or 
        ///             <see cref="T:Quartz.ITriggerListener"

How to I attach a process between two Win Forms apps?

I have 2 winforms apps one running as a Server with a WCF interface and the other the client. I have tried attaching a process just as I do with a Web Forms app but as of yet I cannot get the Win Forms client to step into the Win Forms Server. Can someone provide a step by step?

Visual Studio has insufficient privileges to debug this process


Hello All,

             I am using VS2008 to debug in Windows 2003 server. I got this error message.


Unable to attach to the process. Visual Studio has insufficient privileges to debug this process. To debug this process, Visual Studio must be run as an administrator.


             I checked that my user name is under administrator group.


Edit : I am trying to debug one of my service application. I am able to debug web applications

Unable to start T-SQL Debugging. Could not attach to SQL Server process on


Please help!  I cannot debug CLR procs remotely.  Whenever I try to start debugging in VS2005 I get the error:  Unable to start T-SQL Debugging. Could not attach to SQL Server process on ....  I have clr enabled set to 1 and I have Allow SQL\CLR Debugging set on.  But I continue to get this error.  Any help would be greatly appreciated.



Unable to copy file "obj\Debug\Project.dll" to "bin\Project.dll"


Hi. This is really flustrating. When i compile my WebApplication, it works normally. But when i do refresh in browser, than IIS somehow "locks" that dll file and another compilation ends with this error:

Unable to copy file "obj\Debug\Project.dll" to "bin\Project.dll". The process cannot access the file 'bin\Project.dll' because it is being used by another process.

After restarting application pool in IIS, it's released and i can compile in standard way. I tried use handler.exe from sysinternals and it shows, that w3wp.exe process is using that dll. It's very time consuming before every compilation restart IIS. Any ideas where can be a problem please ?

Microsoft Windows Server 2003 Standard Edition SP2
IIS 6.0 

Microsoft Visual Studio 2005 Professional
Version 8.0.50727.762  (SP.050727-7600)
Microsoft .NET Framework
Version 2.0.50727 SP1
Microsoft Web Application Projects 2005
Version 8.0.50727.762
Microsoft Visual Studio 2005 Professional Edition - ENU Service Pack 1 (KB926601)

How to debug into dll source file from web project


I have web project and window project.Web project reference from window project and I want to debug from web project to source code in window project. Where do I setup to look for debug source code in window project.

I copied all source code from another computer. but on another computer can debug just fine.All that different is where the source file is located. so I think it should have some config in studio that tell where the source file is.

Debug symbols not loaded into any project



Some days ago all of my projects started working crazily - I'm using VS 2010, .NET 4.0, Silverlight 4 SDK, WP7 SDK. The previously compiled code parts can be debugged as they should be, but as soon as I make any change to the observed .cs file all symbols are ignored.

"The breakpoint will not currently be hit. The source code is different from the original version."

However, the compile is successful, moreover the changes in the code can be seen in the debug mode as well (e.g. if i add messagebox.show(...) it works as expected), but I'm unable to debug the project.

This happens to my Silverlight, WPF, WP7 solutions, Web Applications, so everything important. The most annoying thing is that I even reinstalled Visual Studio, the whole .NET Framework 4 Client Profile, but nothing changed.

I don't want to reinstall the whole OS, but this way i'm unable to work:/

Any help / tips appreciated on what to do / what else to reinstall.



Debugging SQLCLR in VS 2010 using attach to process


After reading numerous posts / threads, I still can't get an answer. We have assemblies built in Visual Studio 2008 (.NET 2.0) and could debug them without any issues (on the same server). Since we upgraded to Visual Studio 2010, the "attach to process" does not work and the breakpoints don't get hit.

I've followed numerous workarounds, such as making sure the correct debugger is used by adding a config file to sqlservr.exe, but this did not make a difference.. Articles can be found here: http://webstats.interknack.com/BLOGS/BOBB/post/SQLCLR-debugging-and-VS-2010-revisited.aspx and http://blogs.msdn.com/b/robertbruckner/archive/2010/06/20/debugging-custom-extensions-with-visual-studio-2010.aspx.

Here an example of my sqlservr.exe.config file:

<?xml version="1.0"?>
   <startup useLegacyV2RuntimeActivationPolicy="true">
        <supportedRuntime version="v2.0.50727" />

Our assemblies are tar

Why my workflow project uses previous flow when I debug.


1. I used Visual Studio 2010 to build a sequential approval workflow from scratch. In the design, the flow was drawn and the code behide was also added. First time debug, it was fine. After I found some problem in logic, I modified the flow  chart by adding some activity. The compile is ok. But when I debugged it, the flow was still using old one. Same thing occured after I created another WF project. First time was ok, and later was old one after modifying some flow chart.

2. Also please advise which site or doc has specific walkthrough or example for muti-approvers sequential workflow design and code in Visual Studio 2010. My current project need this ASAP and I already fighted this for days. Thank you a lot.


how to use visual studio to debug sql server reporting service 2008 by attaching process


I did custom security extension and want to debug it. I used to debug it using visual studio by attaching its iexplore.exe process using visual studio 2005 and sql server reporting services 2005. After then, I can debug UILogon.aspx.cs and AuthenticationExtension.cs in Microsoft.Samples.ReportingServices.CustomSecurity.dll. When I set break point, it can reach.

Now I used 2008 version for all application. After I attaching process, it can't reach break point I set. I realize sql server reporting services didn't use IIS and it use another component to hold web app. I may affect it and unable to debug it ? Do I need to do any configuration or any thing before I can use visual studio 2008 to do debug by attaching process ?




"An attempt to attach an auto-named database for file G:\\project\\sasystem\\App_Data\\aspnetdb.mdf

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Configuration;

public partial class _Default : System.Web.UI.Page
    protected void Page_Load(object sender, EventArgs e)

    public void showdata()
        if (txtsname.Text != "" && txtboard.Text != "" && txtcity.Text != "" && txtlocality.Text != "" && txtadmnfees.Text != "")
            if (dlstclass.SelectedIndex != -1)
                using (SqlConnection con = new SqlConnection())
                    con.ConnectionString = ConfigurationManager.Connecti

Can't attach my project database (.mdf file) using SQL Server Management Studio R2

Hi.  I've encountered a strange issue in SQL Server Management Studio (not the express version).  I had to uninstall SQL Server 2008 Developer in order to install SQL Server 2008 R2 Developer.  As a result of doing this, the database from one of my ASP.NET MVC projects is not attached to the database server.  I see the ".mdf" file in my project's AppData folder in Windows Explorer, but I can't navigate to it in SQL Server Management Studio.  I go to "C:\Users\<my name>" and the attach database interface will not let me go any further.  The folder that I need to access is "C:\Users\<my name>\Documents\Visual Studio 2010\NerdDinner\NerdDinner\App_Data".  How can I access this directory from SQL Server Management Studio?  Is there some sort of strange permission issue?  Thanks in advance for any help.

Visual Studio 2008 fails to debug an ASP.NET project... Sometimes


I have a very simple ASP.NET 3.5 project. When I start debugging the project, IE sometimes (about 50% of the time) starts, but never connects to the site. I need to exit IE and restart (which does not always work).

I am developing on Windows 7 and using IIS with a virtual folder as the server for my project. I am running Visual Studio 2008 SP1.

Any ideas?

Project Example: ASP.NET MVC + SubSonic Architecture

use of SubSonic to provide the DAL in association with some ASP.NET MVC sites and was waylaid in my original intent to throw up a post summarizing the architecture we're using for the effort. Well I've finally gotten around to it. Recall that in his fake it till you need it post, Dave provided a window on our architecture that I'll build upon here
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