Hi
I'm just starting to look at building AJAX functionality into our existing ASP.NET 2.0 web application. The web app is a portal-type application and uses Forms Authentication and the ASP.NET Membership/Profile providers to manager users.
I've followed through the tutorial videos and successfully AJAX-enabled a grid view on one of the pages which is filtered by a drop down list. I've also added an UpdateProgress tag which seems to work fine. The problem arises when a user changes the value in the drop down list after the forms authentication ticket has expired (which is currently set to 30 mins). Without AJAX, any change in the drop down list first redirects back to the login back, then posts back the original page to show the newly filtered gridview. Howvever, with AJAX, the first change to the list appears to simply redraw the existing grid data (regardless of what is selected), and subsequent changes result in the following browser/client error. The status code varies between 12030 and 12031 on different runs of the application.
--------
Windows Internet Explorer
--------
Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 12030
--------
OK
--------
I've searched around these forums, google, the online help etc. and it appears that you can use AJAX to control logins via forms authentication which implies that it must be possible to achieve what I'm after. However, so far it looks as though the AJAX callback is not respecting/using the forms authentication ticket.
Could anyone elighten me as to how AJAX callbacks work with forms authenticated sites and why this particular error message is occuring.
Best regards
Craig
Thanks for the link, I had a quick read through this yesterday, but there's been quite a few posts added in the last 12 hours or so.
I'm not sure it sounds exactly the same, but it could be related. As I said, I'm new to AJAX, so have only ever installed the RTM version and haven't tried anything earlier. My (limited) experience with update panels and logged-in users (via forms authetication) was that everything works fine until the authentication cookie expires - that's when the error occurs.
I'd be interested to know, from those who've used pre-RTM versions, what the expected behaviour should be. If an AJAX callback is made once the forms authentication cookie has expired, does the page redirect to the login page as with normal postbacks?
Thanks, Craig
Hi Craig,
This is an issue that has been introduced with the AJAX RTM. Several others of us are experiencing it but we haven't found a solution yet. We have a thread going about it at:
http://forums.asp.net/1553437/ShowThread.aspx#1553437
Yes, that would be the expected behavior.
The problem that I and others are seeing appears to be related to role caching though, not to cookie expiration.
Hi,
I had this exact same issue and found that it was related to the page validation and some hard coded text in a text box that contained "dangerous" characters. I had a textbox that had hard XML in the text area. Without the AJAX update panel, it would throw a warning error. With the AJAX update panel, it would throw the error you saw.
What I did for my testing purposes was switch the validaterequest to FALSE in the page declaration, and this fixed it. I know this is not ideal, but at least points to what the root cause is.
ValidateRequest="False"
Jason
No comments:
Post a Comment