如何获取非当前用户的匿名个人资料?
早上好, 请问,如何获取非当前用户的匿名个人资料? 我可以获取注册用户的个人资料:
profile = (ProfileCommon)ProfileBase.Create(user.UserName);
但是,对于匿名用户呢? (App_Code 中的类)
Good morning,
please, how can I get anonymous profile for not current user?
Profile for register users I can get with:
profile = (ProfileCommon)ProfileBase.Create(user.UserName);
But, for anonymous users? (class in App_Code)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
感谢您的回复,但我想要一些这样的,工作正常:
再次感谢:)
Thanks for reply, but I want some like this, this working fine:
Thanks again :)
我个人并不喜欢内置的配置文件,但我相信一旦编译,您就可以使用:
Profile.GetProfile();
这在静态方法中不起作用,或者如果使用单独的类库,我认为您需要:
HttpContext.Current.Profile.GetProfile();
我不知道是否有用于检索匿名配置文件的选项,因为您需要某种方式来识别您尝试检索的配置文件。
Don't personally like the inbuilt profile stuff myself but I believe once compiled you can use:
Profile.GetProfile();
This doesn't work within static methods or if using seperate class libraries for that I think you'd need:
HttpContext.Current.Profile.GetProfile();
I don't know if there are options for retrieving anonymous profiles though as you'd need some way of identify which profile you were trying to retrieve.