-
Notifications
You must be signed in to change notification settings - Fork 25.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ANCM: IISExpress and switching hostingModel #5599
Comments
@jhkimnew @shirhatti Should we say a bit more ... should it say how the restart may negatively impact an app/hosting (examples)? Also, confirm: Should this bit describe setting hostingModel? (applicationHost.config? ... I'm looking at some resources now on how IIS Express is configured) |
@pan-wang Can you add more detailed information about why IISExpress needs to be restarted manually when hostingModel is changed? |
Yes, I need more background info and context to document this. cc/ @jkotalik You had a PR (aspnet/Hosting #1261) on at least part of this. Can you help? RE: Where? One of the problems to address is where we should document this. We don't have much to say about IIS Express configuration in this doc set. It's not really a Host and deploy thing. It doesn't fit with the app-centered Hosting or Error handling topics. Since IIS Express is used for local debugging, it feels more like a Test and Debug area thing, but we don't document IIS Express there. As things stand, I don't know where we put this content. RE: Content I understand that IIS Express starts and the process continues to run after it's started (it continues to run even after the debugger is stopped in VS). If the hostingModel is changed either way (inprocess to out- or out- to in-), I think I understand that you're saying that IIS Express must be restarted manually to pickup the change. Since stopping the debugger in VS doesn't stop the IIS Express process, what do we need to say about how to manually restart IIS Express if the hostingModel is changed? RE: Configuration of hostingModel Are we talking applicationhost.config kept in |
@vaidy4github Is this issue covered by any of your IIS Express docs? TL;DR: Unlike full IIS, IISExpress should be restarted after switching hostingModel from in-process to out-of-process because it does not use the WAS service. |
The eventual goal is to add a drop-down to the project property page that allows you to pick between the different hosting model. <PropertyGroup>
<AspNetCoreModuleHostingModel>inprocess</AspNetCoreModuleHostingModel>
</PropertyGroup> Or overridden via a launch profile in launchSettings.json I'd suggest tracking this as part of the uber issue you've created for ANCM in-proc. We can setup a meeting where I demo in-proc when you're ready to actually to tackle this doc. |
@shirhatti I'm glad u mentioned that. It clears up my Where? question. But one thing tho ... I didn't know we would have a separate topic for inproc. I thought we'd be rolling it into the current ANCM topic in Servers (as perhaps just an overview section) and into the current ANCM reference topic in Host and deploy: Host on Windows with the details. Is there enough content to have a standalone topic just for inproc? Your configuration notes are perfect, but what do we need to say about how to restart IIS after the hostingModel setting is changed? Today, it looks like you have to manually kill the IIS Express process (guessing). |
The inprocess mode is large enough to delicate a new document section for it. Though it bootstraps through ANCM, in managed code it is a completely different hosting model (uses a custom IServer). Once the hostingModel setting has been changed in the web.config file, ANCM will notice a configuration change and recycle the worker process for IIS. For IISExpress, instead of recycling will trigger a graceful shutdown and close the current iisexpress process. |
Perfect ... thanks. That's exactly what I needed to know. I think I have everything (that's known to date) to document it. Please ping me here with any new developments. I've been so busy with doc issues that I'm having a hard time keeping up with engineering repo issues. |
@jkotalik Quick check: In-proc was originally planned for 2.1 as opt-in (not the default) ... is that the same for 2.2 ... opt-in (not the default; must be set by the dev either via web.config or via the project file property), correct? ... and what's your preferred guidance for configuration? ... Personally, I like the project file property. |
Opt in, but templates/ file new in 2.2 will default to inprocess for all IISExpress scenarios. |
Ok, gotcha. How about the guidance ... push the project file property over the web.config file approach? |
... and I'll get ...
... too. |
@shirhatti we should discuss the launchSettings.json experience. And yes push the project file property. We have always pushed for users not having web.configs in their app. |
Yes, all of the docs lean that way. 👍 |
Fixes #5599 Fixes #5449 Fixes #5403 [Internal Review Topic (fundamentals/servers/ancm)](https://review.docs.microsoft.com/en-us/aspnet/core/fundamentals/servers/aspnet-core-module?view=aspnetcore-1.0&branch=pr-en-us-8658) [Internal Review Topic (fundamentals/servers/index)](https://review.docs.microsoft.com/en-us/aspnet/core/fundamentals/servers/index?view=aspnetcore-1.0&branch=pr-en-us-8658) [Internal Review Topic (host-and-deploy/ancm)](https://review.docs.microsoft.com/en-us/aspnet/core/host-and-deploy/aspnet-core-module?view=aspnetcore-1.0&branch=pr-en-us-8658) [Internal Review Topic (host-and-deploy/iis/index)](https://review.docs.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/index?view=aspnetcore-1.0&branch=pr-en-us-8658)
From @jhkimnew on March 1, 2018 1:19
We need to update DOC to inform this limiation regarding IISExpress.
Unlike full IIS, IISExpress should restart after switching hostingModel from inprocess to outofprocess because it does not use WAS service.
Copied from original issue: aspnet/IISIntegration#621
The text was updated successfully, but these errors were encountered: