Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Maximum request length exceeded. Unknown Issue.
chrisb070819
#1 Posted : Saturday, 4 February 2012 6:57:01 PM(UTC)
Rank: Member

Joined: 4/02/2012(UTC)
Posts: 8
Location: St. Pete

I have searched for my issue in previous posts but either they didn't fit my issue or didn't fix it. I'll be putting the error log print out below. If you need any further information feel free to ask.


Some key information:
Running on Windows Server 2008 Standard Edition running IIS7.
Installed GSP using web platform installer.
Files 3 MB and below work fine.


Quote:
Error details
Url
http://www.chrisbelltech...ndler/upload.ashx?aid=5

Timestamp
2/4/2012 7:34:09 PM

Exception Type
System.Web.HttpException

Message
Maximum request length exceeded.

Source
System.Web

Target Site
System.Web.HttpRawUploadedContent GetEntireRawContent()

Stack Trace
at System.Web.HttpRequest.GetEntireRawContent()
at System.Web.HttpRequest.GetMultipartContent()
at System.Web.HttpRequest.FillInFormCollection()
at System.Web.HttpRequest.get_Form()
at System.Web.HttpRequest.get_Item(String key)
at GalleryServerPro.Web.Handler.upload.SaveFileToServer(HttpContext context)
at GalleryServerPro.Web.Handler.upload.ProcessRequest(HttpContext context)

App Error ID
51

Gallery ID
-2147483648

HTTP User Agent
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/534.52.7 (KHTML, like Gecko) Version/5.1.2 Safari/534.52.7

Form Variables
<none>

Cookies
.ASPXAUTH: 931FAC0DF02285E0C01FA5EB7FB13AF26661164CDFE143708B4D6403BBD30E2C2894BFEA 69D9B9CD5B4B2DA52619894111B3A9765DF5C1CD4F4D2CCF9464134A036BB51EE4E2C19 2689DC6A0B52D6DFD650E0FE279CC9CCD0BE737AA3DB5B3BEC427233B47526FBC5105F9 0D072CC99EFC9C4E37A28BB0D820CE7C284CE50122
ASP.NET_SessionId: 5rjzejmgrhridtjocuv2c5vy

Session Variables
1: 1
ReferringUrl: http://www.chrisbelltech...lery/default.aspx?aid=5
SkippedFiles: System.Collections.Generic.List`1[GalleryServerPro.Business.ActionResult ]

Server Variables
ALL_HTTP: HTTP_CONNECTION:keep-alive
HTTP_CONTENT_LENGTH:4291576
HTTP_CONTENT_TYPE:multipart/form-data; boundary=----WebKitFormBoundaryWBBm1Nc4JfMGsgGl
HTTP_ACCEPT:*/*
HTTP_ACCEPT_ENCODING:gzip, deflate
HTTP_ACCEPT_LANGUAGE:en-us
HTTP_COOKIE:.ASPXAUTH=931FAC0DF02285E0C01FA5EB7FB13AF26661164CDFE143708B 4D6403BBD30E2C2894BFEA69D9B9CD5B4B2DA52619894111B3A9765DF5C1CD4F4D2CCF9 464134A036BB51EE4E2C192689DC6A0B52D6DFD650E0FE279CC9CCD0BE737AA3DB5B3BE C427233B47526FBC5105F90D072CC99EFC9C4E37A28BB0D820CE7C284CE50122; ASP.NET_SessionId=5rjzejmgrhridtjocuv2c5vy
HTTP_HOST:www.chrisbelltech.com
HTTP_REFERER:http://www.chrisbelltech.com/gallery/default.aspx?g=task_ad dobjects&aid=5
HTTP_USER_AGENT:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/534.52.7 (KHTML, like Gecko) Version/5.1.2 Safari/534.52.7
HTTP_ORIGIN:http://www.chrisbelltech.com
ALL_RAW: Connection: keep-alive
Content-Length: 4291576
Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryWBBm1Nc4JfMGsgGl
Accept: */*
Accept-Encoding: gzip, deflate
Accept-Language: en-us
Cookie: .ASPXAUTH=931FAC0DF02285E0C01FA5EB7FB13AF26661164CDFE143708B4D6403BBD30E 2C2894BFEA69D9B9CD5B4B2DA52619894111B3A9765DF5C1CD4F4D2CCF9464134A036BB 51EE4E2C192689DC6A0B52D6DFD650E0FE279CC9CCD0BE737AA3DB5B3BEC427233B4752 6FBC5105F90D072CC99EFC9C4E37A28BB0D820CE7C284CE50122; ASP.NET_SessionId=5rjzejmgrhridtjocuv2c5vy
Host: www.chrisbelltech.com
Referer: http://www.chrisbelltech...ask_addobjects&aid= 5
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/534.52.7 (KHTML, like Gecko) Version/5.1.2 Safari/534.52.7
Origin: http://www.chrisbelltech.com
APPL_MD_PATH: /LM/W3SVC/2/ROOT/gallery
APPL_PHYSICAL_PATH: C:\inetpub\chrisbelltechwwwroot\gallery\
AUTH_TYPE: Forms
AUTH_USER: admin
AUTH_PASSWORD:
LOGON_USER: admin
REMOTE_USER: admin
CERT_COOKIE:
CERT_FLAGS:
CERT_ISSUER:
CERT_KEYSIZE:
CERT_SECRETKEYSIZE:
CERT_SERIALNUMBER:
CERT_SERVER_ISSUER:
CERT_SERVER_SUBJECT:
CERT_SUBJECT:
CONTENT_LENGTH: 4291576
CONTENT_TYPE: multipart/form-data; boundary=----WebKitFormBoundaryWBBm1Nc4JfMGsgGl
GATEWAY_INTERFACE: CGI/1.1
HTTPS: off
HTTPS_KEYSIZE:
HTTPS_SECRETKEYSIZE:
HTTPS_SERVER_ISSUER:
HTTPS_SERVER_SUBJECT:
INSTANCE_ID: 2
INSTANCE_META_PATH: /LM/W3SVC/2
LOCAL_ADDR: 192.168.0.21
PATH_INFO: /gallery/gs/handler/upload.ashx
PATH_TRANSLATED: C:\inetpub\chrisbelltechwwwroot\gallery\gs\handler\upload.ashx
QUERY_STRING: aid=5
REMOTE_ADDR: 97.96.89.239
REMOTE_HOST: 97.96.89.239
REMOTE_PORT: 51789
REQUEST_METHOD: POST
SCRIPT_NAME: /gallery/gs/handler/upload.ashx
SERVER_NAME: www.chrisbelltech.com
SERVER_PORT: 80
SERVER_PORT_SECURE: 0
SERVER_PROTOCOL: HTTP/1.1
SERVER_SOFTWARE: Microsoft-IIS/7.0
URL: /gallery/gs/handler/upload.ashx
HTTP_CONNECTION: keep-alive
HTTP_CONTENT_LENGTH: 4291576
HTTP_CONTENT_TYPE: multipart/form-data; boundary=----WebKitFormBoundaryWBBm1Nc4JfMGsgGl
HTTP_ACCEPT: */*
HTTP_ACCEPT_ENCODING: gzip, deflate
HTTP_ACCEPT_LANGUAGE: en-us
HTTP_COOKIE: .ASPXAUTH=931FAC0DF02285E0C01FA5EB7FB13AF26661164CDFE143708B4D6403BBD30E 2C2894BFEA69D9B9CD5B4B2DA52619894111B3A9765DF5C1CD4F4D2CCF9464134A036BB 51EE4E2C192689DC6A0B52D6DFD650E0FE279CC9CCD0BE737AA3DB5B3BEC427233B4752 6FBC5105F90D072CC99EFC9C4E37A28BB0D820CE7C284CE50122; ASP.NET_SessionId=5rjzejmgrhridtjocuv2c5vy
HTTP_HOST: www.chrisbelltech.com
HTTP_REFERER: http://www.chrisbelltech...ask_addobjects&aid= 5
HTTP_USER_AGENT: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/534.52.7 (KHTML, like Gecko) Version/5.1.2 Safari/534.52.7
HTTP_ORIGIN: http://www.chrisbelltech.com
daveburke
#2 Posted : Saturday, 4 February 2012 8:18:31 PM(UTC)
daveburke

Rank: Advanced Member

Joined: 12/01/2009(UTC)
Posts: 62
Location: Vermont

Chris,

You're problem is most likely settings in your web.config not being modified to handle larger media. If you're using v2.6 you can scan through the package web.config for the exact changes you need to make.

Good luck,
Dave
chrisb070819
#3 Posted : Saturday, 4 February 2012 8:36:36 PM(UTC)
Rank: Member

Joined: 4/02/2012(UTC)
Posts: 8
Location: St. Pete

These are what I set my settings at and still get issues: (i add a 9 in front of all)

maxAllowedContentLength
My Setting:
Quote:
<requestLimits maxAllowedContentLength="92147483648"/>

Default:
Quote:
<requestLimits maxAllowedContentLength="2147483648"/>


maxRequestLength and execution time
My Setting:
Quote:
<httpRuntime maxRequestLength="99097151" executionTimeout="986400"/>

Default:
Quote:
<httpRuntime maxRequestLength="2097151" executionTimeout="86400"/>


maxJsonLength
My Setting:
Quote:
<jsonSerialization maxJsonLength="92147483647"/>

Default:
Quote:
<jsonSerialization maxJsonLength="2147483647"/>


the applicationHost.config file has the request filtering override which is this is how it is set.
<section name="requestFiltering" overrideModeDefault="Allow" />

Could it be possible that I need to look into an IIS setting that may prevent something like this even though there is the web.conf present? any kind of hint on where to look would be great.
Roger Martin
#4 Posted : Saturday, 4 February 2012 10:44:59 PM(UTC)
Roger Martin

Rank: Administration

Joined: 3/08/2007(UTC)
Posts: 3,300
Location: Fort Atkinson, WI

It looks like you are checking the right things. I don't know of any other setting that would give that error message for uploads > 3 MB. There are only two things that affect it - the maxRequestLength property of the httpRuntime setting and the maxAllowedContentLength property of the security\requestFiltering setting.

I am stumped as to what else you might check. If you figure it out, let us know - I am curious.
Roger Martin
Creator and Lead Developer of Gallery Server Pro
chrisb070819
#5 Posted : Sunday, 5 February 2012 12:05:09 AM(UTC)
Rank: Member

Joined: 4/02/2012(UTC)
Posts: 8
Location: St. Pete

I noticed in the error log the following line "App Error ID 51" Is there one specific function that will throw that error or are there many?

I keep looking through the IIS logs and it is thowing the same "Maximum request length exceeded." error as well but Microsoft has no suggestions based of its error code. I currently have php running on the server as well. So i'll launch a virtual and try a fresh server install with all defaults and try and find the difference and hopefully on the fresh/default it will work.
daveburke
#6 Posted : Sunday, 5 February 2012 9:07:31 AM(UTC)
daveburke

Rank: Advanced Member

Joined: 12/01/2009(UTC)
Posts: 62
Location: Vermont

Chris,

Is this on a shared host machine? If so, perhaps they have imposed limitations on requests or app pool allocation. These are wild guesses, but if Roger can't resolve your problem then something weird is going on!

-Dave
Roger Martin
#7 Posted : Sunday, 5 February 2012 9:45:28 AM(UTC)
Roger Martin

Rank: Administration

Joined: 3/08/2007(UTC)
Posts: 3,300
Location: Fort Atkinson, WI

The 51 is just the number that identifies that particular instance of the error, not the type of error. So it is meaningless in terms of telling us anything useful.

I think you are on the right track with doing a fresh install on a new server. Let us know what you find.
Roger Martin
Creator and Lead Developer of Gallery Server Pro
chrisb070819
#8 Posted : Sunday, 5 February 2012 12:22:01 PM(UTC)
Rank: Member

Joined: 4/02/2012(UTC)
Posts: 8
Location: St. Pete

Dave - Nope, its a fully dedicated server. All settings for the most part are default.

Roger - Once I find the issue I would be glad to let you all know.
chrisb070819
#9 Posted : Sunday, 5 February 2012 8:52:23 PM(UTC)
Rank: Member

Joined: 4/02/2012(UTC)
Posts: 8
Location: St. Pete

well this is quite puzzling because I just did a clean install of Windows Server 2008 Standard and then added the IIS role and installed updates and .NET packages and I get the same result and same exact error.
Roger Martin
#10 Posted : Monday, 6 February 2012 8:29:38 AM(UTC)
Roger Martin

Rank: Administration

Joined: 3/08/2007(UTC)
Posts: 3,300
Location: Fort Atkinson, WI

You do have the requestFiltering section uncommented, right? By default, IIS will block all uploads larger than 30 MB unless you uncomment that section in web.config.
Roger Martin
Creator and Lead Developer of Gallery Server Pro
chrisb070819
#11 Posted : Monday, 6 February 2012 10:08:16 AM(UTC)
Rank: Member

Joined: 4/02/2012(UTC)
Posts: 8
Location: St. Pete

Yes I had. And even then I'm trying to upload a 7MB file so it would still be less than 30MB.

I thought for a bit that it may be a permissions issue but i realized if it was that it wouldn't upload anything.
Roger Martin
#12 Posted : Monday, 6 February 2012 10:32:11 AM(UTC)
Roger Martin

Rank: Administration

Joined: 3/08/2007(UTC)
Posts: 3,300
Location: Fort Atkinson, WI

If you give me access to your clean server, I can take a look. You can send credentials to roger*at*techinfosystems*dot*com.

Roger Martin
Creator and Lead Developer of Gallery Server Pro
chrisb070819
#13 Posted : Monday, 6 February 2012 10:59:14 AM(UTC)
Rank: Member

Joined: 4/02/2012(UTC)
Posts: 8
Location: St. Pete

As soon as I'm able to get home and create you an account I'll be sure to send you that.

I have noticed if I copy the photos to the directories manually and run the synchronize that it is able to create their web optimized version and thumbnail and add it to the database.
chrisb070819
#14 Posted : Tuesday, 7 February 2012 8:43:52 PM(UTC)
Rank: Member

Joined: 4/02/2012(UTC)
Posts: 8
Location: St. Pete

Credentials Sent.
Roger Martin
#15 Posted : Wednesday, 8 February 2012 8:41:48 AM(UTC)
Roger Martin

Rank: Administration

Joined: 3/08/2007(UTC)
Posts: 3,300
Location: Fort Atkinson, WI

FYI, I haven't seen them yet.
Roger Martin
Creator and Lead Developer of Gallery Server Pro
Roger Martin
#16 Posted : Wednesday, 8 February 2012 12:01:01 PM(UTC)
Roger Martin

Rank: Administration

Joined: 3/08/2007(UTC)
Posts: 3,300
Location: Fort Atkinson, WI

After logging in and seeing the issue, I was able to figure it out. The new file uploader in 2.6 sends files to an HTTP handler named upload.ashx instead of through the ASPX page as in previous versions. The web.config file includes a setting that allows large requests for default.aspx, but that doesn't affect other pages - like upload.ashx - which inherit the default ASP.NET limit of 4 MB.

In most cases this isn't a problem because the upload widget chunks the file to the server whenever possible. However, when users have an older browser or one without Flash or Silverlight, the entire file is sent in one HTTP request.

The fix is to edit web.config (located in the root of the website) to allow for large uploads to be sent to upload.ashx. Look for the similar section for default.aspx and then add the following immediately after it:

Code:
<location path="gs/handler/upload.ashx">
 <system.web>
  <httpRuntime maxRequestLength="2097151" executionTimeout="86400"/>
 </system.web>
</location>


This fix should be added to all 2.6.0 installations. The next release will include this fix.

Thanks to chrisb070819 for reporting the issue and letting me log in to his server to investigate.
Roger Martin
Creator and Lead Developer of Gallery Server Pro
daveburke
#17 Posted : Wednesday, 8 February 2012 4:48:10 PM(UTC)
daveburke

Rank: Advanced Member

Joined: 12/01/2009(UTC)
Posts: 62
Location: Vermont

Roger,

Once again you have proven yourself to be THE MAN! :) Great analysis. Thanks for the fix.

-Dave
Roger Martin
#18 Posted : Friday, 17 February 2012 2:48:11 PM(UTC)
Roger Martin

Rank: Administration

Joined: 3/08/2007(UTC)
Posts: 3,300
Location: Fort Atkinson, WI

2.6.1 is now released. It contains the fix for this issue. Rather than editing the application's web.config file, a new web.config file has been added to the gs\handler directory.
Roger Martin
Creator and Lead Developer of Gallery Server Pro
Rss Feed  Atom Feed
Users browsing this topic
Guest
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.