1

I've been having an issue with registration using the Visigo.Sharepoint.FormsBasedAuthenticaiton web parts. Some of the time there is an Unknown Error display and sometimes it goes through fine, which led me to believe it has something to do with one of the servers in the farm. So I went to the directly to the login page on server1 and everything was fine and the when I went to the login page on server2 I get an Error page that just says File Not Found.

I looked into the logs using the Correlation ID provided on the error screen and came across this which seems to point to the PasswordRecoveryWebPart being the issue.

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)

I started comparing the FBA layouts and feature files on both servers and don't see anything that is missing. I'm not sure what to look at next and what any possible remedies would be. Thanks.

Update

Based on a question below, I've been trying to login to the second server so that I can go to the Site Settings page and look at the FBA User Management information. Since my login page is the same as the registraiton page and therefore on the second server is erroring out I created a new page with just the custom login webpart on it. Unfortuantely I can't seem to login when accessing the second server directly and get these errors in the logs for it.

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)
Jeff Treuting
  • 13,910
  • 8
  • 36
  • 47
  • Can you provide more details? How are you deploying the webparts, and what are your alternate access mappings set to for this web application. Also, how long does a successful login process take? Errors can range from: - Not having the webpart(s) deploy correctly to 2nd server -> most likely - Not having the controls marked safe - Server is timing out - Alternate Access Mappings direct to a single server rather than the loadbalancer – Ryan Sessions Apr 13 '13 at 04:15

1 Answers1

1

I'm not sure why the end result is a file not found exception, but considering that the error's occurring at GetMembershipProvider, my guess is that the membership provider has not been configured on the one server that's giving the error.

The membership provider entries have to exist in the web application's web.config on each SharePoint server. Instructions on configuring the membership provider are here:

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

Chris Coulson
  • 494
  • 3
  • 10
  • Thanks, I won't be able to look into this until tomorrow, but I'll double check the web.config files on that server to make sure there isn't a typo or something. – Jeff Treuting Apr 14 '13 at 17:21
  • I compared the web.config for the main website (inetpub\wwwroot\wss\VirtualDirectories\80\Web.config) on both servers and they are the same. I also compared the SeucrityTokenServiceApplication web.config files and they are the same as well. – Jeff Treuting Apr 15 '13 at 16:42
  • What happens when you open the FBA User Management page (Site Settings) on the problem server? – Chris Coulson Apr 15 '13 at 20:38
  • Thanks Chris. I'm trying to get that information but can't login to the second server to get to that page. I've added more information and error logs about this to the original question. Thanks so much for your help. – Jeff Treuting Apr 15 '13 at 23:19
  • Did you check the web.config for the SecurityTokenService and make sure that the membership entries in it are ok? If that doesn't solve it, I would revert from your custom login page to the standard SharePoint login page and make sure that you can authenticate through it, before continuing to troubleshoot this custom page. – Chris Coulson Apr 16 '13 at 04:13
  • Yeah I checked the SecurityTokenService for the membership stuff and compared it to the working servers web.config and they are exact matches. I'll try out the standard login stuff and see how that goes. Thanks. – Jeff Treuting Apr 16 '13 at 07:20
  • And another thing to check if the standard login can't connect: DB connectivity. If you're using windows authentication to sql server, make sure that the SharePoint application pool account has access to the database. – Chris Coulson Apr 16 '13 at 12:43