This project is read-only.

How to serve .cshtml page

Topics: General
Jul 28, 2011 at 2:40 PM

There is a discussion on how to serve a .aspx page.  How can a .cshtml page be accessed directly (e.g. http://myorchard_domain/foo.cshtml)?

I have commented out some handlers as following:

    <handlers accessPolicy="Script">
      <!-- clear all handlers, prevents executing code file extensions, prevents returning any file contents -->
      <!--<clear />-->
      <!-- Return 404 for all requests via managed handler. The url routing handler will substitute the mvc request handler when routes match. -->
      <!--<add name="NotFound" path="*" verb="*" type="System.Web.HttpNotFoundHandler" preCondition="integratedMode" requireAccess="Script" />-->

I get the error "This type of page is not served."