我正在为我的测试项目创建库。创建库项目时命名空间不起作用。请帮忙
#region(获取记录的用户 ID)
static public Guid GetUserId()
{
Guid guUser = Guid.Empty;
try
{
MembershipUser muUser = Membership.GetUser();
if (muUser != null)
{
guUser = (Guid)muUser.ProviderUserKey;
Membership.GetUser(guUser, true);
}
else
{
//Log out and redirect to login page
FormsAuthentication.SignOut();
FormsAuthentication.RedirectToLoginPage();
}
}
catch (Exception ex)
{
ApplicationError.LogErrors(ex);
}
return guUser;
}
#endregion