在asp.net中存储记录器信息
我正在建设的网站有三种类型的用户。管理员、商户和助理用户。 在何处存储信息,以便我的应用程序知道哪个用户已登录(无论是管理员、助理用户还是商户)在asp.net中存储记录器信息,asp.net,Asp.net,我正在建设的网站有三种类型的用户。管理员、商户和助理用户。 在何处存储信息,以便我的应用程序知道哪个用户已登录(无论是管理员、助理用户还是商户) 谢谢你你想看看ASP.NET和。非常感谢你的回复 string path = DateTime.Today.ToString("dd-mm-yy") + ".txt"; if (!File.Exists(System.Web.HttpContext.Current.Server.MapPath(path)))
谢谢你你想看看ASP.NET和。非常感谢你的回复
string path = DateTime.Today.ToString("dd-mm-yy") + ".txt";
if (!File.Exists(System.Web.HttpContext.Current.Server.MapPath(path)))
{
File.Create(System.Web.HttpContext.Current.Server.MapPath(path)).Close();
}
using (StreamWriter w = File.AppendText(System.Web.HttpContext.Current.Server.MapPath(path)))
{
w.WriteLine("\r\nLog Entry : ");
w.WriteLine("Membership.GetUser().UserName);
w.Flush();
w.Close();
}