-
-
Notifications
You must be signed in to change notification settings - Fork 797
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
ASP.NET MVC 4 application and StaticFile / ExtensionlessUrl handlers #37
Comments
That's what I ended up having to do to get MVC 5 apps to work. I have a pull request #33 that moves the content for the web.config file to the app.config file. Then anyone can update the setting in the letsencrypt.exe.config file with whatever they their web.config file to contain and it will use that content and you won't have to edit the source code and recompile it yourself. |
Sounds good. I don't see a problem in making the web.config use the above by default - since the only thing in that directory should be the ACME answer file anyway, so no other handlers are needed. Correct me if I'm wrong! |
One thing I would point out is that if your IIS site already has those settings applied, the configuration will fail. What I have done to reliably let the web.config apply is to set the removal of those options in the .well-known directory (since this tool only applies a web.config into the acme-challenge directory) as follows:
|
I don't think there will end up being a single web.config file that will work for everyone even if it is just under the .well-known directory. That's why I think anyone should be able to update it without recompiling the app from source if they needed to change it. It could be defaulted for what works for the majority of people, and if it doesn't work for someone they can change it easily. |
Since the acme-challenge folder is only used for one purpose... why not have the web.config file in that folder use
|
I second this idea. Didn't know enough about IIS config to put it so elegantly, but if this works that is a much cleaner solution. |
Thanks @anemitoff, your suggested config is exactly what I was aiming for! |
Thanks @anemitoff I rebuilded with your web.config and now it works. |
Partially added in pull #33. I had issues with testing new handler, that only worked on stock IIS on Server 2008 R2 for me. So I went without it as it can now be easily changed, and I went with the method that worked on the most IIS version. |
Added in pull #33. |
Version 1.8 has been released and should fix this for you. |
My ASP.NET MVC 4 application breaks when moving the StaticFile handler above ExtensionlessUrl handler.
However, with the handlers the other way round, the ACME answer file is not served (as documented in letsencrypt-win-simple error message).
Suggest modifying the web.config file in the
.well-known/acme-challenge
directory as follows:By removing all handler mappings except the StaticFileHandler from the
acme-challenge
directory, we can ensure that the file gets served.The text was updated successfully, but these errors were encountered: