UserName可以包含在UserName(System.Web.Profile.ProfileBase)旁边的配置文件命名空间中吗?
MembershipUser CurrentUser = Membership.GetUser(User.Identity.Name); Response.Write("CurrentUser ID :: " + CurrentUser.ProviderUserKey);