我试图找出我的程序的哪一部分导致了这个错误。
我有多个页面都继承自PageBase
. 他们从PageBase
. 这是从以下位置获取用户名的函数PageBase
:
uiProfile = ProfileManager.FindProfilesByUserName(CompanyHttpApplication.Current.Profile.UserName)
在CompanyHttpApplication
我有
public static CompanyHttpApplication Current
{
get { return (CompanyHttpApplication)HttpContext.Current.ApplicationInstance; }
}
和
public CompanyProfileInfo Profile
{
get
{
return profile ??
(profile =
ProfileManager.FindProfilesByUserName(ProfileAuthenticationOption.Authenticated,
User.Identity.Name).Cast
<CompanyProfileInfo>().ToList().First());
}
private set { profile = value; }
}
不幸的是,我没有编写这部分代码,并且编写它的程序员不再参与该项目。有没有人可以向我解释为什么当另一个用户登录时(当我使用应用程序时),我成为那个用户?