Running ASP.NET 5 (MVC 6) with .NET Core on IIS


Ash

I just created a snappy ASP.NET 5 MVC 6 application on Visual Studio.NET 2015 RC, hoping it will run on Windows 7's IIS web server.

Usually, when I create a website on IIS, I need to choose an application pool of v2.0 or v4.0 Integrated.

Now, since all the libraries for .NET Core are provided as nuget packages, how can I run it on IIS? Which application pool do I choose? How does this work?

Victor Herdugach

Updates

As @wickdninja said, the following is outdated. Please use his updated solution instead : https://docs.microsoft.com/en-us/aspnet/core/publishing/iis To get the app working on IIS:


  1. Create a website under the v4.0 application pool.

  2. Use bundled/published apps dnu publish. This will create a self-contained package containing the application, runtime and all dependencies. Change the runtime name to match the runtime of your choice.

      dnu publish --runtime dnx-coreclr-win-x86.1.0.0-beta5-11625
    

    --no-sourceIf you don't want your application to be compiled from source every time it starts, you can even pass .

  3. Copy the bundle (from bin\output) to the website root.

  4. run

Where things might go wrong:

  1. IIS bits (32/64 bits) must match those of coreclr.
  2. If you don't copy the bundled website into the website root, make sure the account running IIS has actual access to the runtime folder.

Related


ASP.NET 5 (ASP.NET Core) - not working with IIS

Alexey Markov I'm trying to deploy my ASP.NET 5 MVC project to local IIS, but I'm getting some errors. mistake When opening (my website address), localhost:80I have HTTP404. I get the same behavior if I run it manually approot\web.cmd. I think the problem is t

Exception Handling ASP .NET Core MVC 6

Gabriel Robert My current configuration: public void ConfigureDevelopment(IApplicationBuilder app, ILoggerFactory loggerFactory) { //app.UseDeveloperExceptionPage(); //app.UseDatabaseErrorPage(); app.UseStatusCodePagesWithRedirects("/error/{0}");

ASP.NET MVC5/IIS Express cannot debug - code not running

Grammy I start a VS2013 VB.Net MVC5 web application, set a breakpoint in the HomeController About method and run "Start Debugging", navigate to the About page and get a message that "Code not running - The current Thread is not currently running or the call st

Running ASP.NET 5 (MVC 6) with .NET Core on IIS

Ash I just created a snappy ASP.NET 5 MVC 6 application on Visual Studio.NET 2015 RC, hoping it will run on Windows 7's IIS web server. Usually, when I create a website on IIS, I need to choose an application pool of v2.0 or v4.0 Integrated. Now, since all the

ASP.NET 5 (ASP.NET Core) - not working with IIS

Alexey Markov I'm trying to deploy my ASP.NET 5 MVC project to local IIS, but I'm getting some errors. mistake When opening (my website address), localhost:80I have HTTP404. I get the same behavior if I run it manually approot\web.cmd. I think the problem is t

Running ASP.NET 5 (MVC 6) with .NET Core on IIS

Ash I just created a snappy ASP.NET 5 MVC 6 application on Visual Studio.NET 2015 RC, hoping it will run on Windows 7's IIS web server. Usually, when I create a website on IIS, I need to choose an application pool of v2.0 or v4.0 Integrated. Now, since all the

Friendly URLs in ASP.NET MVC 6 (ASP.NET Core or ASP.NET5)

chemical On my website I have a URL like this: https://www.mywebsite.com/View/Index/{MongoDbId} The controller returns a view with product details. My Product Category DTO (important fields only) public class ProductDto { public string Id {get; set;} pu

ASP.NET 5 (ASP.NET Core) - not working with IIS

Alexey Markov I'm trying to deploy my ASP.NET 5 MVC project to local IIS, but I'm getting some errors. mistake When opening (my website address), localhost:80I have HTTP404. I get the same behavior if I run it manually approot\web.cmd. I think the problem is t

ASP.NET 5 (ASP.NET Core) - not working with IIS

Alexey Markov I'm trying to deploy my ASP.NET 5 MVC project to local IIS, but I'm getting some errors. mistake When opening (my website address), localhost:80I have HTTP404. I get the same behavior if I run it manually approot\web.cmd. I think the problem is t

ASP.NET 5 (ASP.NET Core) - not working with IIS

Alexey Markov I'm trying to deploy my ASP.NET 5 MVC project to local IIS, but I'm getting some errors. mistake When opening (my website address), localhost:80I have HTTP404. I get the same behavior if I run it manually approot\web.cmd. I think the problem is t

Friendly URLs in ASP.NET MVC 6 (ASP.NET Core or ASP.NET5)

chemical On my website I have a URL like this: https://www.mywebsite.com/View/Index/{MongoDbId} The controller returns a view with product details. My Product Category DTO (important fields only) public class ProductDto { public string Id {get; set;} pu

Friendly URLs in ASP.NET MVC 6 (ASP.NET Core or ASP.NET5)

chemical On my website I have a URL like this: https://www.mywebsite.com/View/Index/{MongoDbId} The controller returns a view with product details. My Product Category DTO (important fields only) public class ProductDto { public string Id {get; set;} pu

Friendly URLs in ASP.NET MVC 6 (ASP.NET Core or ASP.NET5)

chemical On my website I have a URL like this: https://www.mywebsite.com/View/Index/{MongoDbId} The controller returns a view with product details. My Product Category DTO (important fields only) public class ProductDto { public string Id {get; set;} pu

Friendly URLs in ASP.NET MVC 6 (ASP.NET Core or ASP.NET5)

chemical On my website I have a URL like this: https://www.mywebsite.com/View/Index/{MongoDbId} The controller returns a view with product details. My Product Category DTO (important fields only) public class ProductDto { public string Id {get; set;} pu

Exception Handling ASP .NET Core MVC 6

Gabriel Robert My current configuration: public void ConfigureDevelopment(IApplicationBuilder app, ILoggerFactory loggerFactory) { //app.UseDeveloperExceptionPage(); //app.UseDatabaseErrorPage(); app.UseStatusCodePagesWithRedirects("/error/{0}");

Running ASP.NET MVC 6 Web API from IIS

Andre Lombaard I created an MVC 6 Web API project which is working as expected in Visual Studio, but when I deploy to production I get a An error occurred while launching the application mistake. I did the following on a production machine Installed ASP.NET 5

Running ASP.NET 5 (MVC 6) with .NET Core on IIS

Ash I just created a snappy ASP.NET 5 MVC 6 application on Visual Studio.NET 2015 RC, hoping it will run on Windows 7's IIS web server. Usually, when I create a website on IIS, I need to choose an application pool of v2.0 or v4.0 Integrated. Now, since all the

Running ASP.NET 5 (MVC 6) with .NET Core on IIS

Ash I just created a snappy ASP.NET 5 MVC 6 application on Visual Studio.NET 2015 RC, hoping it will run on Windows 7's IIS web server. Usually, when I create a website on IIS, I need to choose an application pool of v2.0 or v4.0 Integrated. Now, since all the

ASP.NET 5 (ASP.NET Core) - not working with IIS

Alexey Markov I'm trying to deploy my ASP.NET 5 MVC project to local IIS, but I'm getting some errors. mistake When opening (my website address), localhost:80I have HTTP404. I get the same behavior if I run it manually approot\web.cmd. I think the problem is t

Friendly URLs in ASP.NET MVC 6 (ASP.NET Core or ASP.NET5)

chemical On my website I have a URL like this: https://www.mywebsite.com/View/Index/{MongoDbId} The controller returns a view with product details. My Product Category DTO (important fields only) public class ProductDto { public string Id {get; set;} pu

Friendly URLs in ASP.NET MVC 6 (ASP.NET Core or ASP.NET5)

chemical On my website I have a URL like this: https://www.mywebsite.com/View/Index/{MongoDbId} The controller returns a view with product details. My Product Category DTO (important fields only) public class ProductDto { public string Id {get; set;} pu

Friendly URLs in ASP.NET MVC 6 (ASP.NET Core or ASP.NET5)

chemical On my website I have a URL like this: https://www.mywebsite.com/View/Index/{MongoDbId} The controller returns a view with product details. My Product Category DTO (important fields only) public class ProductDto { public string Id {get; set;} pu

Friendly URLs in ASP.NET MVC 6 (ASP.NET Core or ASP.NET5)

chemical On my website I have a URL like this: https://www.mywebsite.com/View/Index/{MongoDbId} The controller returns a view with product details. My Product Category DTO (important fields only) public class ProductDto { public string Id {get; set;} pu

ASP.NET 5 (ASP.NET Core) - not working with IIS

Alexey Markov I'm trying to deploy my ASP.NET 5 MVC project to local IIS, but I'm getting some errors. mistake When opening (my website address), localhost:80I have HTTP404. I get the same behavior if I run it manually approot\web.cmd. I think the problem is t

ASP.NET 5 (ASP.NET Core) - not working with IIS

Alexey Markov I'm trying to deploy my ASP.NET 5 MVC project to local IIS, but I'm getting some errors. mistake When opening (my website address), localhost:80I have HTTP404. I get the same behavior if I run it manually approot\web.cmd. I think the problem is t

ASP.NET 5 (ASP.NET Core) - not working with IIS

Alexey Markov I'm trying to deploy my ASP.NET 5 MVC project to local IIS, but I'm getting some errors. mistake When opening (my website address), localhost:80I have HTTP404. I get the same behavior if I run it manually approot\web.cmd. I think the problem is t

ASP.NET 5 (ASP.NET Core) - not working with IIS

Alexey Markov I'm trying to deploy my ASP.NET 5 MVC project to local IIS, but I'm getting some errors. mistake When opening (my website address), localhost:80I have HTTP404. I get the same behavior if I run it manually approot\web.cmd. I think the problem is t

ASP.NET 5 (ASP.NET Core) - not working with IIS

Alexey Markov I'm trying to deploy my ASP.NET 5 MVC project to local IIS, but I'm getting some errors. mistake When opening (my website address), localhost:80I have HTTP404. I get the same behavior if I run it manually approot\web.cmd. I think the problem is t

Running ASP.NET MVC 6 Web API from IIS

Andre Lombaard I created an MVC 6 Web API project which is working as expected in Visual Studio, but when I deploy to production I get a An error occurred while launching the application mistake. I did the following on a production machine Installed ASP.NET 5