I want to host my ASP.NET 5 project which uses MVC 6 and Entity Framework 7 on Amazon free micro instance. I can't find any step-by-step manual on how to host ASP.NET 5 projects on IIS, all materials just mention that this is possible but without any guides. Basically, I'm deploying to local folder and then copying to newly created site, but nothing is working. Unfortunately, I can't use Azure as it only has one month free trial, not a year.
Go to Control Panel > Administrative Tools > Internet Information Services (IIS) Manager. In the Connections panel, expand your host tree, right-click on Sites, and choose Add Website. Enter the new website's name and choose the location. Enter the Host name.
You Need The ASP.NET Core Hosting BundleNET Core to work inside IIS, you actually need to do an install of a “Hosting Module” so that IIS knows how to run your app.
IIS 8.0 supports running both ASP.NET 3.5 and ASP.NET 4.5 applications on the same machine using different application pools to host each . NET Framework version. IIS 8.0 supports for multiple .
I'm using Visual Studio 2015 Preview to create ASP.NET 5 projects. I don't think that's difficult to deploy on IIS now. First publish your website by publishing it as file system in VS 2015 preview, then copy the published folder to your server, create an application in IIS and set the application folder to the wwwroot folder (rather than the root folder), that's all. Be aware, check if "Microsoft.AspNet.Server.IIS" exists in your website project.json before publishing it.
Edit: there should be a web.config in wwwroot folder, the content of web.config may be like this (with precompile option when publishing):
<?xml version="1.0" encoding="utf-8"?> <configuration> <appSettings> <add key="kpm-package-path" value="..\approot\packages" /> <add key="bootstrapper-version" value="1.0.0-beta1" /> <add key="kre-package-path" value="..\approot\packages" /> <add key="kre-version" value="1.0.0-beta1" /> <add key="kre-clr" value="CoreCLR" /> <add key="kre-app-base" value="..\approot\packages\Rvc.PopUpSite\1.0.0\root" /> </appSettings> </configuration>
or like this (without precompile option):
<?xml version="1.0" encoding="utf-8"?> <configuration> <appSettings> <add key="kpm-package-path" value="..\approot\packages" /> <add key="bootstrapper-version" value="1.0.0-beta1" /> <add key="kre-package-path" value="..\approot\packages" /> <add key="kre-version" value="1.0.0-beta1" /> <add key="kre-clr" value="CoreCLR" /> <add key="kre-app-base" value="..\approot\src\Rvc.PopUpSite" /> </appSettings> </configuration>
Please notice the value of kre-app-base
. Occasionally its value is empty string after publishing in Visual Studio.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With