We are excited to announce that the IIS.NET Forums are moving to the new Microsoft Q&A experience. Learn more >

View Complete Thread
  • Re: Web Hosting for .cshtml files

    May 16, 2011 12:40 AM|necro_mancer|LINK

    hi all,

    Yes, GoDaddy until now has not supported .CSHTML / WebMatrix yet. If you are looking to host your .CSHTML / WebMatrix-based application, you can consider ASPHostCentral.com. I have my site hosted on their server and .CSHTML files are now working fine. Initially, I have several problems like you experienced before, but the staffs on this hosts are helpful in resolving my issues.

    The following are the common problems when deploying WebMatrix-based .CSHTML application to a server:

    1. Your Application cannot connect to your SQL Compact / SQL database. This is something to do with your connection string and you need to check it with your current host for details of connection string

    2. .CSHTML cannot be rendered and the error message is: "HTTP 404.0 File Not Found". This is pertaining the .CSHTML installation on the server and you need to check it with your current host for details

    3. WebMatrix is able to run your .CSHTML file, however, the real URL fails to work. This may be confusing (I am also confused previously). What I am trying to say is: Let's say you have a domain called http://www.BigDomain.com. Your .CSHTML works on http://www.BigDomain.com/test.cshtml, however, it does not work with http://www.BigDomain.com/test. Please remember that when you deploy the application properly, the two URLs should work. In case you experience any error, you need to check it with your current host about the .CSHTML configuration on their server. Make sure HTTPHandler is set to "Revert to Inherited"

    4. Your SQL Compact database cannot be updated with an error message: "Exception Details: System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) ". This problem happens simply because of the improper READ and WRITE permission on the App_Data folder

    Trust me! It is not quite a pleasant experience when working with .CSHTML. There are always problems after problems occur when trying to deploy it on a server. Fortunately, the staffs at asphostcentral.com did all the magics and my site is working perfectly fine now. I certainly do not have problems recommending their service to you all.

    Hope this helps!