Since last week I've had a really odd issue with PageMethods, the forms authentication cookie, and the back button which i've never seen before.
I have a 'home page' which on document.ready (using jQuery), loads some
data through PageMethods, and then renders a list - from which you can
click through to a details page about the item. In general use, it
works fine. However, using the back button after clicking through (ie:
going back to the home page), it throws a PageMethods error. The
browser's 'authentication required' prompt appears, and if you click
cancel, the server returns a 401. The error returned by PageMethods on
the client side is 'authentication failed'.
After inspecting the request in Fiddler, the forms authentication cookie isn't sent with the request, which would explain why it is happening. My fiddler entry for the request looks like this:
The weird thing is,
this happens as soon as you click the link and click back. It's not like
the authentication cookie has expired or anything, and if you click
cancel when the prompt appears and refresh the page, it works fine (and the cookie is sent). I
just can't work out what is going on.
When it works, my Fiddler entry looks like this
View Complete Post