Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi Floris, hope you're well. I want to provide a few details for you to review (and maybe even ask me about if you need) on this PR:
I've been experiencing the same installer / app pool crash issues that others have reported in #10 and #11. I wanted to see if I could lend a hand and perhaps resolve these.
I was able to fix #10 by adding in some conditions for IISMAJORVERSION 7, since the applicationHost.config file structures are different for IIS 8+.
Fixing #11 was extremely puzzling for me. I could never actually get the dll produced by building the project as it was when it was cloned to work. I kept getting the infamous "The Module DLL C:\Windows\System32\inetsrv\HSTS IIS Module.dll failed to load. The data is the error." error in the Windows Event Viewer, and a 503 error with a stopped application pool when browsing to the site. Thanks, IIS - helpful. 😆
What I ended up doing to finally get it to work was to clone https://github.com/Dionach/StripHeaders, I loaded that C++ project up into the HSTS solution. Then I renamed everything to be the correct HSTS IIS Module naming conventions, and built the solution. Building under the Release x64 configuration produced a DLL that didn't crash my app pools. I could never really figure out what project configuration was different between the two, but the solution as committed produced a working .msi installer for me. I tested on both Windows Server 2008 and Windows Server 2012.
One note on Windows Server 2008: The module works, but the manager doesn't appear in IIS. Modifying the web.config file at the inetpub root with the hsts module actually works though. Not sure why the manager doesn't appear, but hey - different issue, right? 😃