This might take some time to explain, but here I go .I created two Visual Studio 2012 projects:[*]A project using the (Web -> ASP.NET MVC 4 Web Application) template in Visual Studio's Add Project dialog. I didn't add a unit test project.[*]A project using the Azure cloud service template (Cloud -> Windows Azure Cloud Service). I added a single role, an ASP.NET MVC 4 Web Role, and again didn't add a unit test project.I left both of these projects totally untouched from the way that Visual Studio created them for me.For each project, I then went to the \[code\]HomeController\[/code\] class and set a breakpoint in each of the \[code\]About\[/code\] and \[code\]Contact\[/code\] action methods (boring actions that just return a view). For example, I set a breakpoint on the only line in the method:\[code\]public ActionResult About(){ return View();}\[/code\]I then started debugging the first project (the non-Azure project). Everything was as expected - i.e. when I use the browser to navigate between the About and Contact pages, the breakpoint in the respective action methods would get hit once on each request. Seemed fine to me.I then started debugging the Azure project. I followed the same procedure of navigating between the About and Contact pages. This time I found interesting non-deterministic behaviour. On some requests, the breakpoint in the action method would be hit multiple times (sometimes more than twice) before the page would render. Sometimes the request would just hang and the page wouldn't render (even after minutes of waiting).I'd like to know why this is happening, because it is affecting more complicated things in another Azure MVC application that we're working on (e.g. due to this problem the application may attempt to create two or more instances of a model object in my database for the one request).I'm in the following environment:
- Windows 8 Pro (x64)
- Visual Studio 2012 Ultimate
- Windows Azure SDK for Visual Studio 2012
- IIS 8 Express
- Firefox browser with Firebug (also confirmed the behavior using IE)
- SQL Server 2012 (not really relevant I guess)
- Reset IIS, restart Azure Compute/Storage emulator, restart entire machine
- Strip the views of all script (i.e. the behavior is still there if the pages just have a basic HTML paragraph on them)
- I tried to find the relevant IIS Express log files, but it seems that Azure projects don't run through IIS Express like the other project does (is that correct?).
- I monitored the Azure Compute Emulator console...nothing very interesting there.
- Can anybody else reproduce this behavior?
- Are there any additional logs generated by the Azure Emulator that might help me out?