Maximum Request Length Exceeded when Deploying a Model to SSRS

Posted on 2009-12-23
Last Modified: 2013-11-26

I have a fairly common problem that has been answer before here, but the answer does not work. The problem is that when I try to deploy a model from Visual Studio 2008 to our SQL Reporting Server, part of the model which is 13MB comes back with the error "...Maximum request length exceeded..." and will not transfer to the Reporting Server.

Now the common solution to this is to edit the httpRuntime maxRequestLength, and executionTimeout in either the we.config or the machine.config and change the limits to allow the files greater then 4MB to pass.

I changed the limits in both of them just to be sure. Did a restart on IIS. Tried to deploy the model again and came back with the same error. I also tried various sizes and am currently using 102400 (100MB) and 1200 seconds. Nothing seems to change anything.

My question would be, is there a work around for this problem if editing web.config and machine.config accomplish nothing?

Any help is appreciated and attached is the error code, cleaned up a little.
Error   1       

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.ServerProtocol.SetContext(Type type, HttpContext context, HttpRequest request, HttpResponse response)    
at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing)     

D:\Data\Sql\ReportServices\Kronos Model Project\Kronos Model Project\Kronos - Tkcsdb.smdl       0       0

Open in new window

Question by:Ar3s
    LVL 57

    Expert Comment

    by:Raja Jegan R
    When you upload files greater than 4 MB ( 13 MB in your case) you might get this error..
    And the fix given below:
    LVL 2

    Author Comment

    I am aware that the standard fix for this problem is that the limit in web.config or machine.config is set to 4 MB.

    However, if you go back and read my problem, the fix does not work. Even when the parameters are changed, the problem persists.

    Is there a workaround for the problem if standard fix does not work?
    LVL 57

    Expert Comment

    by:Raja Jegan R
    So, you have set it to 1024000(100 MB) now..
    Have you restarted your IIS after doing this configuration to get it updated..
    LVL 5

    Accepted Solution

    Go  to the following location
    C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportManager\Web.config

    Just add the maxRequestLength property here and set a size appropriate to you

    The example below is 10mb
    <httpRuntime executionTimeout="9000"  maxRequestLength="10240"/>
    Hope this will help you.
    LVL 2

    Author Comment


    After saving the config files, I have done a service level restart on IIS as well as a full server restart with no effect.


    The web.config file you mentioned has already been changed, and here is what it was change to:

    <httpRuntime executionTimeout="9000" maxRequestLength="102400" />

    That would be 100 MB if I'm not mistaken. But despite it being set to 100 MB in both machine.config and web.config, I still get the error trying to deploy a 13 MB file.
    LVL 2

    Author Comment


    The problem has been solved.

    The root of the problem here was .NET. Nothing changed when editing the web.config files. However, there were two machine.config files on the server in the following locations:




    The machine.config in the v1.1.4322 folder had exactly what I was looking for with comments on what to replace. But changes these settings will not affect anything. Changing the machine.config for v2.0.50727 will have an affect. The reason why this is, is because IIS was using v2.0.50727 (but changing IIS to use 1.1 did not accomplish anything). Now the strange thing about the 2.0.5 version was that it did not have any of the parameters already in it that I needed, so I skipped over it when my search didn't find maxRequestLength (my mistake there).


    1. Go to C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG
    2. Open machine.config
    3. Search for <system.web>
    4. Add in <httpRuntime executionTimeout="9000" maxRequestLength="102400" /> under the <system.web> (I added it right before the end)
    5. Save
    6. Restart IIS

    That should fix the problem. I attached the code that I edited so you know what to look for. The first part is from the file that doesn't affect anything but tells you what everything does. The second part is the part that I edited and fix everything with.
    httpRuntime Attributes:
              executionTimeout="[seconds]" - time in seconds before request is automatically timed out
              maxRequestLength="[KBytes]" - KBytes size of maximum request length to accept
              useFullyQualifiedRedirectUrl="[true|false]" - Fully qualifiy the URL for client redirects
              minFreeThreads="[count]" - minimum number of free thread to allow execution of new requests
              minLocalRequestFreeThreads="[count]" - minimum number of free thread to allow execution of new local requests
              appRequestQueueLimit="[count]" - maximum number of requests queued for the application
              enableKernelOutputCache="[true|false]" - enable the http.sys cache on IIS6 and higher - default is true
              enableVersionHeader="[true|false]" - outputs X-AspNet-Version header with each request
    		<processModel autoConfig="true"/>
    				<add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="LocalSqlServer" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="true" applicationName="/" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="7" minRequiredNonalphanumericCharacters="1" passwordAttemptWindow="10" passwordStrengthRegularExpression=""/>
    				<add name="AspNetSqlProfileProvider" connectionStringName="LocalSqlServer" applicationName="/" type="System.Web.Profile.SqlProfileProvider, System.Web, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
    				<add name="AspNetSqlRoleProvider" connectionStringName="LocalSqlServer" applicationName="/" type="System.Web.Security.SqlRoleProvider, System.Web, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
    				<add name="AspNetWindowsTokenRoleProvider" applicationName="/" type="System.Web.Security.WindowsTokenRoleProvider, System.Web, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
    		<httpRuntime executionTimeout="9000" maxRequestLength="102400" />

    Open in new window

    LVL 2

    Author Closing Comment

    This put me on the right path by letting me know that I can add in the lines when the parameters don't already exist

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Hi, In my previous Article  ( discussed some basic understanding of Microstrategy that how we can get in Intro of Microstrategy (MSTR). Now it's tim…
    How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!

    732 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now