debugging not working in cloud asp.net app

Answered debugging not working in cloud asp.net app

  • Friday, December 17, 2010 12:09 AM
     
     

    Hi,

    i cannot run one of the cloud app in debug mode. it gives following error:

    ---------------------------
    Microsoft Visual Studio
    ---------------------------
    Windows Azure Tools for Microsoft Visual Studio

    There was an error attaching the debugger to the IIS worker process for URL 'http://127.0.0.1:5100/' for role instance 'deployment(21).CloudPOC.WebRoleToHostDataService.0'. Unable to start debugging on the web server. The web server is not configured correctly. See help for common configuration errors. Running the web page outside of the debugger may provide further information.

    Click Help for more information.
    ---------------------------
    OK  
    ---------------------------

    if i create any new cloud app in my machine it debugs just fine. now sure what could have gone wrong in this particular app that it stopped debugging.

    thanks,

    Manish

All Replies

  • Friday, December 17, 2010 2:06 AM
     
     

    The web role is probably crashing before Visual Studio has a chance to attach to IIS. To troubleshoot this, you may be able to see the cause if you debug the web role project instead of the cloud project. To do this, right-click the web role project, point to debug and select Start new instance.

    Alternatively, temporarily commenting out the <sites> element in your ServiceDefinition.csdef file will launch the web role in legacy mode using hosted web core. In this case, there's only a single process involved and Visual Studio should catch any unhandled exceptions that are causing the web site to fail.

  • Friday, December 17, 2010 2:41 AM
     
     

    Note that running just the web role project will fail if you're using any RoleEnvironment APIs in there (like using configuration settings), since those won't be available.

    Another trick to get at the real problem is to run without debugging.  Often you can get a better error message there (like a bad web.config).

  • Friday, December 17, 2010 3:18 AM
     
     
    it runs fine without debugging..although i will try Fernando's suggestion
  • Friday, December 17, 2010 3:47 AM
     
     

    i think i know the problem...

    i messed around with the read-only /writable setting in the v4.0.30319 folder i basically made stuff read only...i think thats breaking everything :(

    how can i fix it? install uninstall .net framework will fix it?

     

    Server Error in '/' Application.

    The current identity (NT AUTHORITY\NETWORK SERVICE) does not have write access to 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files'.

  • Friday, December 17, 2010 5:31 AM
     
     Answered
    uninstalled and reinstalled .net framework 4.0 and it works now...thanks very much everyone for the help.
  • Wednesday, January 26, 2011 1:54 AM
     
     

    I know this post has been answered but i was hoping for for a little more explanation on the same topic.

     

    I had the exact same problem as the original post.

    There was an error attaching the debugger to the IIS worker process for URL 'http://127.0.0.1:5100/' for role instance 'deployment(21).CloudPOC.WebRoleToHostDataService.0'. Unable to start debugging on the web server. The web server is not configured correctly. See help for common configuration errors. Running the web page outside of the debugger may provide further information.


    so i did what Fernando Tubio suggested:

    "The web role is probably crashing before Visual Studio has a chance to attach to IIS. To troubleshoot this, you may be able to see the cause if you debug the web role project instead of the cloud project. To do this, right-click the web role project, point to debug and select Start new instance.

    Alternatively, temporarily commenting out the <sites> element in your ServiceDefinition.csdef file will launch the web role in legacy mode using hosted web core. In this case, there's only a single process involved and Visual Studio should catch any unhandled exceptions that are causing the web site to fail."

     

    When i did everything ran without error. It worked perfectly. Obviously something is wrong though. Any help would be great?

     

    just a little more info... this happens with any app, even a newly created unedited one.

     

    Thanks

     

     

  • Wednesday, January 26, 2011 2:06 PM
    Moderator
     
     

    Sorry to resurrect and old thread but I ran into this recently on a new machine and wanted to add a couple thoughts to this thread.

    The likely cause is that the .NET framework was not properly registered with IIS. This can happen if you install visual studio BEFORE installing IIS. To correct this, you can either go into the list of installed programs and run a "repair" on the .NET Framework or run the ASPNET_regiis tool to setup the correct mappings: http://msdn.microsoft.com/en-us/library/k6h9cz8h(VS.71).aspx

     

  • Saturday, February 26, 2011 2:47 PM
     
     

    I am having same problem. I am using IIS Express with VS2010. I have tried everything listed up with the exception of removing IIS express. Any suggestions would be much appreciated. Right now I'm moving away from running multiple web sites under one role because I just can't get it to work :-(


    Gordon