Hosting CSHTML on Windows Server RRS feed

  • Question

  • User1991088473 posted

    I created a .cshtml website in Visual Studio. Now I'm not sure how to host that project on my Windows Server. It's a Windows Server 2012 R2. Before, I've hosted regular html files by dropping them in the wwwroot folder of inetpub. I know that I need to use the ASP.NET of IIS to use the cshtml file type, but I'm new to it and not sure what the steps are to be able to view my project online.

    Monday, May 27, 2019 3:39 PM

All replies

  • User690216013 posted

    There are a few ASP.NET/ASP.NET Core project types using cshtml files,

    • ASP.NET Core MVC
    • ASP.NET Core Razor Pages
    • ASP.NET Web Pages 

    So before anyone comments further, you must reveal what exactly is the project type you use. Also, such questions are programming related, so ASP.NET forums are the best place,


    Monday, May 27, 2019 6:52 PM
  • User-2114649853 posted

    Hi aogden2013,

    According to your description, if you want to host your application on iis server , you should firstly publish it on iis, and it will show the default page in your application.Else you should add configuration like .net framework features for in iis service  to host asp.net application.

    Here is the link ,I hope it could help you.


    Best Regards


    Tuesday, May 28, 2019 7:54 AM