How to Debug a ASP.NET WF 4.0 using VS2010 on Windows 7 64-bit RRS feed

  • Question

  • I am running Windows 7 64-bit, using VS2010.  I created a new AppPool using the .NET 4.0 Framework and running under my local machine Identity.  (Formerly I was just using the built-in ASP.NET v4.0 app pool withing NETWORK SERVICES as the Identity.
    I have a solution with a Web Project and a WCF Workflow Service Application.

    I have tried to debug with the following approach with NO SUCCESS.  I was able to debug this way using VS2008 on Win XP Pro 32 bit, but not now.

    * Deploy web app and workflow to local IIS 7. (Note: web app has a service reference to workflow hosted in IIS 7)
    * Launch browser and navigate to web app URL.
    * Launch VS2010, load workflow project.
    * From workflow project Debug menu Select... "Workflow code".
    * Then attach to worker process (Here I have some difficulty identifying the actual process)
    * Return to browser and trigger action that will spawn/call workflow hosted on IIS 7.

    I'm not sure if I'm attaching to the right process.  I never see any w3wp or aspnet_wp processes.  I do see two WebDev.WebServer40 processes.  One is of type Managed (v4.0*) and the other is of type T-SQL, Managed (v4.0*).

    Please help, and thank you.

    Tuesday, July 13, 2010 8:28 PM


All replies

  • Are you running VS elevated, and selecting 'Show Processes from All Users' and 'Show Processes in All Sessions' in the Attach to Process dialog?

    Are you able to debug the regular managed code in your project? If not, you'll probably have better luck asking in the ASP.NET forum. If you can debug regular managed code but not workflow, then this is the right forum.

    Wednesday, July 14, 2010 12:30 AM
  • Yes, I am able to debug my regular managed code, like the ASP.NET 4.0 Web Project in this same solution.  However, it that case I don't try to attach to any process, I just run Debug (F5) and start stepping through the code.

    When trying to debug a workflow, I have checked off both options to show processes from all users and in all sessions, but I still don't see anything more than the WebDev.WebServer40 processes.

    Wednesday, July 14, 2010 12:42 AM
  • Does F5 not also work for workflow? What happens in that case?
    Wednesday, July 14, 2010 1:01 AM
  • If I want to debuf the workflow directly, I set its project as the startup project.  Then I select my *.svc file and hit F5.

    At that point the WCF Test Client pops up, where I select (double-click) on one of the operations that I defined, enter any argument data, and then click Invoke button.  I receive a message that reads "One-way message is successfully delivered to the service side".

    That doesn't allow me to do end-to-end testing on my workflow, however.  I want to step through the entire workflow.

    I was trying to have my web app call my workflow and then be able to hit breakpoints on my workflow.

    Wednesday, July 14, 2010 1:41 PM
  • Just to confirm, since I didn't see you say it explicitly above... are you running VS elevated (i.e. as admin)?

    Wednesday, July 14, 2010 5:39 PM
  • I am running under an account that belongs to the Administrators group.  Although, I'm not sure what that really does for me in this case.  For example, I had to create a separate batch file to execute my web app and workflow MSIs.  I right-click on batch file and Run As Administrator.
    Wednesday, July 14, 2010 5:45 PM
  • Right, you need to do the same thing for VS... right-click on the VS icon and click Run As Administrator.

    More details at http://msdn.microsoft.com/en-us/library/aa511445.aspx

    • Edited by Dan Glick - MSFT Wednesday, July 14, 2010 6:03 PM Add MSDN link
    • Marked as answer by sayzar Wednesday, July 14, 2010 8:45 PM
    Wednesday, July 14, 2010 6:01 PM
  • That was it!  I ran VS as Admin, I was able to see the w3wp process and attached.  My web app finally called my workflow and hit the first breakpoint!

    Thank you.

    Wednesday, July 14, 2010 8:45 PM