WebException HTTP 400 Bad Request depends on size of file attach

V

vigori

I have an application that send a file to a web service (I built both the
application and the web service)
I set the max file size via web.config of the web service:

<httpRuntime executionTimeout="1800"
maxRequestLength="5000"
/>

When the file size exceed 5000 (kb) I receive the right exception
(System.Web.Services.Protocols.SoapException) that tell me that the dimension
is incorrect.
If I try to reduce the timeout and my application exceed the timeout, also
in this case receive the right exception.



But when I send i file larger then 4096 kbyte and less than 5000 kb (or the
limit set in maxRequestLength) I receive a generic System.Net.WebException:
The request failed with HTTP status 400: Bad Request
at
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters)

There was a limit in SOAP message size or the limit is in IIS?

I looked for a limit in IIS metabase.xml but I found nothing.
I also searched the solution in IIS newsgroup, it is maybe better that I
post these question there?

My Configuration is:
Windows 2003 (italian)
IIS 6.0
Web Services Enhancements 2.0 (on server and client)

Many thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,015
Latest member
AmbrosePal

Latest Threads

Top