Dears,
I created a simple web application with claims based authentication in SharePoint 2013. By default the search is working fine and returns results when the <Identity Impersonate=”true” /> in application web.config.
But when I make <Identity impersonate=”false” /> in web.config then the search returns the below error:
Something went wrong with GUID and checking the ULS logs gives the below exception:
SocialRESTExceptionProcessingHandler.DoServerExceptionProcessing – SharePoint Server Exception [System.InvalidOperationException: The security token request cannot be completed.
at Microsoft.SharePoint.SPSecurityContext.SecurityTokenForServiceContext(Uri contextUri)
at Microsoft.SharePoint.SPChannelFactoryOperations.InternalCreateChannelActingAsLoggedOnUser[TChannel](ChannelFactory`1 factory, EndpointAddress address, Uri via)
at Microsoft.Office.Server.Search.Administration.SearchServiceApplicationProxy.GetChannel(Uri address, Int32 timeoutInMilliseconds)
at Microsoft.Office.Server.Search.Administration.SearchServiceApplicationProxy.DoSpLoadBalancedUriWsOp[T](WebServiceBackedOperation`1 webServiceCall, Int32 timeoutInMilliseconds, Int32 wcfTimeoutInMilliseconds, String operationName)
at Microsoft.Office.Server.Search.Administration.SearchServiceApplicationProxy.DoWebServiceBackedOperation[T](String operationName, Int32 timeoutInMilliseconds, Int32 wcfTimeoutInMilliseconds, WebServiceBackedOperation`1 webServiceCall)
at Microsoft.Office.Server.Search.Administration.SearchServiceApplicationProxy.Execute(QueryProperties properties)
at Microsoft.Office.Server.Search.Query.Query.ExecuteQuery()
at Microsoft.Office.Server.Search.Query.SearchExecutor.ExecuteQueryInternal(Query query)
at Microsoft.Office.Server.Search.Query.SearchExecutor.ExecuteQuery(Query query)
at Microsoft.Office.Server.Search.Query.SearchExecutor.ExecuteQueries(Dictionary`2 queries, Boolean handleExceptions)
at Microsoft.Office.Server.Search.Query.SearchExecutor.<>c__DisplayClass16.<ExecuteQueries_Client>b__14()
at Microsoft.Office.Server.Search.Query.SearchExecutor.RunWithRemoteAPIsPermission[T](Func`1 f)
at Microsoft.Office.Server.Search.Query.SearchExecutor.ExecuteQueries_Client(String[] queryIds, Query[] queries, Boolean handleExceptions)
at Microsoft.Office.Server.Search.Query.SearchExecutorServerStub.ExecuteQueries_MethodProxy(SearchExecutor target, XmlNodeList xmlargs, ProxyContext proxyContext)
at Microsoft.Office.Server.Search.Query.SearchExecutorServerStub.InvokeMethod(Object target, String methodName, XmlNodeList xmlargs, ProxyContext proxyContext, Boolean& isVoid)
at Microsoft.SharePoint.Client.ServerStub.InvokeMethodWithMonitoredScope(Object target, String methodName, XmlNodeList args, ProxyContext proxyContext, Boolean& isVoid)]
Anyone can advise how to solve this issue. I want to keep the Identity impersonate=false because it works fine when we access custom Database data in our webparts.
Thanks,
BR,
Sami Ullah