none
web.config values to allow cshtml RRS feed

  • Question

  • Help

    I am trying to setup Razor on my 2012 r2 server. I have install smtp since I want to be able to email input from a form.

    To do this I have made the necessary changes in the Handlers.

    I edited the web.config as I read in technet to

     

    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
        <system.webServer>

            <staticContent>
                <mimeMap fileExtension=".dmg" mimeType="file/download" />
            </staticContent>

    </system.webServer>
         <appSettings>
     <add key="webpages:Enabled" value="true" />
    </appSettings>   
    </configuration>

    I then open up ie or chrome

    http://localhost/emailrequest.cshtml  

     and I get the following message

    This type of page is not served.   


    Description: The type of page you have requested is not served because it has been explicitly forbidden.  The extension '.cshtml' may be incorrect.   Please review the URL below and make sure that it is spelled correctly. 

    Requested URL: /emailrequest.cshtml

    I restarted the web server services.

    Please advise

    Hal

    Friday, April 15, 2016 9:36 PM