I\'m using SignalR 1 with MVC4 C# web application with form authentication. I have a code in my layout page in JavaScript :
$(documnet).ready(function(){
Try this:
public ActionResult LogOn(LoginModel model, string returnUrl) {
if (ModelState.IsValid) {
if (System.Web.Security.Membership.ValidateUser(model.UserName, model.Password)) {
FormsAuthentication.SetAuthCookie(model.UserName, false);
connection.Stop();
}
}
Assuming your connection handle is connection
. The challenge is accessing a handle to your connection
object in your Action Method.