AJAX and Forms Authenication Timeout
am 16.01.2008 17:00:50 von Angel666
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.PageRequestManagerParserErrorException: 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 ' |
Is there any solution for authenication time out with the Update panel
usage that can do a redirect on asynchpostbacks??
Thank you
Joe
RE: AJAX and Forms Authenication Timeout
am 16.01.2008 17:40:01 von brucebarker
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.PageRequestManagerParserErrorException: 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 ' |
>
>
>
>
> Is there any solution for authenication time out with the Update panel
> usage that can do a redirect on asynchpostbacks??
> Thank you
> Joe
>
Re: AJAX and Forms Authenication Timeout
am 16.01.2008 17:52:32 von Angel666
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?