0

I am trying to add the following code to my web.config file when installing a DotNetNuke module.

All the Sample files I have seen references providers and existing components on DNN. https://www.dnnsoftware.com/wiki/manifest-config-component

I was wondering I can use <component type="Config"> to add new settings to the web.config file. https://www.dnnsoftware.com/docs/developers/extensions/dnn-manifest-schema.html

This is the code I would want to add just before the closing </system.webServer> tag

<security>
   <requestFiltering>          
     <!--The default size is 30000000 bytes (28.6 MB). MaxValue is 4294967295 bytes (4 GB)-->
     <!-- 100 MB in bytes -->
     <requestLimits maxAllowedContentLength="104857600" />
     </requestFiltering>
 </security>
Tig7r
  • 525
  • 1
  • 4
  • 21

2 Answers2

3

You can, but please do be advised that there are other settings that control content upload lengths, so it might not be the only thing you need to change.

Also, please do be aware that there are security implications of increasing this value if this is something that is being commercially distributed.

Mitchel Sellers
  • 62,228
  • 14
  • 110
  • 173
2

Yes, you'll see some details at https://www.dnnsoftware.com/wiki/manifest-xml-merge

Joe Craig
  • 1,244
  • 1
  • 7
  • 7
  • Thanks for the link. It seems like they are only showing samples of adding references to providers. I can't find a sample showing how to add a simple configuration. – Tig7r Feb 25 '19 at 07:07