IUserIdentity.Authenticate is called twice


For some reason the IUserIdentity.Authenticate method is being called twice in my set up. I am wondering if this is a by design, or if I have something wrong in my set up.

My problem is that I have to track when a user Logs in and when he logs out. Based on the current behavior every user is logging in twice and logging out once.

I appreciate any help you guys can provide,


Are you sure you don’t perform model validation twice? Also you can show your login controller’s code :)

Thanks Andy_S,

your response pointed me in the right direction. I was focusing on the Model, and the issue was in the View and Controller. Basically the log in form had enableAjaxValidation=true, which caused 2 calls on the model. Once I set enableAjaxValidation=false then the issue went away.

Thanks again.