Showing posts with label navigate. Show all posts
Showing posts with label navigate. Show all posts

Saturday, March 24, 2012

PageRequestManagerServerErrorException: 404 ??

I have a error when I use Server.Transfer and ASP.NET AJAX.

STEPS:

1- navigate to a page containing a UpdatePanel using SERVER.TRANSFER
2- (first) async call works fine

3 - click again to make second async call and somehow the page path becomes
invalid; the page name is correct but the path seems to belong to the
referer!! (Consequently a 404 server response is returned by the server. see
attached error message )

Anyone help-me?

Server.Transfer really doesn't work well with ASP.NET AJAX. A few people have done some complicated stuff to get it to work, but I recommend just avoiding it altogether if possible. Search around here on the forums, and you can probably find some older discussions of this.

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...

Wednesday, March 21, 2012

Partial page refresh on master pages

Hi

I need some help. I'm working on a web site and i'm having problems to avoid a full page refresh when i navigate across the site using a menu control.

I use a master page to define the main aspect of my site. On the master page i placed a menu control and i want to refresh only the content place holder with the content page each time the user click on a menu item. I' ve tried to do this with ajax but until now, no luck.

If someone have a clue on how to do this i would very much appreciate it..Big Smile

Master pages are not frames...each time you click a link, you are on a new page, and the masterpage just gives it the same look. The only way that I have heard of to do that is with iFrames or having one page and load all your pages as user controls, although both methods are rather hacky.


I've alse tried to use iframes inside the master page and set the target property on the menu control to the iframe, but instead of loading the content page inside the iframe it opens a new window.

I placed the iframe within the content place holder on the master page. Maybe its not the right place to put it.


I think that you may need to do it on an aspx page, and all the pages you go to from there would need to not have a master page. Actually if you are doing it that way, you may not even need a master page. You could probably have a page that looks like the master page, but has an iFrame where the content template would be. I am not completely sure if that would work correctly though because we don't worry about that much though because most our pages act as separate applications, so there is not a lot of switching pages. Postbacks can also serve as a way for the user to see that they are going somewhere else, which works the way our site is, but may or may not for you.