社区服务器用户名问题 - 在会员存储中找不到用户用户名不存在

发布于 2024-07-05 18:34:10 字数 154 浏览 5 评论 0原文

每当在特定的sectionID上遍历googlesitemap.ashx时,我们的社区服务器安装就经常出现错误。 我怀疑用户名已被修改,但帖子尚未重新缓存以反映这一点。

有没有办法通过在数据库上执行 select 语句来检查数据完整性,或者有没有办法强制数据库重新缓存?

I have an error occuring frequently from our community server installation whenever the googlesitemap.ashx is traversed on a specific sectionID. I suspect that a username has been amended but the posts havn't recached to reflect this.

Is there a way a can check the data integruity by performing a select statement on the database, alternatively is there a way to force the database to recache?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

远昼 2024-07-12 18:34:10

与其说是答案,不如说您可以通过运行以下查询找到受影响的数据条目...

Select * 
FROM cs_Posts
Where UserID Not In (Select UserID 
                     From cs_Users Where UserAccountStatus = 2)

Not so much an answer, but you can find the affected data entries by running the following query...

Select * 
FROM cs_Posts
Where UserID Not In (Select UserID 
                     From cs_Users Where UserAccountStatus = 2)
又怨 2024-07-12 18:34:10

如果社区服务器发现用户不在 MemberRoleProfileProvider 实例中,则可能会引发此错误。

请参阅 CommunityServer.Users AddMembershipDataToUser() 作为示例

更新:


我通过注意到用户名存储在两个表 - cs_Users 和 aspnet_Users 中解决了我的案例的这个问题。 结果不知何故,每个表中的用户名都是不同的。 手动更新以使名称相同修复了此问题。

此外,用户会在存储过程的以下行中忽略成员身份cs_Membership_GetUsersByName

INSERT INTO @tbUsers
  SELECT UserId
  FROM   dbo.aspnet_Users ar, @tbNames t
  WHERE  LOWER(t.Name) = ar.LoweredUserName AND ar.ApplicationId = @ApplicationId

@tbNames 是一个名称表,在某个时刻来自 cs_Users(?),因此用户名不会匹配和用户稍后不会插入到结果中。


另请参阅:http://dev.communityserver.com/forums/t /490899.aspx?PageIndex=2

This error could be thrown by community server if it finds users that aren't in the instance of MemberRoleProfileProvider.

See CommunityServer.Users AddMembershipDataToUser() as an example

UPDATE:


I Solved this problem for my case by noticing that the usernames are stored in two tables - cs_Users and aspnet_Users. Turns out somehow the username was DIFFERENT in each table. Manually updating so the names were the same fixed this problem.

Also, the user would left out of membership in the following line of the stored procedure cs_Membership_GetUsersByName:

INSERT INTO @tbUsers
  SELECT UserId
  FROM   dbo.aspnet_Users ar, @tbNames t
  WHERE  LOWER(t.Name) = ar.LoweredUserName AND ar.ApplicationId = @ApplicationId

The @tbNames is a table of names comes from cs_Users(?) at some point and therefore the usernames didn't match and user was not inserted in to the result later on.


See also: http://dev.communityserver.com/forums/t/490899.aspx?PageIndex=2

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文