Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use full IIS during ASP.NET 5 / Core 1.0 development

I used to develop my web-apps using ASP.NET 4.x and host them in full IIS already during development, because:

1) I use multi-tenancy (site1.me.local and site2.me.local point to my app) and IIS express can't handle that AFAIK
2) Most of the times I do not need a debugger -> I just (re)build my app and refresh the browser - restarting IIS Express and the VS debugger wastes some time

Now I tried my first web-app using ASP.NET 5 aka Core 1.0 and I wasn't able to get it to run in full IIS to continue using my known workflow. I found out I can start IIS Express without debugging and just rebuild to solve #2, but #1 is still open.

Is full IIS even supported for ASP.NET 5 / Core 1.0 during development? If so is there some documentation on how to set that up around?

All documentation for full IIS I found is for publishing, but not for development.

like image 653
Christoph Fink Avatar asked Mar 12 '16 11:03

Christoph Fink


People also ask

Can ASP NET core run on IIS?

The module allows ASP.NET Core apps to run behind IIS. If the Hosting Bundle is installed before IIS, the bundle installation must be repaired. Run the Hosting Bundle installer again after installing IIS.

How do I run a .NET core app in IIS?

NET Core application. Open the IIS, add a new Application Pool, then choose No Managed Code for . NET Framework version field and finally, select Integrated for Managed pipeline mode field. Add a new folder to host your application on IIS and create a virtual directory for it.

Is Kestrel better than IIS?

Introducing KestrelIt's a relatively lightweight server compared to IIS, and as it's cross-platform, it simplifies how you might choose a hosting platform. It's also suitable as a development tool, running on desktop hardware for tests and experimentation.


1 Answers

You may actually not event want to use IIS in development with Asp.Net Core. Asp.Net Core has been separated from IIS and even in production IIS will only act as a reverse proxy passing requests to your AspNet.Core application. Asp.Net Core uses Kestrel as an application server and it is much easier to use just this during development. To get a similar workflow you had before you would use dnx watch/dotnet watch during development which will watch code files of your application and if any of the files changes it will stop the application, rebuild the project and restart the application. This is when you can refresh the browser to see changes (note that this is even one less step that you had before where you had to rebuild the application yourself).

It still should be possible to use IIS for development if you really need it but if you don't have a specific scenario that requires IIS I don't think IIS for development will give you any benefits.

like image 191
Pawel Avatar answered Oct 28 '22 00:10

Pawel