cshtml problems

Discussion in 'General troubleshooting' started by Dell, Aug 4, 2011.

  1. when I try to go to my website I get:

    Code:
    Server Error in '/' Application.
    
    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: /default.cshtml
    
    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
    
    My application pool pipeline mode is set to integrated.

    I've searched these forums and the web, my web.config file now looks like this:
    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <configuration>
      <system.web>
        <compilation debug="true" targetFramework="4.0" />
      </system.web>
      <connectionStrings>
        <add name="StarterSite" connectionString="Connection String" />
      </connectionStrings>
       <system.webServer>
        <modules runAllManagedModulesForAllRequests="true"/>
    <security>
    <requestFiltering>
    <fileExtensions>
    <add fileExtension=".cshtml" allowed="true" />
    </fileExtensions>
    </requestFiltering>
    </security>
            <defaultDocument>
                <files>
                    <add value="default.cshtml" />
                </files>
            </defaultDocument>
            <staticContent>
                <mimeMap fileExtension=".cshtml" mimeType="text/html" />
            </staticContent>
    </system.webServer>
    </configuration>
    What should I try next?
     
  2. Never mind. I haven't figured it out but I think I found something else wrong...
     

Share This Page