HI,
in one of my webservices I need to provide a string to the consuming
application that can become really large (depending on user input).
Unfortunately, if the string becomes too long, the following error occurrs:
System.Web.Services.Protocols.SoapException was unhandled
Actor=""
Lang=""
Message="System.Web.Services.Protocols.SoapException: There was an
exception running the extensions specified in the config file. --->
System.Web.HttpException: Maximum request length exceeded.
at System.Web.HttpRequest.GetEntireRawContent()
at System.Web.HttpRequest.get_InputStream()
at System.Web.Services.Protocols.SoapServerProtocol.Initialize()
--- End of inner exception stack trace ---
at System.Web.Services.Protocols.SoapServerProtocol.Initialize()
at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type,
HttpContext context, HttpRequest request, HttpResponse response, Boolean&
abortProcessing)"
Node=""
Role=""
Source="System.Web.Services"
StackTrace:
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)
How can I transport this string anyway - especially as I cannot limit the
string length?
Best wishes,
Peter
Manish Bafna - 26 Dec 2006 04:58 GMT
Hi,
You can set it in the web.config file with:
<httpRuntime maxRequestLength="9000"></httpRuntime>
The above will set it to 9 mb
Thanks and Regards,
Manish Bafna.
MCP and MCTS.
> HI,
>
[quoted text clipped - 31 lines]
>
> Peter
Manish Bafna - 26 Dec 2006 05:30 GMT
Hi,
CAUSE
This problem occurs because the default value for the maxRequestLength
parameter in the <httpRuntime> section of the Machine.config file is 4096 (4
megabytes). As a result, files that are larger than this value are not
uploaded by default.
RESOLUTION
To resolve this problem, use one of the following methods: • In the
Machine.config file, change the maxRequestLength attribute of the
<httpRuntime> configuration section to a larger value. This change affects
the whole computer.
• In the Web.config file, override the value of maxRequestLength for the
application. For example, the following entry in Web.config allows files that
are less than or equal to 8 megabytes (MB) to be uploaded:<httpRuntime
maxRequestLength="8192" />
References : http://support.microsoft.com/default.aspx?scid=kb;EN-US;295626
Thanks and Regards,
Manish Bafna.
MCP and MCTS.
> HI,
>
[quoted text clipped - 31 lines]
>
> Peter
Narayanan - 21 Nov 2007 06:22 GMT
> HI,
>
[quoted text clipped - 31 lines]
>
> Peter
Thanks it's working fine...
BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities