473,394 Members | 1,696 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

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 34211
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Kums | last post by:
What is the maximum permissible size of a database? Is there any limitation. What is the maximum # of tablespace's allowed in a database? Thanks for your response.
2
by: Jacky Kwok | last post by:
Dear all: I know how to use the "Application_Error" in "Global.asax" to catch the exception and display my own error message page. However, I found "Application_Error" cannot handle the error...
2
by: cmay | last post by:
I have changed my config files to set the limit for files being uploaded to 30 MB, but every now and then someone tries to upload a file larger than this. All I want, is to be able to trap the...
0
by: Chris Hayes | last post by:
I've seen that when an HTTP 400 error occurs ("Maximum request length exceeded") that some of my Session level variables and Cookies get "lost" is there a way to preserve them without resorting to...
3
by: Hema S via DotNetMonster.com | last post by:
Hi All, My requirement is like I should not use pagination in datagrid... and some times the data exceed over 1000 and my file size if i save it as html becomes more than 7 MB and when i try...
3
by: J055 | last post by:
Hi How do I tell the user he has tried to upload a file which is too big... 1. when the httpRuntime.maxRequestLength has been exceeded and 2. when the uploaded file is under then...
11
by: =?Utf-8?B?VmxhZCBIcnlib2s=?= | last post by:
Using IIS7, Vista x64, ASP.NET 2.0. I am getting HTTP 400 "Bad Request" for the following URL:...
1
by: =?Utf-8?B?Q2h1Y2sgUA==?= | last post by:
I have an HttpModule used for Unhandled Exception processing. The module monitors both application.Error += new EventHandler(OnError); //regular UHE AppDomain.CurrentDomain.UnhandledException +=...
0
by: jobs | last post by:
re: Oracle Exceeded maximum idle time I have asp.net web gridview that is populated by a function that calls an Oracle procedure that returns a dataset. At most, it might take 2 or 4 seconds to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.