The Wayback Machine - https://web.archive.org/web/20220214094643/https://github.com/dotnet/aspnetcore/issues/40194
Skip to content
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

IIS does not recover from a broken web.config in v6 hosting bundle where it used to in v3 and v5 #40194

Open
1 task done
RichardHynes opened this issue Feb 14, 2022 · 0 comments
Open
1 task done

Comments

@RichardHynes
Copy link

@RichardHynes RichardHynes commented Feb 14, 2022

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

In v6 hosting bundle, IIS does not automatically restart the website when it detects the change to the web.config, if a previous change caused an exception. However, in v3 and v5 IIS would restart the site if a change to the web.config was made regardless of previous changes.

Expected Behavior

I update some IIS servers running .Net Core websites without remote access to the IIS server (RDP or PS). However, I do have remote access to the file system.

In .Net Core 3 & 5 I would take a website offline by editing the web.config and renaming the ‘processPath’ to ‘filename..OFF’ , IIS would shut down the site, I copy in the updated files, edit the web.config, rename the ‘processPath’ back to the correct filename, IIS detects the change and starts up the site.

In v6 this no longer works, and I don’t know if that’s intentional or not (see below).

Alternatively, if I rename the web.config to web.config.off, IIS shuts down the site as normal, I update the files, rename the web.config back, IIS detects the change and starts up the site as normal.

The main difference between the two approaches can be seen in the event viewer. In the first where I ‘break’ the web.config IIS adds an info line to the event viewer to say the site has shutdown (detecting the config change) followed by two exceptions to say the renamed processPath could not be found. In the second method where I rename the web.config I still get an info message to say the site has shut down but no error messages.

Steps To Reproduce

'Break' the IIS Site by editing the web.config and changing the processPath to an invalid value. Allow IIS to shutdown, fix the web.config by renaming the processPath back to a valid path. In v3 and v5 the site would come back up automatically, in v6 it does not come back up.

Exceptions (if any)

No response

.NET Version

6.0.2

Anything else?

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant