469,315 Members | 1,795 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,315 developers. It's quick & easy.

HttpException: Maximum request length exceeded

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.SoapExcepti on: 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.I nitialize()
--- End of inner exception stack trace ---
at System.Web.Services.Protocols.SoapServerProtocol.I nitialize()
at System.Web.Services.Protocols.ServerProtocolFactor y.Create(Type type,
HttpContext context, HttpRequest request, HttpResponse response, Boolean&
abortProcessing)"
Node=""
Role=""
Source="System.Web.Services"
StackTrace:
at
System.Web.Services.Protocols.SoapHttpClientProtoc ol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtoc ol.Invoke(String
methodName, Object[] parameters)

How can I transport this string anyway - especially as I cannot limit the
string length?

Best wishes,

Peter
Dec 25 '06 #1
3 33739
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.
"Peter Schmitz" wrote:
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.SoapExcepti on: 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.I nitialize()
--- End of inner exception stack trace ---
at System.Web.Services.Protocols.SoapServerProtocol.I nitialize()
at System.Web.Services.Protocols.ServerProtocolFactor y.Create(Type type,
HttpContext context, HttpRequest request, HttpResponse response, Boolean&
abortProcessing)"
Node=""
Role=""
Source="System.Web.Services"
StackTrace:
at
System.Web.Services.Protocols.SoapHttpClientProtoc ol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtoc ol.Invoke(String
methodName, Object[] parameters)

How can I transport this string anyway - especially as I cannot limit the
string length?

Best wishes,

Peter
Dec 26 '06 #2
Hi,

CAUSE
This problem occurs because the default value for the maxRequestLength
parameter in the <httpRuntimesection 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
<httpRuntimeconfiguration 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...b;EN-US;295626

Thanks and Regards,
Manish Bafna.
MCP and MCTS.
"Peter Schmitz" wrote:
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.SoapExcepti on: 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.I nitialize()
--- End of inner exception stack trace ---
at System.Web.Services.Protocols.SoapServerProtocol.I nitialize()
at System.Web.Services.Protocols.ServerProtocolFactor y.Create(Type type,
HttpContext context, HttpRequest request, HttpResponse response, Boolean&
abortProcessing)"
Node=""
Role=""
Source="System.Web.Services"
StackTrace:
at
System.Web.Services.Protocols.SoapHttpClientProtoc ol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtoc ol.Invoke(String
methodName, Object[] parameters)

How can I transport this string anyway - especially as I cannot limit the
string length?

Best wishes,

Peter
Dec 26 '06 #3
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.SoapExcepti on: 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.I nitialize()
--- End of inner exception stack trace ---
at System.Web.Services.Protocols.SoapServerProtocol.I nitialize()
at System.Web.Services.Protocols.ServerProtocolFactor y.Create(Type type,
HttpContext context, HttpRequest request, HttpResponse response, Boolean&
abortProcessing)"
Node=""
Role=""
Source="System.Web.Services"
StackTrace:
at
System.Web.Services.Protocols.SoapHttpClientProtoc ol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtoc ol.Invoke(String
methodName, Object[] parameters)

How can I transport this string anyway - especially as I cannot limit the
string length?

Best wishes,

Peter
Thanks it's working fine...

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Nov 21 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Kums | last post: by
3 posts views Thread by Hema S via DotNetMonster.com | last post: by
11 posts views Thread by =?Utf-8?B?VmxhZCBIcnlib2s=?= | last post: by
1 post views Thread by =?Utf-8?B?Q2h1Y2sgUA==?= | last post: by
reply views Thread by jobs | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by harlem98 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.