userprincipal.findbyidentity发生操作错误

时间:2014-01-04 19:20:03

标签: asp.net vb.net iis

好的,我已经被赋予了将具有多个应用程序的网站迁移到另一台服务器的责任。迁移进展顺利(所有应用程序都在运行)。但是,新服务器的性能低于标准(完整的其他故事)。我们决定再次迁移它。这一次一切都很顺利 - 除了一个应用程序。 它在第一台和第二台IIS服务器上运行得很好,但这次拒绝合作。

我已经镜像了我可以从工作服务器找到的所有配置设置: 启用Windows身份验证:检查 假冒已禁用:请检查 应用程序池设置匹配:检查

我只是不知道自己错过了什么;为什么它会在一台服务器上运行,而不是另一台服务器。


发生了操作错误。

描述:执行当前Web请求期间发生了未处理的异常。请查看堆栈跟踪以获取有关错误及其源自代码的位置的更多信息。

异常详细信息:System.Runtime.InteropServices.COMException:发生操作错误。

来源错误:

Line 9:          Dim myUsername As String = Right(User.Identity.Name, Len(User.Identity.Name) - InStr(User.Identity.Name, "\"))
Line 10:         Dim ctx = New PrincipalContext(ContextType.Domain)
Line 11:         Dim myUser = UserPrincipal.FindByIdentity(ctx, myUsername)
Line 12:         hfValid.Value = "false"
Line 13:         For Each gp As GroupPrincipal In myUser.GetAuthorizationGroups

源文件:D:\ mghnet1 \ isOnCall \ Default.aspx.vb行:11

COMException(0x80072020):发生操作错误

System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail) +378142
System.DirectoryServices.DirectoryEntry.Bind() +36
System.DirectoryServices.DirectoryEntry.get_AdsObject() +31
System.DirectoryServices.PropertyValueCollection.PopulateList() +26
System.DirectoryServices.PropertyValueCollection..ctor(DirectoryEntry entry, String propertyName) +49
System.DirectoryServices.PropertyCollection.get_Item(String propertyName) +150
System.DirectoryServices.AccountManagement.PrincipalContext.DoLDAPDirectoryInitNoContainer() +1114
System.DirectoryServices.AccountManagement.PrincipalContext.DoDomainInit() +37
System.DirectoryServices.AccountManagement.PrincipalContext.Initialize() +112
System.DirectoryServices.AccountManagement.PrincipalContext.get_QueryCtx() +31
System.DirectoryServices.AccountManagement.Principal.FindByIdentityWithTypeHelper(PrincipalContext context, Type principalType, Nullable`1 identityType, String identityValue, DateTime refDate) +14
System.DirectoryServices.AccountManagement.Principal.FindByIdentityWithType(PrincipalContext context, Type principalType, String identityValue) +73
System.DirectoryServices.AccountManagement.UserPrincipal.FindByIdentity(PrincipalContext context, String identityValue) +28
_Default.Page_Load(Object sender, EventArgs e) in D:\mghnet1\isOnCall\Default.aspx.vb:11
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +50
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627

版本信息:Microsoft .NET Framework版本:2.0.50727.5466; ASP.NET版本:2.0.50727.5456


请帮助,我发现的其他论坛帖子都没有发布适合我的解决方案。

0 个答案:

没有答案
相关问题