//grabs the users login credientials and logs user in the datalayer public void WindowsAuth() { try { WindowsAuthentication WinAuth = new WindowsAuthentication { ActivDirName = User.Identity.Name, }; WinAuth.FullName = WinAuth.GetFullName(); WinAuth.UserName = WinAuth.GetUsername(); user = Page.User.Identity.Name; Name.Text = WinAuth.FullName + " "; userlogin.Text = WinAuth.UserName; } catch (Exception err) { userlogin.Visible = true; userlogin.ForeColor = Color.Red; userlogin.Text = "An error has occurred logging you in. " + err.Message; //Label1.Text += err.Message; } }
protected void WinAuthentication() { WinAuth.FullName = WinAuth.GetFullName(); WinAuth.UserName = WinAuth.GetUsername(); WinAuth.AddArea(WindowsAuthentication.PerformancePortal.Portal); //WinAuth.TrackerSql(); }
protected void Page_Load(object sender, EventArgs e) { WinAuth.ActivDirName = Page.User.Identity.Name; WinAuth.FullName = WinAuth.GetFullName(); WinAuth.UserName = WinAuth.GetUsername(); }