Mide
Mide

Reputation: 233

Debugging Azure: Error attaching the debugger to the IIS worker process

I have a web application asp.net to deploy to Windows Azure. I try to run it on local first. But when debugging, I catch this error from VS2010:

"There was an error attaching the debugger to the IIS worker process 
for URL 'http://127.255.0.0:82/' for role instance 
'deployment16(6).WindowsAzureProject2.WebApplication3_IN_0'. 
Unable to start debugging on the web server ......."

I've search so hard to find the solution for this problem but there's nothing seems work for me. I'm a newbie in Windows Azure, it's really a big trouble with me.

Upvotes: 18

Views: 16540

Answers (8)

Nikita R.
Nikita R.

Reputation: 7483

This usually happens when there's a problem with the project to be deployed to the emulator (WindowsAzureProject2 in your case).

Try the following:

  • Check %UserProfile%\AppData\Local\dftmp\IISConfiguratorLogs\IISConfigurator.log file for the error messages. See more details in this answer.

  • Make sure your project can be started without the emulator. It's a web project, so just try to start it as a regular web project. Or publish it to the separate folder and try to create a website in IIS of it.

  • Check your *.csdef and *.cscfg files to make sure all the configuration is correct.

  • Make sure that the build output of your project is not empty. You can do this by going to IIS, find the site with the name similar to deployment16(6).WindowsAzureProject2.WebApplication3_IN_0, right click --> Explore.... Make sure that this folder is not empty and contains all the files required to start a web project successfully.

BTW, there's a similar question: Debugger can't connect when starting local azure project

Upvotes: 14

Thomas
Thomas

Reputation: 1473

Also, make sure you run Visual Studio as administrator

Upvotes: 1

Neeraj
Neeraj

Reputation: 11

Check the version of Azure APIs in your project, go to Project > references and right click on Azure dlls to check the version, same sdk version must be installed on the system, higher are optional as azure 2.x are not backward compatible.

Upvotes: 0

Rahul Karn
Rahul Karn

Reputation: 1

Please check the version of emulator you have installed. If your code is created in older sdk and you have a new emulator installed it will give you this error.

Upvotes: 0

Bern
Bern

Reputation: 7951

I encountered this exact same problem when I upgraded an existing Azure solution to the Azure SDK 2.1. After some hunting around I uncovered that the upgrade had automatically set the "Local Development Server" setting to "Use IIS Web Server".

Changing the "Local Development Server" setting to "Use IIS Express" fixed the problem immediately.

To access this setting right-click the Azure cloud project file in your solution, select the "Properties" option, tab down to "Web" and you'll see the following setup.

enter image description here

Upvotes: 5

Miguel Lopez
Miguel Lopez

Reputation: 311

I had similar problem with Windows 8, debuging a cloud application with Visual Studio 2012 RTM and Azure SDK 1.71, when trying to launch the application into the compute emulator. It was a very simple app, but I used Azure diagnostics. At the end these are two things I have changed that have work for me, both turning on Windows 8 features (so go to Win8 and open 'Turn Windows Features On/Off'.

Activate the checkboxes for:

  1. Internet Information Services Hostable Web Core

  2. Internet Information Services > World Wide Web Services > Application Development Features > ASP.NET 4.5

  3. Internet Information Services > World Wide Web Services > Health and Diagnostics > Tracing

  4. Internet Information Services > Web Management Tools > IIS Management Scripts and Tools

That worked for me, it makes sense, as I'm using Visual Studio 2012 and trying to get some trace information using diagnostics in Azure.

I hope this will work for you or give some tip about the problem. In the case of being useful information, remember to vote as response or as value tip.

Thanks,

Mike

Upvotes: 31

Jorge
Jorge

Reputation: 1186

I just have today the same problem trying to Debug locally with Azure Storage Emulator in Windows 7. So in the Azure project properties, in Web tab, I checked the radio button 'Use IIS Express' and it debugged without problem. I hope this helps someone.

Upvotes: 5

thakare
thakare

Reputation: 101

Follow step 11 from http://www.microsoft.com/en-us/download/details.aspx?id=35448. Worked for me on Windows 8 with Oct 2012 SDk

Upvotes: 8

Related Questions