By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,946 Members | 741 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,946 IT Pros & Developers. It's quick & easy.

AJAX and Forms Authenication Timeout

P: n/a
We are using forms authenication with AJAX update control panels. We
get various results but no redirect when the user has timed out and is
no longer authenicated and does a asyncpostback. We have tried
onasyncpostbackerror method but it is not even hitting the code
behind.
Because the server does try to redirect to login page we get the
parser error(below) as it is trying to parse the login page in the
background.
Sys.WebForms.PageRequestManagerParserErrorExceptio n: The message
received
from the server could not be parsed. Common causes for this error are
when
the response is modified by calls to Response.Write(), response
filters,
HttpModules, or server trace is enabled.
Details: Error parsing near ' |<html>
<head>

Is there any solution for authenication time out with the Update panel
usage that can do a redirect on asynchpostbacks??
Thank you
Joe
Jan 16 '08 #1
Share this Question
Share on Google+
2 Replies


P: n/a
using a cutom OnAuthenicate, you could detect it was an async postback
(check for "X-MicrosoftAjax" header), and respond with an ajax compatiable
error response, instead of redirecting to the login page.

-- bruce (sqlwork.com)
"Angel666" wrote:
We are using forms authenication with AJAX update control panels. We
get various results but no redirect when the user has timed out and is
no longer authenicated and does a asyncpostback. We have tried
onasyncpostbackerror method but it is not even hitting the code
behind.
Because the server does try to redirect to login page we get the
parser error(below) as it is trying to parse the login page in the
background.
Sys.WebForms.PageRequestManagerParserErrorExceptio n: The message
received
from the server could not be parsed. Common causes for this error are
when
the response is modified by calls to Response.Write(), response
filters,
HttpModules, or server trace is enabled.
Details: Error parsing near ' |<html>
<head>

Is there any solution for authenication time out with the Update panel
usage that can do a redirect on asynchpostbacks??
Thank you
Joe
Jan 16 '08 #2

P: n/a
Let me clarify. We are using standard .Net forms authenication. Users
login fine but it is once we are in the application.

A user waits pass the timeout then interacts with a page inside the
application that has an update panel
and we get the famous PageMgrParser problem because what is being sent
via the response is the login page as it should.
Problem is response doesnt know how to handle this so blows up. We
tried onAsychPostBackError but the code behind doesnt even get hit.

Any ideas?

Jan 16 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.