dnnsoftware / Dnn.Platform

DNN (formerly DotNetNuke) is the leading open source web content management platform (CMS) in the Microsoft ecosystem.
https://dnncommunity.org/
MIT License
1.03k stars 750 forks source link

[Enhancement]: Proactive Warning when web.config is very large #5891

Open iJungleboy opened 10 months ago

iJungleboy commented 10 months ago

Is there an existing issue for this?

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:

image

Description of alternatives considered

We could also

  1. Place the commented out lines in a separate file - eg. web.history.config - I would kind of like this
  2. Auto fix this (remove older comments) - very difficult and could remove things the user may still need
  3. Auto-backup the web.config and auto fix - similar problems

Anything else?

No response

Do you be plan to contribute code for this enhancement?

Would you be interested in sponsoring this enhancement?

Code of Conduct

mitchelsellers commented 10 months ago

I really like the idea of a warning, keeping the changes in context is a good idea!

david-poindexter commented 10 months ago

@iJungleboy this would be a great enhancement. I like the idea of a UI warning when a certain threshold is met.

moorecreative commented 9 months ago

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

cklenk commented 9 months ago

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.