I've written a WCF service with .NET 4.0, which is hosted on my Windows 7 x64
Ultimate system with IIS 7.5.
One of the service methods has an 'object' as argument and I'm trying to send a byte[] which contains a picture.
As long as the file size of this picture is less then approx. 48KB, all goes well. But if I'm trying to upload a larger picture, the WCF service returns an error: (413) Request Entity Too Large.
So ofcourse I've spent 3 hours Googling the error message and every topic I've seen about this subject suggests raising the 'uploadReadAheadSize' property.
So what I've done is using the following commands (10485760 = 10MB):
"appcmd.exe set config -section:system.webserver/serverruntime/uploadreadaheadsize: 10485760 /commit:apphost"
"cscript adsutil.vbs set w3svc/<APP_ID>/uploadreadaheadsize 10485760"
I've also used IIS Manager to set the value by opening the site and going to "Configuration Editor" under Management.
Unfortunately I'm still getting the Request Entity Too Large error and it's getting really frustrating!
So does anybody know what else I can try to fix this error?
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…