문제

I have an MVC app that has a link that calls an action method of another MVC app that should automatically login the user. I have all the user information via:

var user = Membership.GetUser(userName);

But from here, I have no idea how to auto login the user.

The two websites are on different domains and my password is hashed.

도움이 되었습니까?

해결책

If I understand your question correctly, you just call SetAuthCookie to let the user login to the site, since you already know the username.

FormsAuthentication.SetAuthCookie(userName, false);
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top