ASP .NET MVC / CORE Websites on Windows Shared HostingPosted by Phil (Netcetera) on 30 May 2019 02:00 PM | |
MVC websites can be run on our Windows Shared Hosting environment, but they must be configured correctly. The information below - "Steps", also applies to .NET CORE. A Note On .NET CORE You must compile your projects without EXEs; we do not allow EXEs to execute on our systems. To facilitate this you would deploy your website as a "Framework-dependent deployment"; refer to the following for more information: - https://docs.microsoft.com/en-us/dotnet/core/deploying/ Note that "this is the default deployment model for .NET Core apps", so if you are deploying with EXEs you are working as a "self-contained deployment" Roslyn CompilerThe Roslyn Compiler cannot be used on our Shared Hosting.There is a way to compile the site without using Roslyn. 1. Open NuGet Package Manager from tools menu or Use Manage NuGet Packages for Solution. This will allow you to uninstall packages from the project which is using that package. 2. You need to uninstall Microsoft.CodeDom.Providers.DotNetCompilerPlatform using the following command in the Package Manager Console: Uninstall-package Microsoft.CodeDom.Providers.DotNetCompilerPlatform <Your Web project name> 3. You can now rebuild, and republish the project. In your web project publish profile settings, uncheck "Allow precompiled site to be updatable". You can find this under Settings > Precompile during publishing > Configure. |