How to Get ASP.NET 5 Apps To Run Under IIS

Recently I've been working on a web application using ASP.NET 5 and today had to deploy it to a web server in our test environment. Here are the steps I took to get this to work:
  1. Published the website project in Visual Studio 2015 by right-clicking on the project and selecting "Publish", I used the file system publish option, and specified the 64-bit version of the runtime we're using (in this case, 1.0.0-beta5). This is important, as I was unable to get IIS to host this website using the x86 version. I specified a path outside of the solution directory for the publish output. Inside the publish directory, the publish process created 2 folders -- approot and wwwroot, as well as a file called web (no extension), and web.cmd.
  2. On the web server, I created a new folder for the website. Inside this folder, I placed the output from the publish (the approot and wwroot folders and the two web files).
  3. I created a new website in IIS on the web server. For the app pool, I selected .NET 4. For the physical directory, I selected the location of the wwwroot folder underneath the website folder (not the main wwwroot folder). For example, the physical path looked like c:\inetpub\wwwroot\mywebsite\wwwroot.
And that did the trick.


for IT the said…
So informative. You should author a book on this.

Angularjs Training | Angularjs Training in Chennai

Popular posts from this blog

A Generic Method Using HttpClient to Make a Synchronous Get Request

The Cause and Solution for the "System.Runtime.Serialization.InvalidDataContractException: Type 'System.Threading.Tasks.Task`1[YourTypeHere]' cannot be serialized." Exception

How To Mock Out Child Components In Unit Tests of Angular 2 Code