I have a scenario where I am using PageMethods in javascript which invokes a static webmethod in the code behind. If the PageMethod is invoked after a session is timed out, I can validate the session, but since I have no handle to the actual Page, I'm unable to re-direct the user to the Login page. I can of course throw a custom "SessionExpiredException" back to javascript, handle it with a OnFailure delegate on window.location = 'login.aspx', but unfortunately I inherited a site with about 300 of these types of calls and growing - so I don't think it's a great design decision to leave the control decisions up to javascript.
At best I have been able to enable forms authentication in the web.config, but it's super iffy and when it does work, gives a Kerbose style login prompt instead of a redirection.
Am I just missing something fundemental here, or are other people in the same position with using PageMethods?
Thanks in advance!