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

Installer and App Pool crash fixes #12

Merged
merged 4 commits into from
Mar 3, 2017

Conversation

andrewcbancroft
Copy link
Contributor

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? 😃

@FWest98
Copy link
Owner

FWest98 commented Mar 3, 2017

Oh man that's so kind of you! Awesome work!
I'm doing fine, but I'm just way too busy to do anything on this. Just happened to place this on my "really need to do"-list but I think much of the problems are solved now. Thanks for the work!

@FWest98 FWest98 merged commit 9b65858 into FWest98:develop Mar 3, 2017
@andrewcbancroft
Copy link
Contributor Author

Awesome!

So I think the only thing you might do now is rebuild the installer and re-package the source for the releases section. I wouldn't mind trying that, but the SNK deal is what would bother me about submitting that to you.

@FWest98
Copy link
Owner

FWest98 commented Mar 3, 2017

I will be doing that tomorrow (I hope) and mark a new release. I have the "original" SNK file so only I can sign new versions of this.

@FWest98
Copy link
Owner

FWest98 commented Mar 4, 2017

Very strange... In both my Win Server 2012R2 and my local Win10 and Win2016 IIS installs I don't have a /configuration/system.webServer/modules entry, while I do have a /configuration/location[path='']/system.webServer/modules entry... Both are correct in newer versions of IIS, however only one of both can be present. So your solution breaks on my machine and my old solution breaks on others. So the entry should be added where the section is currently specified. However, that does not seem to be possible with wix...

Oh nevermind. It is possible using the power of XPath :)

@andrewcbancroft
Copy link
Contributor Author

"It is possible using the power of XPath" -- That is fantastic - 😄 I was going to suggest maybe an alternative method would be to use appcmd.exe to register the module like the Strip Headers module does. But I'm very glad you have the XPath skills to make it happen.

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

Successfully merging this pull request may close these issues.

Unable to install via latest 2.2.0 MSI
3 participants