locked
Azure cloud service with ASP.NET MVC 2 web role RRS feed

  • Question

  • Hi,

    I'm trying to run an existing ASP.NET MVC 2 application in the development fabric (1.2) using VS2010 on Windows 7. I'm following the Windows Azure Platform Training Kit Hands-On Labs (June 2010 update). When hitting F5 I see a blank screen.

    I also tried to create a completely new solution, starting with a new cloud service and adding a new MVC web role. This works, but only when the MVC WebRole targets .NET Framework 3.5. After changing this to .NET Framework 4.0 again a blank screen appears. 

    Did anyone have the same issues ?

    Thanks,

    Kristof

    Tuesday, August 24, 2010 9:29 PM

Answers

  • Make sure that you enable the HTTP Redirection feature in your IIS configuration. It needs to be turned on for MVC apps. That's usually the reason for the blank page.
    • Proposed as answer by Patriek van Dorp Wednesday, August 25, 2010 12:23 PM
    • Marked as answer by stof65 Wednesday, August 25, 2010 7:19 PM
    Wednesday, August 25, 2010 1:54 AM

All replies

  • Tuesday, August 24, 2010 10:59 PM
  • Make sure that you enable the HTTP Redirection feature in your IIS configuration. It needs to be turned on for MVC apps. That's usually the reason for the blank page.
    • Proposed as answer by Patriek van Dorp Wednesday, August 25, 2010 12:23 PM
    • Marked as answer by stof65 Wednesday, August 25, 2010 7:19 PM
    Wednesday, August 25, 2010 1:54 AM
  • Hi kristof,

    Have you tried creating a new MVC2 website and deploy to IIS? does the website work when running on vs development server?

    Try doing the above test may help you to find if the problem related to azure environment or IIS or MVC its self.

    Thanks,


    Mog Liang
    Wednesday, August 25, 2010 5:50 AM
  • Make sure that you enable the HTTP Redirection feature in your IIS configuration. It needs to be turned on for MVC apps. That's usually the reason for the blank page.

    In addition, while you're there, enable the Static Content IIS feature. This will be the next problem you'll encounter.
    If this reply is of help to you, please don't forget to mark it as an answer. Regards, Patriek
    Wednesday, August 25, 2010 12:23 PM
  • I want to thank all of you for your advice.

    Mog made me realize that I didn't try to publish the MVC website to IIS on my new PC (I tested it on the VS development server and then immediately tried to convert it to run in the development fabric. In order to have it run on IIS I first had to switch the application pool to ASP.NET v4.0.

    But then it also showed a blank screen using IIS. However, as pointed out by Fernando and Patriek, I had to enable the HTTP Redirection in IIS. Doing so solved the problem both in IIS and when running in the development fabric.

    Thanks a lot guys !

    Kristof

    Wednesday, August 25, 2010 7:29 PM
  • How do you actually do that
    Wednesday, November 3, 2010 3:28 PM
  • In Windows 7: Control Panel - Programs - Programs and features - Turn features on or off

    Internet Information Services - World Wide Web Services - Common HTTP features

    Check the box for HTTP redirection

    Saturday, December 18, 2010 8:42 PM
  • How do you actually do that in Azure? It is too risky to change the feature directly on the server in remote access.

    Does it exist a way to do that through .NET code?

    Saturday, March 26, 2011 2:53 PM
  • Hi Natacha,

    In Windows Azure these features are already activated. I believe this question is about the Compute Emulator ;-)

     


    With regards,

    Patriek

    www.patriekvandorp.net
    If this reply is of help to you, please don't forget to mark it as an answer.
    Saturday, March 26, 2011 6:39 PM