Showing posts with label request. Show all posts
Showing posts with label request. Show all posts

Monday, March 26, 2012

Atlas update panel request timeout

I have annoying problem. Page has EnablePartialRendering="true" and several Update panels. Page works fine if Request is short, bit some time it can take up to 5 minutes to finish respond, and in this case, page does not return anything. I guess it has to be some TimeOut async request reaches. I tried to set <pages asyncTimeout="600"> - it does not help. Would appreciate any advise.

hello.

use the scriptmanager's AsyncPostBackTimeOut property to define the timeout associated with a partial request.


You may also consider manually calling the update panel .Update() - if its a long request and on the browser side its taking awhile - you could do this:

<Update Panel>

<Panel id="pnlForm" >

insert control here or whatever

<Panel if="pnlStatus">

Display message will take a while - do not navigate from page...

write a short javscript method that when you know it will be a long request... will toggle on the postback the second panel...I suggest using the style='display:none' instead of the .net visible = true or false...

Then in code behind do your work and at the end reissue the css style select to trigger them back to original status...and then call the updatepanel.Update()...

That may work as a solution for something of that time period...Since we are talking asynch - and you have other update panels - this should theoretically allow other stuff to happen - and still handle your first request.. I don't know for sure if that will work

I have noted that even setting the asynch timeout - with IE in particular it will not process a direct postback after x period of time...

But - I do think a better solution - is to figure out why it takes 5 minutes to perform something for a web client. If its a report generation - then the best thing to do is write kinda a job queue that stores the results - and has a status flag it updates... then on the web client poll the job status and when available trigger the update for the update panel...


Hello

I don't see AsyncPostBackTimeOut among ScriptManager properties.

Thanks


If you are using Atlas - I don't think that property existed - its a property of the new Beta however...

Wednesday, March 21, 2012

Atlas request discovery

I have a BasePage class that is the base class for all my pages.
This page does a lot of the rendering of the page, the header, footer etc.
This should of course not be done when the request is an atlas request, so in these cases I need to just call base.Render.

The problem is that I can't see any way of discovering that the current request is an Atlas request, it looks exactly the same as a regular request.

Any ideas?

PS: Rewriting to use master pages etc instead is not an option, would take way to much time as this is an enterprise application with several hundreds of pages inheriting the BasePage class.

Thanks,
Einar

ok may b move ur atlas functionality to a webservice
One Way to find out whether a request is an Atlas Request is to use the following piece of code. It is based on my research using Reflector.

bool isAtlasRequest = ScriptManager.GetCurrent(this).IsInPartialRenderingMode;

Works, thanks!

Einar