【问题标题】:Sharepoint 2010 server farm, page missing error on the second serverSharepoint 2010 服务器场,第二台服务器上的页面丢失错误
【发布时间】:2013-04-16 07:18:45
【问题描述】:

我在使用 Visigo.Sharepoint.FormsBasedAuthenticaiton Web 部件进行注册时遇到问题。有时会显示未知错误,有时会正常运行,这让我相信它与场中的一台服务器有关。所以我直接进入 server1 上的登录页面,一切都很好,当我进入 server2 上的登录页面时,我得到一个错误页面,上面写着找不到文件。

我使用错误屏幕上提供的关联 ID 查看了日志,发现这似乎表明 PasswordRecoveryWebPart 存在问题。

System.IO.FileNotFoundException: The Web application at http://site2/pages/login.aspx could not be found. Verify that you have typed the URL correctly. If the URL should be serving existing content, the system administrator may need to add a new request URL mapping to the intended application.
    at Microsoft.SharePoint.SPSite..ctor(SPFarm farm, Uri requestUri, Boolean contextSite, SPUserToken userToken)
    at Microsoft.SharePoint.SPSite..ctor(String requestUrl)
    at Visigo.Sharepoint.FormsBasedAuthentication.Utils.GetMembershipProvider(HttpContext context)
    at Visigo.Sharepoint.FormsBasedAuthentication.PasswordRecoveryWebPart.AddPasswordRecoveryControl()
    at Visigo.Sharepoint.FormsBasedAuthentication.PasswordRecoveryWebPart.CreateChildControls()
    at System.Web.UI.Control.EnsureChildControls()
    at System.Web.UI.Control.PreRenderRecursiveInternal()
    at System.Web.UI.Control.PreRenderRecursiveInternal()
    at System.Web.UI.Control.PreRenderRecursiveInternal()
    at System.Web.UI.Control.PreRenderRecursiveInternal()
    at System.Web.UI.Control.PreRenderRecursiveInternal()
    at System.Web.UI.Control.PreRenderRecursiveInternal()
    at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

我开始比较两台服务器上的 FBA 布局和功能文件,没有发现任何缺失。我不确定接下来要看什么以及可能的补救措施是什么。谢谢。

更新

根据下面的问题,我一直在尝试登录第二台服务器,以便可以转到站点设置页面并查看 FBA 用户管理信息。由于我的登录页面与注册页面相同,因此在第二台服务器上出现错误,我创建了一个新页面,其中仅包含自定义登录 Web 部件。不幸的是,直接访问第二台服务器并在日志中显示这些错误时,我似乎无法登录。

SPSecurityTokenService.Issue() failed: System.NullReferenceException: Object reference not set to an instance of an object.
     at Microsoft.SharePoint.IdentityModel.SPSecurityTokenService.SPRequestInfo.ValidateFormsAuthProviderNames(Uri context, String membershipProvider, String roleProvider)
     at Microsoft.SharePoint.IdentityModel.SPSecurityTokenService.SPRequestInfo.SetProviderNames(RequestSecurityToken request)
     at Microsoft.SharePoint.IdentityModel.SPSecurityTokenService.SPRequestInfo..ctor(IClaimsIdentity identity, RequestSecurityToken request, Boolean initializeForActor)
     at Microsoft.SharePoint.IdentityModel.SPSecurityTokenService.SPRequestInfo..ctor(IClaimsPrincipal principal, RequestSecurityToken request)
     at Microsoft.SharePoint.IdentityModel.SPSecurityTokenService.GetTokenLifetime(Lifetime requestLifetime)
     at Microsoft.IdentityModel.SecurityTokenService.SecurityTokenService.Issue(IClaimsPrincipal principal, RequestSecurityToken request)
     at Microsoft.SharePoint.IdentityModel.SPSecurityTokenService.Issue(IClaimsPrincipal principal, RequestSecurityToken request)    

Request for security token failed with exception: System.ServiceModel.FaultException`1[System.ServiceModel.ExceptionDetail]: Object reference not set to an instance of an object. (Fault Detail is equal to An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is: System.NullReferenceException: Object reference not set to an instance of an object.
    at Microsoft.SharePoint.IdentityModel.SPSecurityTokenService.SPRequestInfo.ValidateFormsAuthProviderNames(Uri context, String membershipProvider, String roleProvider)
    at Microsoft.SharePoint.IdentityModel.SPSecurityTokenService.SPRequestInfo.SetProviderNames(RequestSecurityToken request)
    at Microsoft.SharePoint.IdentityModel.SPSecurityTokenService.SPRequestInfo..ctor(IClaimsIdentity identity, RequestSecurityToken request, Boolean initializeForActor)
    at Microsoft.SharePoint.IdentityModel.SPSecurityTokenService.SPRequestInfo..ctor(IClaimsPrincipal principal, RequestSecurityToken request)
    at Microsoft.SharePoint.IdentityModel.SPSecurityTokenService.GetTokenLifetime(Lifetime requestLifetime)
    at Microsoft.IdentityModel.SecurityTokenService.SecurityTokenService.Issue(IClaimsPrincipal principal, RequestSecurityToken r...)

System.ServiceModel.FaultException`1[[System.ServiceModel.ExceptionDetail, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]: Object reference not set to an instance of an object. 
    at Microsoft.IdentityModel.Protocols.WSTrust.WSTrustChannel.ReadResponse(Message response)
    at Microsoft.IdentityModel.Protocols.WSTrust.WSTrustChannel.Issue(RequestSecurityToken rst, RequestSecurityTokenResponse& rstr)
    at Microsoft.IdentityModel.Protocols.WSTrust.WSTrustChannel.Issue(RequestSecurityToken rst)
    at Microsoft.SharePoint.SPSecurityContext.SecurityTokenForContext(Uri context, Boolean bearerToken, SecurityToken onBehalfOf, SecurityToken actAs, SecurityToken delegateTo)
    at Microsoft.SharePoint.SPSecurityContext.SecurityTokenForFormsAuthentication(Uri context, String membershipProviderName, String roleProviderName, String username, String password, Boolean isPersistent)
    at Microsoft.SharePoint.IdentityModel.SPClaimsUtility.AuthenticateFormsUser(Uri context, String userName, String password)
    at UHPS.Login.Login.loginControl_Authenticate(Object sender, AuthenticateEventArgs e)
    at System.Web.UI.WebControls.Login.AttemptLogin()     at System.Web.UI.WebControls.Login.OnBubbleEvent(Object source, EventArgs e)
    at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)     at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
    at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

【问题讨论】:

  • 你能提供更多细节吗?您如何部署 Web 部件,以及为此 Web 应用程序设置的备用访问映射是什么。另外,成功登录过程需要多长时间?错误的范围可能包括: - 没有将 Web 部件正确部署到第二台服务器 -> 很可能 - 没有将控件标记为安全 - 服务器超时 - 备用访问映射直接到单个服务器而不是负载均衡器

标签: sharepoint sharepoint-2010 fba


【解决方案1】:

我不确定为什么最终结果是文件未找到异常,但考虑到错误发生在 GetMembershipProvider 上,我的猜测是在给出错误的一台服务器上尚未配置成员资格提供程序。

成员资格提供程序条目必须存在于每个 SharePoint 服务器上的 Web 应用程序的 web.config 中。有关配置成员资格提供程序的说明在这里:

http://donalconlon.wordpress.com/2010/02/23/configuring-forms-base-authentication-for-sharepoint-2010-using-iis7/

【讨论】:

  • 谢谢,直到明天我才能调查这个问题,但我会仔细检查该服务器上的 web.config 文件,以确保没有错字或其他错误。
  • 我比较了两台服务器上主网站 (inetpub\wwwroot\wss\VirtualDirectories\80\Web.config) 的 web.config,它们是相同的。我还比较了 SeucrityTokenServiceApplication web.config 文件,它们也是一样的。
  • 在问题服务器上打开亚马逊物流用户管理页面(站点设置)会发生什么?
  • 谢谢克里斯。我正在尝试获取该信息,但无法登录第二台服务器以访问该页面。我已在原始问题中添加了有关此问题的更多信息和错误日志。非常感谢您的帮助。
  • 您是否检查了 SecurityTokenService 的 web.config 并确保其中的成员资格条目正常?如果这不能解决问题,我会从您的自定义登录页面恢复到标准 SharePoint 登录页面,并确保您可以通过它进行身份验证,然后再继续对此自定义页面进行故障排除。
猜你喜欢
  • 2014-11-09
  • 1970-01-01
  • 2015-02-16
  • 2018-10-16
  • 2016-06-02
  • 1970-01-01
  • 1970-01-01
  • 2021-07-07
  • 2015-12-18
相关资源
最近更新 更多