1

I'm having trouble figuring out how to do something that I imagine is very common in an ASP.NET Web Forms application.

It's a pretty standard app with the usual inputs (dropdowns, text editors, etc), and we want to make sure that when the user tries an action (like clicking the "save" button after their edits), the data they've entered is not lost if they are logged out without their knowledge (session expired, cache got cleared, etc).

We use Telerik's ASP.NET Web Forms controls, and our first solution was to hijack the OnRequestStart event of the RadAjaxManager, along with several built-in Telerik javascript events (overwrote the Telerik events for button click, drop-down opening, etc) in order to make sure that our authentication check would be hit on just about every action throughout the app. From those functions we then called a synchronous Ajax request to a web method that returns whether the user is currently authenticated. If they aren't, we stop the current request in javascript and pop up a login window so the current page is not redirected.

We did this without the foresight that there would be potentially thousands of requests to this web service, which essentially crashed the app in spectacular fashion. I've been exploring other options, like using the Application_AuthenticateRequest event in the Global.asax, but no luck so far.

The web service solution is kind of ideal in theory, if only it didn't doom the app to a fiery, unresponsive death...! Any thoughts that could point me in the right direction? Thanks in advance for any help.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.