.Net 獲取當前登陸的賬號

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web;

namespace BusinessLayer
{
    class BLError
    {
        public string ErrorAlert()
        {
            string UserName;
            string error;
            error = "Sorry,something wrong!";
            UserName = HttpContext.Current.Request.LogonUserIdentity.Name;
            return UserName + error;
        }
    }
}
相關文章
相關標籤/搜索