security - ASP.NET Forms Authentication without Redirect -
I am using ASP.Net's form authentication , but to redirect it to Do not want default behavior of a login page when the restricted area is used. Instead, I would like to call a Javascript JQuery dialog for login on the current page, blocking the content behind loading.
My only problem is that by default, the form authentication wants to be redirected.
Is there any other handler that can hook me up, or stop redirection ?
In addition to DWF:
Add the following to your web.config:
& lt; System.web.extensions & gt; & Lt; Screening & gt; & Lt; Webservices & gt; & Lt; Authentication service enabled = "true" /> & Lt; / Webservices & gt; & Lt; / Script & gt; & Lt; /system.web.extensions>
Now you can call the authentication service from javascript:
Sys.Services.AuthenticationService.login ("username", "password", Wrong, empty, blank, login complete, login, ""); Function entrant () {var loginSuccessful = Sys.Services.AuthenticationService.get_isLoggedIn (); If login (login) / * dot stuff * /} function login login (results, user context, method) {warning ('exception' + result. Gate_message); }
Comments
Post a Comment