In a standard installation of Infor CRM SLX, there is limit on the size of files you are allowed to upload, somewhere between 4 and 5 MB. While this limit is fine for many folks, it is possible to increase it by changing a value in the web.config file for the web client portal. The main place this limit is controlled is the maxRequestLength value, which has a default value of 5000 (KB). However, because IIS also has a default limit on the size file it can handle (somewhere between 25 and 30 MB), it also necessary to edit this value if wish to set the limit greater than 25 MB.

As with any time we edit web.config (or similar config files), you can edit the live version of the file at C:\inetpub\wwwroot\slxclient\web.config (or other portal like sdata or slxmobile, if also needed). If you edit this version and then run IISRESET using an admin level command prompt, the changes will be immediately present on the live site. In order for a change to the web.config file to be present after deployment, you must open Application Architect, go to the Project Explorer pane, and navigate to Portal Manager > SlxClient > Support Files > web.config. Editing the web.config file here will save it to the database so it will be included in the next deployment.

Once you have the web.config file open, find the maxRequestLength value (it is line 217 in my sample database. Edit the default value of 5000 (KB) to whatever you wish to change the limit to. Since that value in is KB, you can take the desired max file size in MB and multiply by 1000 to get the number of KB you would need to enter here (multiply by 1024 if you wish to be exact.) For example if I want to allows 10MB files, the exact number to put there would be 10240. Or if I were just eyeballing the math, I could put 10000 and but just shy of 10 MB, or go 11000 to be comfortably over it.

If you are setting this value for anything over 25 MB, you will also need to find the maxAllowedContentLength value and edit that as well, to overide IIS’s default limit for this. The lines used to specify maxAllowedContentLength are commented out, so you will need to delete the <!– and the –> before and after the security section markers (as shown). This value is in bytes, so you will need to multiply the desired number of MB by about a million to convert to number to you need here (1048576 to be exact). So if I had set my maxRequestLength to 40000, I would need to set maxAllowedContentLength to over 40000000 to match that limit here. (If I wanted the limit to be exactly 40 MB, I’d set maxRequestLength to 40960 and maxAllowedContentLength to 41943040.)

There is no particular advantage to having these numbers be very far apart. Hitting the limit for the first one (maxRequestLength) gives a nicer error message, so I would suggest setting the second value so that it is a bit higher than the first when converted to to MB. To continue my example, if I has set maxRequestLength to 40000, figuring that was close enough to 40 MB, I would set the maxAllowedContentLength to 4400000 to make sure I was just a bit higher on the IIS limit, thus ensuring any attempts to load a file over 40 MB would throw the preferred error message.




