I built a simple MS Razor site but I just get a directory when I FTP the files and type in my domain name. Is this because there is a default.cshtml and not a default.html? Is so, is there a workaround? If not, I am open to sugestions. Thanks
That's correct. You will need to set default.cshtml one of your default pages. Try looking at this post on our forum to help you setup your default page. http://forum.Winhost.com/showthread.php?t=7577
I am still getting the followin error. I have updated the DefaultDocument in IIS 7 to accept default.cshtml. I also added a MIME type to set .cshtml as text/html. Any other ideas would be appreciated. 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
Try adding this in your applications web.config file. <system.webServer> <security> <requestFiltering> <fileExtensions> <add fileExtension=".cshtml" allowed="true" /> </fileExtensions> </requestFiltering> </security> </system.webServer> Also make sure your application pool is running in Integrated Pipeline mode and not Classic mode. This is set in your Winhost control panel under the Site Info Manager/Integrated Pipeline Mode.
Thank you for the update. I added the web.comfig and confirmed the intergrated. I also have the Razor .DLLs in a bin folder and in the root. I am still seeing the same error. I have uploaded a recular ASP site and it worked fine. Any more suggestions? Thank you, thank you very much.
Check, your web.config file and make sure that the requestfiltering element you inputted is not in a section where the element is commented out. Remember, comments start with <!-- and ends with a -->. Anything in between that will not be read by the system.