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)
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/
Related
I have some code that calls the TFS API and returns team meta data. (e.g. team names, area paths, etc.) The code works fine locally in Visual Studio ASP.NET MVC project, but fails whenever I deploy to the server.
What I have tried that didn't work:
I granted the AppPool user account Full control to the registry key (did not work)
Also, tried granting Everyone Full Control to the registry key (still did not work)
Any insight into how to set up the correct permissions of configuration for IIS deployed apps to hit the TFS API would be greatly appreciated. (error message below)
Here's the Error message the app produces:
System.UnauthorizedAccessException
Access to the registry key 'HKEY_CURRENT_USER\Software\Microsoft\VSCommon\12.0\ClientServices\TokenStorage\VisualStudio' is denied.
System.UnauthorizedAccessException: Access to the registry key 'HKEY_CURRENT_USER\Software\Microsoft\VSCommon\12.0\ClientServices\TokenStorage\VisualStudio' is denied.
at Microsoft.Win32.RegistryKey.Win32Error(Int32 errorCode, String str)
at Microsoft.Win32.RegistryKey.CreateSubKeyInternal(String subkey, RegistryKeyPermissionCheck permissionCheck, Object registrySecurityObj, RegistryOptions registryOptions)
at Microsoft.Win32.RegistryKey.CreateSubKey(String subkey, RegistryKeyPermissionCheck permissionCheck, RegistryOptions options)
at Microsoft.VisualStudio.Services.Common.TokenStorage.RegistryTokenStorageHelper.GetRootKey(String subkeyName)
at Microsoft.VisualStudio.Services.Common.TokenStorage.RegistryTokenStorage.RetrieveToken(VssTokenKey tokenKey)
at Microsoft.TeamFoundation.Client.TfsClientCredentialStorage.RetrieveToken(Uri serverUrl, VssCredentialsType credentialType)
at Microsoft.TeamFoundation.Client.CookieCredential.OnCreateTokenProvider(Uri serverUrl, HttpWebResponse response)
at Microsoft.TeamFoundation.Client.IssuedTokenCredential.CreateTokenProvider(Uri serverUrl, HttpWebResponse response, IssuedToken failedToken)
at Microsoft.TeamFoundation.Client.TfsClientCredentials.TryGetTokenProvider(Uri serverUrl, IssuedTokenProvider& provider)
at Microsoft.TeamFoundation.Client.Channels.TfsHttpRequestHelpers.PrepareWebRequest(HttpWebRequest webRequest, Guid sessionId, String operationName, CultureInfo cultureInfo, TfsRequestSettings settings, TfsClientCredentials credentials, IdentityDescriptor impersonate, IssuedToken& currentToken, IssuedTokenProvider& tokenProvider)
at Microsoft.TeamFoundation.Client.Channels.TfsHttpRequestHelpers.CreateSoapRequest(Uri requestUri, Guid sessionId, String soapAction, String operationName, CultureInfo cultureInfo, TfsRequestSettings settings, TfsClientCredentials credentials, IdentityDescriptor impersonate, IssuedToken& currentToken, IssuedTokenProvider& tokenProvider)
at Microsoft.TeamFoundation.Client.Channels.TfsHttpWebRequest.CreateWebRequest()
at Microsoft.TeamFoundation.Client.Channels.TfsHttpWebRequest.SendRequest()
at Microsoft.TeamFoundation.Client.Channels.TfsHttpRequestChannel.Request(TfsMessage message, TimeSpan timeout)
at Microsoft.TeamFoundation.Client.Channels.TfsHttpClientBase.Invoke(TfsClientOperation operation, Object[] parameters, TimeSpan timeout, Object[]& outputs)
at Microsoft.TeamFoundation.Framework.Client.RegistrationProxy.GetRegistrationEntries(String toolId)
at Microsoft.TeamFoundation.Framework.Client.RegistrationService.RefreshMemoryCache()
at Microsoft.TeamFoundation.Framework.Client.RegistrationService.Microsoft.TeamFoundation.Server.IRegistration.GetRegistrationEntries(String toolId)
at Microsoft.TeamFoundation.Framework.Client.IdentityManagementService..ctor(TfsConnection tfsBase)
at Microsoft.TeamFoundation.Framework.Client.IdentityManagementService2..ctor(TfsConnection tfsBase)
at Microsoft.TeamFoundation.Client.TfsConnection.CreateInternalProxy(Type serviceType)
at Microsoft.TeamFoundation.Client.TfsConnection.GetServiceInstance(Type serviceType, Object serviceInstance)
at Microsoft.TeamFoundation.Client.TfsConnection.GetService(Type serviceType)
at Microsoft.TeamFoundation.Client.TfsConnection.GetService[T]()
at Microsoft.TeamFoundation.Client.TfsTeamService.QueryTeams(String projectId)
I have been having the same problem and have solved it by setting the "Load User Profile" in IIS application pool settings to True.
I don't know if this is some new dependency in TFS 2013 or whether IIS 8.5 has changed the default, but this fixes it for me.
I ran into this same issue, but setting Load User Profile to TRUE didn't work for me. What did eventually work was going into the registry and adding a "HKCU\Software\Microsoft\VSCommon\12.0\ClientServices" key for the appropriate user(s). Apparently the TFS assemblies get a little cranky when you try to use them on systems without Visual Studio installed on them.
Credit goes to whoever added this information to http://msdn.developer-works.com/article/12173562/After+upgrade+from+TFS+2010+to+TFS+2013+the+soap+notifications+stop+working.
We had this issue and setting the "Load User Profile" in IIS application pool settings to True worked for us. But then the same issue came back and we found setting "Load User Profile" in IIS application pool settings to False fixed the issue once again. So it appears to me that it is the toggling of this setting that is fixing something rather than the actual value it is set to. No matter what "Load User Profile" in IIS application pool is set to, I would try toggling it to the opposite value, refresh the application pool and see if that helps. If anyone tracks down the root cause of this please share.
Can you explain me why we need in String clientId in the method
void addMessage(String ClientId, FacesMessage msg);?
Is it true that when client sent an initial request to server then server assign to this client a specific String ClientId. As i understand FacesContext created when aplication deployed and runnig the first time and this FacesContext is unique for application. Is it true?
Client id in FacesContext#addMessage(String clientId, FacesMessage message) is needed to be able to add a specific message to a specific component. You can either specify a client id of the component you'd like to assign the message to, or null to add the message to the messages stack not tied to a specific component. The latter will be updated in e.g. <h:message for="clientId>, while the latter in e.g. <h:messages globalonly="true">. You can add a message to global messages in case it is not component-specific, for instance, when database operation failed.
In SharePoint 2010, I created a new site template from an existing site and a new site using this template. After deleting the new site and I cannot deactivate the site template to be able to remove it. Here's the exception I get:
System.ArgumentException: Value does not fall within the expected range.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Stack Trace:
[ArgumentException: Value does not fall within the expected range.]
Microsoft.SharePoint.SPWebCollection.get_Item(Guid id) +27763375
Microsoft.SharePoint.SPFeatureEnumeratorBase.GetCachedWeb(SPSite site, Guid webId, Guid featureId) +252
[SPFeatureIsOrphanedException: Unable to access web scoped feature (Id: 5c143ca0-e513-4fa5-93a6-a926352c982e) because it references a non-existent or broken web (Id: 196cdf6e-d4a1-4cb6-b962-591aaa3c5f43) on site 'http://win-9o8m2cks1v7'. Exception: System.ArgumentException: Value does not fall within the expected range.
at Microsoft.SharePoint.SPWebCollection.get_Item(Guid id)
at Microsoft.SharePoint.SPFeatureEnumeratorBase.GetCachedWeb(SPSite site, Guid webId, Guid featureId)]
Microsoft.SharePoint.SPFeatureEnumeratorBase.GetCachedWeb(SPSite site, Guid webId, Guid featureId) +22713369
Microsoft.SharePoint.SPFeatureEnumeratorBase.GetNextFeatureFromRowset(GetFeaturesState state, SqlDataReader reader, SPSite site) +464
Microsoft.SharePoint.SPSiteFeatureEnumerator.System.Collections.IEnumerator.MoveNext() +38
Microsoft.SharePoint.SPFeatureQueryResultCollection.System.Collections.IEnumerator.MoveNext() +26338677
Microsoft.SharePoint.SPUserSolutionCollection.RemoveFeatureInstancesAndDefinition(SPFeatureDefinition featdef) +770
Microsoft.SharePoint.SPUserSolutionCollection.Remove(SPUserSolution solution) +279
Microsoft.SharePoint.WebControls.SolutionItemButton.DeactivateItem() +464
Microsoft.SharePoint.WebControls.SPLinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +72
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +29
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2981
I already emptied the recyble bin. Does anybody know how can I deactivate and delete this site template?
You say that you have emptied the Recycle Bin. Are you certain you have emptied all the recycled items in BOTH recycle bins? If not, try this:
Go to the Site Settings page for the root web of your site collection. Under the heading Site Collection Administration, click the Recycle bin link. On the QuickLaunch menu, select End User Recycle Bin items, then select all the items that appear and click the Delete Selection link at the top of the items list. Now select Deleted From End User Recycle Bin from the QuickLaunch Menu and do the same.
Now return to the solution gallery and you should be able to deactivate and delete your solution.
Check your deactivation code. In there you have code that is causing this issue.
What I suggest is launch the features page, attach visual studio to all the w3wp processes and put a breakpoint in the feature deactivation. That should show you what is going wrong.
My guess is that you are creating a web object that no longer exists.
Does anyone have any ideas as to why CredentialCache.DefaultCredential would return an ICredential instance with empty strings for domain, username, and password? I'm running a WCF service on IIS 7.5. It works fine on one server but never works on another. I have verified that the IIS application has Windows Authentication enabled....
Here is how it's being used:
string url = string.Format("{0}/departments/finance/_vti_bin/listdata.svc", _IntranetAddress);
var financeDataContext = new FinanceDataContext(new Uri(url))
{
Credentials = CredentialCache.DefaultCredentials
};
I am not sure how it is working in one of your servers? I hope you already read this
http://msdn.microsoft.com/en-us/library/system.net.credentialcache.defaultcredentials.aspx
but it clearly says "The ICredentials instance returned by DefaultCredentials cannot be used to view the user name, password, or domain of the current security context."
The NetworkCredential returned from CredentialCache.DefaultCredential is just a placeholder. If you look at it using the Debugger, you'll see that it's of type SystemNetworkCredential. Internal API check for this type to see if integrated authentication should be used or not. There are other ways to get the current username (like WindowsIdentity.GetCurrent()).
EDIT:
To specify impersonation for a WCF operation, add this attribute to the method implementing a contract:
[OperationBehavior(Impersonation = ImpersonationOption.Required)]
public void SomeMethod()
{
// do something here
}
i have the following Environment:
SharePoint server 2010
Windows server 2008 R2
SQL Server 2008 R2
Im not in a domain its pure standalone server.
i have a website configured to use port 88 and a site collection.
problem is i could browse the site using the following URL :
http://localhost:88
but not :
http://192.168.1.8:88
it generate this error :
[FileNotFoundException: The Web application at http://192.168.1.8:88/ 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.]
Microsoft.SharePoint.SPSite..ctor(SPFarm farm, Uri requestUri, Boolean contextSite, SPUserToken userToken) +27650365
Microsoft.SharePoint.SPSite..ctor(String requestUrl) +110
Microsoft.SharePoint.IdentityModel.Pages.IdentityModelSignInPageBase.SetThreadCultureFromRequestedWeb() +64
System.Web.UI.Control.InitRecursive(Control namingContainer) +143
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1477
I`m sure of the IP and the port..
plus share point central Administration works with both
http://192.168.1.8:15769
and
http://localhost:15769
any idea what the problem could be ?
Make sure that you configure your alternate access mappings correctly. Here is more information: http://technet.microsoft.com/en-us/library/cc261814(office.12).aspx (it's for SharePoint 2007, but the principles are the same in 2010)