Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debugger can't connect when starting local azure project

Ok, first of; here's what I did:

  1. Install AZURE tools
  2. Reboot
  3. Start Visual Studio - new Azure project
  4. Add web role (asp.net MVC 4 beta web role)
  5. Hit F5 (debug)

It starts up the storage emulator and the compute emulator and starts to load in runtimes, and then I get a popup saying that the debugger couldn't connect.

Problem

Then after some googeling I'm suggested to try to run the application without running the debugger to see if I can acces the application. When I do I get this:

Problem

So I figure that IIS does not have permissions to access some file/directory. So I go to IIS and look up the application pool running the app, and it tells me that the identity in use is NetworkService, then I go give NetworkService full permissions to the entirety of the folder IIS has set for the application (which also happens to be the path to the project dir). Still I get the same error. Now I'm more or less out of ideas, but I try one last thing, which is to also give IUSR full permissions to the same dir, but this did not help either.

How can I go about resolving this problem? I haven't tried actually launching my project to Azure yet, cause if I can't even get it to work in development I don't see much point. Any and all help would be appreciated.

like image 660
Alxandr Avatar asked Feb 22 '12 22:02

Alxandr


People also ask

How do I Debug Azure function locally?

Start debugging by attaching to a w3wp.exe remote process At least one breakpoint is setup. Our DLL compile and publish on Azure should be on Debug. The DLL version published on Azure should match the local version.

How do I fix unable to start debugging on web server?

Restart your Application Pool. Check that your Web Application folder has the right permissions. Make sure that you give IIS_IUSRS, IUSR, or the specific user associated with the Application Pool read and execute rights for the Web Application folder. Fix the issue and restart your Application Pool.

How do I enable remote debugging in Azure App?

In the Profile drop-down list, select the same profile that you used in Create an ASP.NET app in Azure App Service. Then, click Settings. In the Publish dialog, click the Settings tab, and then change Configuration to Debug, and then click Save.


1 Answers

I ran into the same error today after uninstalling .NET 4.5/Visual Studio 11 Dev Preview, then installing ASP.NET MVC 4 Beta (this is before Feb 29th when the updated VS 2011 Preview drops).

Since I uninstalled .net 4.5, you just need to do an "aspnet_regiis -i" to ensure the .net framework (4.0) is set up with IIS 7.x this worked for me.

Edit: This will work if you uninstall/then manually install Visual Studio 2012 RTM as well.

like image 52
Bart Czernicki Avatar answered Sep 30 '22 15:09

Bart Czernicki