Maximum Request Length Exceeded when Deploying a Model to SSRS


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

Kyle LambertIT ManagerAsked:
Who is Participating?
sureshchsahuConnect With a Mentor Commented:
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.
Raja Jegan RSQL Server DBA & ArchitectCommented:
When you upload files greater than 4 MB ( 13 MB in your case) you might get this error..
And the fix given below:
Kyle LambertIT ManagerAuthor Commented:
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?
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Raja Jegan RSQL Server DBA & ArchitectCommented:
So, you have set it to 1024000(100 MB) now..
Have you restarted your IIS after doing this configuration to get it updated..
Kyle LambertIT ManagerAuthor Commented:

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.
Kyle LambertIT ManagerAuthor Commented:

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

Kyle LambertIT ManagerAuthor Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.