As I discussed in the past, UAG has certain limitations on the sizes of files it can handle. Depending on the file’s content type, UAG may need to load the file into a special content-parsing buffer, or it may pass the file directly as-is. For HTML based files (including static HTML, CSS or JS files, as well as dynamic ASP or PHP files), the content needs to be parsed so that UAG can perform host-address translation, which is required to support publishing multiple applications with a single public IP address. For non-textual content such as images, videos, executable and other binary data, content parsing is not required. When the file does need parsing, it’s stored in the buffer, which is limited by default to 10 MB. This means that if you try to pass a larger file via UAG, you will receive a 500 error.
As I discussed in the above blog, the buffer size is changeable, and this way you can configure UAG to handle larger files. However, there are other players in this game, and they need to be kept in mind. I have received my fair share of requests from people who adjusted the buffer size, but still got errors. The most common is from SharePoint, which has a built-in limitation of 50 MB for uploaded file size. Luckily, this too can be adjusted. To do so:
1. Open the SharePoint Central Administration page
2. Go to Application Management
3. Click on Web App General Settings
4. In the Maximum Upload Size settings, increase (or decrease) the value to one that suits your needs.
Another possible member of this party is the WebDav client, which is part of the client operating system. It too has a limitation for file sizes, set at 50 MB. If you are running into failures, you can use the registry on the client to increase the maximum. To do so:
1) On the client, open the registry editor
2) Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WebClient\Parameters
3) Edit the value FileSizeLimitInBytes
4) Change it to Decimal, and raise it from the default of 50,000,000 to any number that suits your purposese.
5) Close the registry editor
Sometimes, even if the file sizes are set right, the transfer can still break simply because the time it takes is too long. IIS comes pre-configured with a 2 minute timeout value, so if the transfer takes longer, it will error out even if it’s not reaching the 50 MB limit, or if the limit has been raised. Changing the timeout to a higher value can alleviate this, but keep in mind that making that change on the UAG web server is *not* supported. You can make such changes on the IIS server on your SharePoint, Exchange or other Microsoft IIS-based platforms, though. The procedure is described here:
One additional possible reason for a failure is an IIS-level limitation on the content length, which is set by default to 28 MB. Note that this too is unsupported for modification on a UAG server, but if the errors comes from your backend, you can use the procedure outlined here to adjust it: