I am getting different values for HttpContext.Current.User.Identity.Name for IE9 and Firefox 31.4 for ASP.net4.5. This is on the server with IIS7.
So, with Firefox the domain name is being appended before the username. Not so with IE.
I have used this with ASP.net 3.5 and the there is no appending of the domain name in Firefox.
What is going on?
This is a new site I am developing and don't have the authentication piece completely done. I am currently using FormsAuthentication.RedirectFromLoginPage to auto log in.
Login code...
protected void btnDeveloperLogin_Click(object sender, EventArgs e) { FormsAuthentication.RedirectFromLoginPage("scott.metzger", false); }
Code to get username
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { lblApplicationName.Text = Membership.ApplicationName; lblPageLoad.Text = "Page has been loaded"; lblusername.Text = HttpContext.Current.User.Identity.Name; } }
So, why does
HttpContext.Current.User.Identity.Name return <mydomain>/scott.metzger with Firefox and just scott.metzger with IE?