Showing posts with label contains. Show all posts
Showing posts with label contains. Show all posts

Monday, March 26, 2012

PageRequestManager Question

Hello,

I have an update panel which contains a gridview control. When the update panel refreshes or there is a partial postback I would like an indicator that this event has occured in my client side script. I plan to use an if/then statement based on this. I believe this can be done by using an instance of the PageRequestManager class. Could you provide an example of this?

Thanks,

-Robert

It sounds like this tutorial goes over what you're looking for:

http://ajax.asp.net/docs/tutorials/AnimateUpdatePanels.aspx

In your handler for the pageLoaded event, you use the panelsUpdated property to figure out which panels were updated. You can then show whatever indicator you want based on that information.

Saturday, March 24, 2012

PageRequestManagerTimeoutException on terminal servers?!

Hello all,

I made a webform application with ajax. You have to log in and when authenticated you can navigate to a page which contains a dropdownlist. When you select something in this dropdownlist, it executes an ajax callback to the code-behind. (It shows a turning GIF-file and does the needed methods.) It works fine, no errors.
When I connect with remote desktop to a computer and I browse to this site, all works fine.

Now comes the tricky part:
When I connect with remote desktop to a terminal server and try to browse to this site, the server can find the site, I can do a 'login', but when I select something from this
dropdownlist, it throws immediately a Sys.WebForms.PageRequestManagerTimeoutException.

I know you can set the timeout of an asynchronous callback in de scriptmanager tag, but it contains already "36000".

I already googled, but I didn't encounter a problem like this one. (because the terminal server makes it somewhat different)

If someone can help me with this problem, I would be very gratefull!

Kind regards!

Marc Meers

Hi,MarcMeers

The problem can happen when the machineKey used to encrypt/decrypt the viewstate was changed, and more likely this will happen if you keep the page idle for a long time or the server cost a long time to hander a request. To avoid this, you need to have a static machineKey.

Check this articlehttp://blog.g9th.com/2007/01/14/unable-to-validate-data-at-systemwebconfigurationmachinekeysectiongetdecodeddata.aspx

Let me know if you need more info.
You can also see this thread for more help:http://forums.asp.net/t/1115331.aspx http://forums.asp.net/t/1114130.aspx

Hope this helps.


Hello Jin-Yu Yin,

Thank you for the effort you have made.

But, we have found the problem.
Someone changed the MTU value to a lower value than normally used.

We changed it back to the default values, all worked fine after it...

Thanks!

Case closed...