Web Config:
<authentication mode="Forms">
<forms loginUrl="/Public/Login.aspx" protection="All" timeout="30" name=".ASPXAUTH" path="/" requireSSL="false" slidingExpiration="true" defaultUrl="default.aspx" cookieless="UseDeviceProfile" enableCrossAppRedirects="false"/>
</authentication>
Loggin Code:
if (userLoginResults.UserLoginStatus == UserLoginStatus.Successful)
{
var email = UserName.Text.ToLower().Trim();
if (userLoginResults.Contains(UserRoleNames.Admin))
{
FormsAuthentication.RedirectFromLoginPage(email, RememberMe.Checked);
Session["isMemberLoggedIn"] = true;
Response.Redirect("~/AdminPanel/Default.aspx");
}
}
// var email = User.Identity.Name;
I did login by admin@admin.com but i am getting DESKTOP-OPT261T\\mobasshir. this is my windows username.. How can i solve this?
I am using windows 10. microsoft visual studio professional 2013
Thanks all
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.