コード例 #1
0
ファイル: Default.aspx.cs プロジェクト: Hughesm/IQT-Tool
    //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;
        }
    }
コード例 #2
0
    protected void WinAuthentication()
    {
        WinAuth.FullName = WinAuth.GetFullName();
        WinAuth.UserName = WinAuth.GetUsername();

        WinAuth.AddArea(WindowsAuthentication.PerformancePortal.Portal);

        //WinAuth.TrackerSql();
    }
コード例 #3
0
    //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;
        }
    }
コード例 #4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     WinAuth.ActivDirName = Page.User.Identity.Name;
     WinAuth.FullName     = WinAuth.GetFullName();
     WinAuth.UserName     = WinAuth.GetUsername();
 }