Avatar of 3XLcom
3XLcom

asked on 

Jquery Ajax and FormAuthentication

I have a web page which has multiple ajax operations. And i am using forms authentication for authenticate users. I have some protected directories.And if user bring the page for a long time on this page if authentication ticket expires browser ask for authentication in a window authentication form.

Is there any way to sth. like onAjaxrequest begin handler to check if user still connected to system or not so i should check and if user disconnected log in him back to system
JavaScriptASP.NETJScript

Avatar of undefined
Last Comment
3XLcom
ASKER CERTIFIED SOLUTION
Avatar of Rahul Agarwal
Rahul Agarwal
Flag of India image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of 3XLcom
3XLcom

ASKER

I am able to log him out and log him in via ajax. My problem is that think that
/protected/panel.asmx my web service adress.
and protected is a protected folder  via web config on aspx
so if the user is logged out by the time it returns strange errors. i want to check with a function that called by jquery or sth. like this (before ajax call occur). so that if the user logged out i will redirect the page to the login page
Avatar of leakim971
leakim971
Flag of Guadeloupe image

Why do you not change the delay before logout of your system?
Avatar of 3XLcom
3XLcom

ASKER

i have changed it to 50 years but cause of some conditions user should be logged out sometimes. so we need a handler like beforeajaxcall
Avatar of 3XLcom
3XLcom

ASKER

Problem was with the web config sorry
ASP.NET
ASP.NET

The successor to Active Server Pages, ASP.NET websites utilize the .NET framework to produce dynamic, data and content-driven web applications and services. ASP.NET code can be written using any .NET supported language. As of 2009, ASP.NET can also apply the Model-View-Controller (MVC) pattern to web applications

128K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo