Last post Mar 25, 2011 09:49 PM by tomwayson
Mar 15, 2011 09:52 AM|Ddemoel|LINK
Hello I have a question regarding the requirements for the hosting server if i want to run .cshtmls files.
What are the requirements for the server to be able too run such files?
Fast help is appreciated because my company wants to switch to the razor syntax in a month but we need to be able to test all the ins and outs.
Mar 15, 2011 10:50 AM|Schmuli|LINK
If you are depending on a hoster to have the correct binaries installed, they will have had to install ASP.NET MVC 3. However, you can include all the binaries from ASP.NET MVC 3 as part of your deployment, meaning that all necessary files will be on the
server, only available locally to your application, and not globally to any other application. Take a look at this blog post from Scott Hanselman about doing a "bin deploy" of MVC and Razor: http://www.hanselman.com/blog/BINDeployingASPNETMVC3WithRazorToAWindowsServerWithoutMVCInstalled.aspx
Hope that helps, Schmuli.
Mar 15, 2011 11:15 AM|Ddemoel|LINK
<div style="color: #000000; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; width: 100%; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #ffffff; margin:
Well, that's not really what I ment. It seems that is more for MVC then for Razor, but I don't use MVC.
What I want to know, I'll try to be more specific, is what requirements there are for the Windows server installation on the host server.
I already know the following,
You need Windows Server 2008 with IIS 7
You need .Net 4
Are there any other requirements to be able to view web pages with Razor(.cshtml)?
Because ATM I only get Page not Found if I try to link to my default.cshtml page while I can open it through Visual Web Developer.
Mar 18, 2011 05:03 AM|Topspy|LINK
The requirements to run .cshtml are the following:
configure mime type for .cshtml
Mime Type: text/html
Mar 19, 2011 08:59 PM|skallal|LINK
Mar 25, 2011 06:08 PM|tomwayson|LINK
I'm having the same problem, and your suggestion to add the mime type stopped the 404.17 errors that I was getting, BUT now IIS 7 just returns the page as static content.
Is there something else I need to do? Maybe configure IIS 7 to use an ISAPI filter or module to handle .cshtml requests?
Mar 25, 2011 09:49 PM|tomwayson|LINK
After following this post and the re-post in the IIS forum I was able to get my site to serve CSHTML files: