5

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.

Alxandr
  • 12,345
  • 10
  • 59
  • 95

5 Answers5

8

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.

Bart Czernicki
  • 3,663
  • 1
  • 21
  • 19
  • I had this issue with a new machine in VS2010 and Windows Azure SDK 1.6-1.8 installed. Dotnetframework 4.5 is not installed, so not sure why this happend - I was thinking aspnet_regiis -i happens at install of VS. Perhaps the issue was that IIS was not enabled when I installed VS2010 - this sounds for me at least reasonable. THANKS for posting. – Marc Loeb Nov 22 '12 at 08:50
0

I got this exact same error and tried a re-install of IIS and the Azure SDK - nothing worked.

Eventually tracked it down to the "IIS URL Rewrite Module 2". I went to the Control Panel and chose Repair and it resolved it. If you have a section in your web.config then this might be the cause.

Nico Westerdale
  • 2,147
  • 1
  • 24
  • 31
0

I had a similar error yesterday. For me the problem was that the output of the build was empty in the target folder.

I tried to answer a similar question https://stackoverflow.com/a/9411422/182371:

  • Check %UserProfile%\AppData\Local\dftmp\IISConfiguratorLogs\IISConfigurator.log file for the error messages. Mode details at https://stackoverflow.com/a/8432621/182371

  • 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.

As for the Access Denied error:

  • it could be just an IIS default setting to disable browsing. To resolve that, just navigate to that web site in IIS, find Directory Browsing icon, and press Enable. You will at least see the files inside that directory.

  • Also try not only 127.0.0.1:81, buta specific document inside that folder, like 127.0.0.1:81/Default.aspx

  • Take into account the fact that there's sometimes some mess with the ports. You see that in the error message it's port 82, but in your browser it's port 81. So make sure you're using the right port. Or, even better, in your service definition try to use some non-standard port for this to avoid remapping.

Community
  • 1
  • 1
Nikita R.
  • 7,245
  • 3
  • 51
  • 62
  • I turned on directory browsing, and now the list of files shows up. However, as this is a MVC page, the MVC handler should kick in no? I did the exact same setup on my laptop and it worked like a charm -.- – Alxandr Feb 23 '12 at 17:03
  • After some more digging I've found that `Application_Start()` is never fired. – Alxandr Feb 23 '12 at 17:22
  • Try to explore this folder: %UserProfile%\AppData\Local\dftmp\. There're so many logs from all the services possible. Maybe you can find something there. Also, check Event Viewer, maybe there's something there. – Nikita R. Feb 24 '12 at 15:40
0

I've met the same issue. In the end, I had to reinstall IIS 7.

YuQing Zhang
  • 779
  • 1
  • 5
  • 17
-1

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 when upgraded from 2011.

thakare
  • 101
  • 2
  • 7