Razor Pages not Rendering

Topics: ASP.NET 2.0, Business Logic Layer, Controls, Themes
Jan 25, 2013 at 6:45 AM

I'm using VS2010 with IIS7 on both my workstation and server, and neither the Dashboard or Appearance .cshtml razor pages are rendering - I'm getting a 404. Do you know how to configure this in IIS7? I added .cshtml as an extension under Mime Types, with a MIME type of text/html, but it's still not working.

This is a non-MVC project so I don't understand why there are razor pages in the first place?

Does anyone know of a fix for this?

Jan 25, 2013 at 3:09 PM

Programming ASP.NET Web Pages (Razor) Using Visual Studio

Jan 25, 2013 at 3:12 PM
Edited Jan 25, 2013 at 3:19 PM

I know nothing about MVC. I downloaded the Web Site project - I'm just not seeing a connection here, sorry. Are you saying (per link) that there is a MVC dependency in a Web Site project??

Can you suggest a solution to this problem? I have a client training session today and no working admin...

Jan 25, 2013 at 3:40 PM

For VS2010 installing MVC is the easiest way to install Web Pages as it will configure IIS for you. In VS 2012 it is included as part of ASP.NET because Razor has little to do with MVC and can be used in any ASP.NET application.

Jan 26, 2013 at 12:59 AM
Edited Jan 26, 2013 at 3:33 AM

Thanks, that fixed it on my local machine. But what exactly do I have to install on the Web server? I've installed MVC4 on the server and the tabs still don't work... still giving a 404 for the Dashboard and Appearance tabs.

Jan 26, 2013 at 5:16 PM
Edited Jan 26, 2013 at 10:52 PM

I've followed the advice here and here, but still getting 404 on the server, even with MVC4 installed. Tries reinstalling .NET 4 also. Any advice?

It's Windows Server 2008 R2 with IIS7.5.

Jan 27, 2013 at 1:28 AM

For 2008 R2/IIS7.5 I only had to install ASP.NET 4.0 with MVC3 using web platform installer, don't remember doing anything else.

You could probably use same platform installer and select BE from application list and it would install BE with all dependencies. Then you can remove installed app or upgrade to latest, because it will install v2.6. 

Jan 27, 2013 at 6:52 AM
Edited Jan 27, 2013 at 6:56 AM

I'm currently using version 2.7; I had to upgrade from 2.6 due to a previous problem with image upload.

Right now I'm grappling with a Contact page problem - not posting back and unable to debug.

Jan 29, 2013 at 1:35 AM
Edited Jan 29, 2013 at 5:24 PM

I tried running aspnet_regiis -iru to no avail. I then enabled tracing and got the following:




Not Found






The operation completed successfully. (0x0)

Jan 29, 2013 at 1:42 AM
Edited Jan 29, 2013 at 1:52 AM

Finally found an answer to this problem:


Thanks for your help rtur :-)