views:

63

answers:

0

We’re building an Asp.net SharePoint application that includes an Ajax polling mechanism. The site contains data that is coming straight from a backend system which is refreshed every 5 minutes. It is important that when the new version is arrived all logged in uses get the new data within a few seconds. We’ve made a http handler which the site keeps on polling every few seconds (20 at the moment. Will be 5 in production) and the http handler will return true or false if the data is still valid. When the data is invalid we want to update 1 updatepanel containing the old data. Our javascript calls a __doPostBack(updatepanel,''); so the data will be updated.

On our dev machines and test environment everything works fine and every 5 minutes we’re getting the newest data on the screen. On our staging server we’re sometimes receiving a http 413 error on the postback of the updatepanel. Mostly this is after 2 or 3 updates (10 to 15 minutes) and sometimes it takes even longer. I’ve also seen it started working again after having a few failed attempts.

Our dev,test and staging server are all using SSL and we are running on IIS 7.5 and SharePoint 2010.

When I googlebing this error the only thing I could find was updating a setting in IIS “UploadReadAHeadSize” by using the following command: appcmd.exe set config -section:system.webServer/serverRuntime /uploadReadAheadSize:"491521" /commit:apphost

Source: http://weblogs.asp.net/jescrich/archive/2009/08/19/ajax-ssl-and-the-413-error.aspx

Another thing that I’ve found on the internet is the MaxRequestSize in the web.config but this isn’t the problem aswell.

The staging environment is not ours and an external company is doing all support on this server so we didn’t set this setting on our staging environment yet. I did try to set this setting to a really low value on our dev machine and this didn’t break the functionality on our dev machines, because of this I don’t think this is going to be the solution.

The size of the messages also doesn’t seem to be the reason for the error to be thrown. I’ve seen it go well with bigger tables/pictures of data and also break on small bits of data.

The exact error we get is:

Message: Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 413 Line: 5 Char: 62099 Code: 0 URI: https ://server /ScriptResource.axd?d=lq0ZY-a2UUsqUqEgVAyTun_PmQLcT4cQYFG_ivl7xRgop-ia4Tg0HrSsma_XTe4CwCmRoZWXATQKEShu_ShopJXk1CS_2dz6IbyGys89bEE1&t=ffffffffec2d9970

The scriptresource.axd is the MicrosoftAjax.js javascript file which is included in sharepoint.

Did anyone ever see this error and knows how to solve it?