.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;
        }
    }
}

 

posted @ 2019-01-09 16:15  Aaron_M  阅读(454)  评论(0编辑  收藏  举报