.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Post New Web Links

Max request length exceeded

Posted By:      Posted Date: September 25, 2010    Points: 0   Category :ASP.Net

There are a lot of posts relating to this issue but none of the solutions seem to solve our problem.  We are getting the following in our Application Logs:

Event code: 3005 
Event message: An unhandled exception has occurred. 

Event code: 3005 
Event message: An unhandled exception has occurred. 
Exception information: 
    Exception type: SoapException 
    Exception message: There was an exception running the extensions specified in the config file. ---> Maximum request length exceeded. 

web.config has the following in the <system.web> area (we can get very big file transfers):

<httpRuntime maxRequestLength="1048576" executionTimeout="600" />

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG\machine.config has (in <system.web>):

<httpRuntime maxRequestLength="1048576" executionTimeout="600" />

I'm not sure where else to look or what else to try.  Any insight is appreciated.

View Complete Post

More Related Resource Links

Maximum request length exceeded (Yet Another)


I have found numerous links and articles that all suggest modifying either the Web.config or Machine.config file for the maxRequestLength value which is by default 4MB.

However, I have modified the web.config file several times over in the ReportServer directory as well as the ReportManager directory and nothing seems to resolve this issue on my system.

I am running SSRS 2008 on Windows 2008 64-bit Enterprise with 32GB RAM and a dual 3.33GHz processor. Also running 2 separate instances of Report Server on this system so I'm not certain if I should be looking at some other web.config file but I believe both instances should be using the same file. Also should mention that the report has 16 parameters.

1 Article suggested to execute iisreset after altering the file but I am running IIS 7.0 which doesn't use iisreset. So instead, I stopped and restarted the Reporting Server instance using the RS Configuration Manager but it doesn't seem to make a difference.

Hopefully someone here can help me out??? Are there any other aspects of the configuration that I should be looking at to resolve the problem?


Maximum Request length Exceeded Error - web.config modification does not fix


I am running into the Maximum Request length exceeded error on one of my SSRS reports - SQL Server 2005 SP2.  I modified my web.config file as described in this and other threads:


I restarted all services (IIS, Reporting services) and while it fixes the problem with the parameter, I am getting other errors that are preventing the report from rendering as expected. For example, I have a document map in the report which no longer displays, and expand/collapse capability in the report doesn't work.  Any other ideas for fixing this issue? 

Handle: maximum request length exceeded


When uploading a file over 4mb I receive error: maximum request length exceeded.

This is fine - I don't want users to upload files any larger.

But, anyone know how to handle the error in a clean way?

It appears I can't avoid it with an IF statement or Try/Catch block.



Maximum request length exceeded



I created an asp.net to upload files.
My code is written in visual basic.net

When I try to upload a file bigger than my
maxRequestLength setting I get this exception:

(0x80004005): Maximum request length exceeded.

I can not catch the exception even using try-catch-finally

Is there a way to catch this exception?


The maximum string content length quota (8192) has been exceeded while reading XML data.

Hi, I have been working on implementing a WCF service and have run into this problem with the maxStringContentLength.  I have read a bunch of posts here on how to correct it and none of them have worked.  I have updated my web.config in my local IIS5 published service to be maxStringContentLength="2147483647" and have updated my application's app.config to be maxStringContentLength="2147483647".  I delete all DLL's, rebuild, restart IIS, make sure all VS 2008 virtual webs are stopped, republish multiple times...even reboot my machine and I continually receive the following error message:The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter http://tempuri.org/qlStatement. The InnerException message was 'There was an error deserializing the object of type System.String. The maximum string content length quota (8192) has been exceeded while reading XML data. This quota may be increased by changing the MaxStringContentLength property on the XmlDictionaryReaderQuotas object used when creating the XML reader. Line 171, position 35.'.  Please see InnerException for more details.I am running the service on my local machine: Win XP SP2, IIS5, .Net 3.5, VS 2008Here is my WCF service's servicemodel section of the web.config:    <system.serviceModel>    <bindings>      <wsHt

The Maximum String contenet length quota(8192) has been exceeded while reading xml data

I am using WCF service and calling in vb6.0 application.
I am using typed contract moniker object to access the services from VB6.0. Everything working fine.
Service hosted in windows service using nettcp binidng. Service method return type is XMl string. While I try to access the method I am getting the error message "The Maximum String contenet length quota(8192) has been exceeded while reading xml data". I have modifed readerquota Service appconfig file and svcutil.exe generated client config file.
I put the client config fiel in vb application exe folder.

I have mentioned the Bindingconfiguration name also.

When I changed the cleint config file with junk data vb application giving the  same error. I am not sure whether VB 6.o using client config file.

Please help me.

<binding name="NetTcpBindingEndpoint" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions" hostNameComparisonMode="StrongWildcard" listenBacklog="10" maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxConnections="10" maxReceivedMessageSize

The maximum string content length quota (8192) has been exceeded while reading XML data.


 Hi, Im getting the error when I am sending the large message to WCF service, I've seen previous post regarding the same prob and tried all the possibilities but still facing the problem.
Changed the reader quotas values of Client config and service config but no help.

Also tried by adding the below code in client and service  


 BasicHttpBinding basicBinding = new BasicHttpBinding();
        basicBinding.MaxBufferSize = Int32.MaxValue;
        basicBinding.MaxReceivedMessageSize = Int32.MaxValue;
        basicBinding.MaxBufferPoolSize = Int32.MaxValue;

        XmlDictionaryReaderQuotas myReaderQuotas = new XmlDictionaryReaderQuotas();
        myReaderQuotas.MaxStringContentLength = Int32.MaxValue;
        myReaderQuotas.MaxArrayLength = Int32.MaxValue;
        myReaderQuotas.MaxBytesPerRead = Int32.MaxValue;
        myReaderQuotas.MaxDepth = Int32.MaxValue;
        myReaderQuotas.MaxNameTableCharCount = Int32.MaxValue;

But still facing the issue.

Here is my

"The maximum string content length quota (8192) has been exceeded while reading XML data. "

I keep getting this when I send a ton of text over the line... and this is SMALL compared to some of the text I want to move.  Any ideas?

The formatter threw an exception while trying to deserialize the message: Error in deserializing body of request message for operation 'UpdateBlogEntry'. The maximum string content length quota (8192) has been exceeded while reading XML data. This quota may be increased by changing the MaxStringContentLength property on the XmlDictionaryReaderQuotas object used when creating the XML reader. Line 180, position 518.

The maximum string content length quota (8192) has been exceeded while reading XML data.


I'm getting this message when invoke an operation on the service.

I have the readerQuotas configured in the client's config file as follows:

<readerQuotas maxDepth="32" maxStringContentLength="2048000" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" />


The maximum array length quota (16384) has been exceeded while reading XML data.



I am getting this error when I try to send a message to my service. I have updated the ReaderQuotas on both the client and the server. Is there something else that I need to do to get the service to accept the message?





Dear gentlemen and ladies of the Microsoft Dynamic Data Team,

Mr. Steve Naughton says (and I hope so) that there might be chances that you read the posts published in this forum: I really hope so.

If that were the case then I am formally requesting to you in providing a "real answer" to my question:

I want to customize a dynamic data page (the details one) so I can have access to the data it has been already gathered from the end user UI (details.aspx) and use it to pass this same data to the following controls/pages that I am going to display next time to the end user.

For instance:

I have a screen with different types of data in it: texts, numbers, dates, check boxes, radio buttons and dropdownlists that has been filled with data by the end user. I want now to reset all fields exept the dropdownlist of which I'd like to keep the previously chosen values(the very same thing you do between dropdownlist of List.aspx ad Details.aspx). Even with FoxPro I could do that because data and controls were available there. It was as simple as setting carrying on to true.


I have found my

view state vs request parameters


If  the view state is the data entered into the form fields then they are supposed to be available in the request parameters or request body. Then why would we need view state for?


Unique ID throughout entire request



I am hoping somene here could advise me on a better solution to my present problem.  First a little background information on the application. 

I have a web application using the 3.5 framework.  The structure of this application is as follows: UI -> WebService   -> Business Layer -> DataAccess Layer.   What I want to accomplish is for every request (click on a link or button) have a unique identifer that follows this request through its entire lifecycle.  This unique identifer can be accessible anywhere within this request.  We use Response.Redirects which could easily be changed to Server.Transfers (although I do not want to do that) but  the problem lies with the web service calls.  Currently, a GUID is set in the ApplicationRequest.  This GUID checks for a guid value in the RawURL and if so, assigns this value to a HttpContext Item.  If not, HttpContext.Items gets a new one created.  However, this idea is wrong and will need to be revisisted.  The bigger problem is with the web service calls.  Without changing every web service method signature, and every call for that matter, is there a way of getting this GUID there.  I created a web method in every web service so that each time I instantiate a web service object in the UI, before calling any

System.Security.SecurityException: Request for the permission of type 'System.Web.AspNetHostingPerm


Good Day all,

Having an issue with an outside user accessing my IIS7 box. I do not have this problem when running the website from my host machine. I found this post: Http://forums.asp.net/t/1371394.aspx. I assure you that this is not a solution because I am not storing any of my files on a network share. 

What do you think my approach should be. 

I already have read rights to IIS user to my BIN folder. 

Thanks for the help. 

IIS request filtering module


Hi folks,

I have migrated my web application to iis 7.5 Now I am using windows 7 as dev machine.

the problem is it takes several seconds to download a single page into web browser now. It contains only 300 records.

Everything is ok on prod website though. Prod version contains up to 200000 records .I can't also use code profile tool of red gate to analyze possible bottlenecks since the software in question can't restart IIS. No errors in IIS logs. I am using ISAPI Rewrite 3 filter by Helicon to apply some URL rewriting rules. I am thinking about conflict between ISAPI rewriting rules and default IIS 7.5 request filtering rules, since the IIS request filtering module gets a higher priority than even the built-in IIS 7.5 rewriter module. Is it possible to tweak the module through web.config so that priority is given to ISAPI rewriting rules or something like that?

Frankly, I spent several days to figure out solution. No success...

I've also deployed the application on IIS 5.1. Everything works fine. Any ideas about possible solution for IIS 7.5?

How to implement custom HttpContext for each request under class that implements IHTTPHandler


Hello All,

I created an application and implemented IHTTPHandler for all incoming request ending with ".aspx" extension.

Under "ProcessRequest" module, I am creating an instance of HttpContext (with URL attributes different from my application's URL i.e. if I am working on localhost then speciying Yahoo.com as its URL) and assigning it to "context" which comes as method argument.

After redirection, an error is generated. Also, the custom HTTPContext is not passed to the requested page (default.aspx, in my case.)

Code is as follows.

    Public Sub ProcessRequest(ByVal context As System.Web.HttpContext) Implements System.Web.IHttpHandler.ProcessRequest
            Dim requestedUrl As String
            Dim targetUrl As String
            Dim urlLength As Integer
            'Save settings which will be used while redirecting to appropriate page
            requestedUrl = context.Request.RawUrl
            If requestedUrl.IndexOf("?") >= 0 Then
                targetUrl = requestedUrl.Substring(0, requestedUrl.IndexOf("?"))
                targetUrl = requestedUrl
            End If
            If targetUrl = Nothing Or targetUrl.Length = 0 Then
                targetUrl = requestedUrl
            End If

Invalid length for a Base-64 char array for my coding in ASP.net C#. How to solve it ?


Hi Friends ,

I have done encrypted password and decode but i got error  like  this  " Invalid length for a Base-64 char array" .

Pls help . Thanks


psswd = txtPassword.Text;

pwed = base64Decode(psswd);

public string base64Decode(string sData)
            System.Text.UTF8Encoding encoder = new System.Text.UTF8Encoding();
            System.Text.Decoder utf8Decode = encoder.GetDecoder();
            byte[] todecode_byte = Convert.FromBase64String(sData);
            int charCount = utf8Decode.GetCharCount(todecode_byte, 0, todecode_byte.Length);
            char[] decoded_char = new char[charCount];
            utf8Decode.GetChars(todecode_byte, 0, todecode_byte.Length, decoded_char, 0);
            string result = new String(decoded_char); return result;

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend