c# - 为什么 HttpContext.Current.Profile 为 NULL?它如何获得值(value)?

标签 c# asp.net sharepoint asp.net-membership

我继承了实现自定义 profile 提供程序的 MOSS 代码。设置似乎没问题(提供商和 web.config)。

用户可以登录,但是登录后,HttpContext.Current.Profile 对象为空。为什么它是空的?应该如何/何时获取值?

HttpContext.Current.User.Identity.Name 登录后有值

最佳答案

麦克冯说:

Through Profile provider you have to load the Profile information from SQL server profile table .

Pass the UserName parameter in GetProfile function of WebProfile class . This class is generated by a tool .

http://social.msdn.microsoft.com/Forums/da-DK/netfxbcl/thread/af78e6c0-03f5-4f2d-ad07-dd2a57304377

关于c# - 为什么 HttpContext.Current.Profile 为 NULL?它如何获得值(value)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13396730/

相关文章:

javascript - jQuery:ASP.NET 内容页面中预期的对象

javascript - 是否有图像映射的替代方案能够更改图像上特定 div 区域的背景颜色?

c# - 在列表上使用 TableQuery.CombineFilters 进行 AND 运算

c# - o => o.MethodWithParameters |是否可以在没有 () 和参数的 lambda 中使用方法

c# - Acumatica:PXLongOperation 意外行为导致 UI 无一异常(exception)地崩溃

Sharepoint 查找正在使用 webpart 的位置

javascript - 使用 AngularJS 在 Sharepoint 应用程序上构建快速启动菜单 - 如何缩进一些选项并禁用单击菜单标题

c# - Windows Azure、EF 和 MVC3 的验证问题

c# - WPF 如何将 FlowDocument BGImage 转换为 FixedDocument 并在 DocumentViewer 中显示?

asp.net - ASP.Net吞咽404错误