[Enhancement]: Proactive Warning when web.config is very large
Is there an existing issue for this?
- [X] I have searched the existing issues
Description of problem
When installing extensions - especially on sites with many upgrades - the web.config can become so large that the system fails to start. The limit is ca. 250k
The problem is that any change in DLLs results in older references to the DLL being commented out - which is good, but the file can grow quickly on each module upgrade. This is especially visible when upgrading 2sxc a lot. Even if the DLLs don't change, the web.config grows a lot.
When this happens, the user is typically shocked and has no clue what to do - especially because he/she just installed something, so they tend to think the last installed extension caused problems.
Description of solution
I believe the UIs for installing extensions should have a warning when the web.config is bigger than 200k, linking to instructions what should be done. EG ca. here:
Description of alternatives considered
We could also
- Place the commented out lines in a separate file - eg.
web.history.config- I would kind of like this - Auto fix this (remove older comments) - very difficult and could remove things the user may still need
- Auto-backup the web.config and auto fix - similar problems
Anything else?
No response
Do you be plan to contribute code for this enhancement?
- [ ] Yes
Would you be interested in sponsoring this enhancement?
- [ ] Yes
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
I really like the idea of a warning, keeping the changes in context is a good idea!
@iJungleboy this would be a great enhancement. I like the idea of a UI warning when a certain threshold is met.
I think that a 200K web.config is the largest I have ever heard of! That's an incredible size! and, like you said, much of it is likely commented out sections. I think a good element to consider as another feature, perhaps in the Config Manager screen, would be ability to "clean up" or "condense" the web.config by removing the commented out sections.
But back to the point of this ticket, I think that a warning before install action happening seems like a good place to occur
This would be amazing. We've run into this issue before too when doing lots of module updates resulting in a magnitude of commented out sections. We did not realize this would take down the entire site haha. Oops.