473,382 Members | 1,289 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,382 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 34209
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: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: 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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.