AJAX, SSL and the 413 error

If you have been developing and testing your application using an UpdatePanel or something similar without problems over http, maybe you will find some issues when you go live using http over SSL. There is a well known issue when you make a roundtrip to the server making a PUT or POST and it’s related with the size of the message. In that cases you probably will get a 413 error similar to this:

image

The workaround resides on just to increase the value of the IIS UploadReadAHeadSize metabase parameter. Basically this parameter defines the allowed size of the data that can be posted to the server.

To change the value running on IIS 7.0 execute the following command:

appcmd.exe set config  -section:system.webServer/serverRuntime /uploadReadAheadSize:"491521"  /commit:apphost

if you’re running IIS 6.0

cscript adsutil.vbs set w3svc/1/uploadreadaheadsize 65536

You can get more information here:
http://technet.microsoft.com/en-us/library/cc737382(WS.10).aspx

HTH

Technorati Tags: ,,

377 Comments

Comments have been disabled for this content.