Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Oct 25, 2010 01:43 PM by hemalkotak
Dec 06, 2007 07:24 PM|LINK
Hello all -
I am trying to implement a Web Service, which accepts a binary file as a byte array for one of its parameters. It's workings are based on this article:
Anyhow, the size of the file can be significant as the types of files being uploaded through the service are MP4 Video files. The service works on my WinXP SP2 localhost, but when I implement it onto a 2003 Server and try to consume the service, I get the
following error back from the web service:
The request failed with HTTP status 413: Request Entity Too Large.
I do a little searching around and find a few articles indicating that I need to adjust my "MaxReadAheadLength" property in IIS. A good example of one of those articles is here:
The suggestion from the article is to execute the following command on the web server:
cscript adsutil.vbs set w3svc/1/uploadreadaheadsize 204800
FYI, the adsutil.vbs is in your IIS's AdminScripts directory. I'm guessing that the /1/ part of the command is the IIS Site ID... I ran this command on the web server, using the exact command verbatim as well as replacing it w/ the web service's site Id
so that the command looked something like this instead:
cscript adsutil.vbs set w3svc/1992883476/uploadreadaheadsize 204800
No luck. I still get the same stinkin' error. Also, just so anyone replying doesn't have to suggest it, I have the following in the Web.Config for the web service already:
<httpRuntime maxRequestLength="1024000" executionTimeout="3600" useFullyQualifiedRedirectUrl="true" />
The only other thing I can think of is that I need to restart IIS for the changes to take effect, but the culprit service is running on a fairly high-traffic server that I can't really do this until late-night.
Also, when I was first researching this project, I found the original article as well as another article doing the same thing w/ WSE 3.0. That article is located below, but the first solution looked simpler, which is usually better, but only if it works
:) ... As Albert Einstein said, "Make everything as simple as possible, but not simpler."
The WSE 3.0 approach definitely looked more complicated, but if it's what I need to do to get the job done, then so be it...
I may have to go down this route if I can't get what I have in place fixed, but I really don't want to go there considering a deadline is looming over my head as of right now. We are in the "implementation" and just now running across the error.
Oh, one other interesting note... I have a form using a file upload control on the same website that the webservice is running. I can use the upload form with a large video with no problem, so obviously the request length isn't a factor there... not sure
Any suggestions are appreciated. I'll follow up w/ a fix if I get to it first.
Interapp Development, Inc.
... bold applications with elegant style.
WebService FileUpload HTTPError 413
Dec 07, 2007 03:53 AM|LINK
Well... duh... I meant to set the limit to 200 MB, which should have been 204800000 ...
Note to self: I need a vacation.
Oct 25, 2010 01:43 PM|LINK
I solved the problem you can find the solution @