An important message to our customers about the current COVID-19/Coronavirus situation. LEARN MORE.
We are adding files to the viewing session with HttpWebRequests. We noticed with larger files the response is:
(413) Request Entity Too Large. - at System.Net.HttpWebRequest.GetResponse().
What could be the cause?
A 413 request entity too large error occurs when a request made from a client is too large to be processed by the web server. If your web server is setting a particular HTTP request size limit, clients may come across a 413 request entity too large response. An example request that may cause this error would be if a client was trying to upload a large file to the server (e.g., a large media file).
Depending on which web server you use, implement the necessary changes described below to configure your web server’s maximum HTTP request size allowance. Below are some suggestions for popular Web Servers:
For Nginx users:
The directive that determines the allowable HTTP request size is client_max_body_size. This directive can be defined in your nginx.conf file located at /etc/nginx/nginx.conf
For Apache users:
The directive is LimitRequestBody which can be defined in your http.conf file or in an .htaccess file.
For IIS users: