Allow remote iisreset

To allow remote iisreset (i.e. from another server) in elevated command prompt add the following:

netsh advfirewall firewall add rule name=”Remote IIS inetinfo” dir=in action=allow description=”Remote IIS Service Managment” program=”%systemroot%\System32\inetsrv\inetinfo.exe” enable=yes

netsh advfirewall firewall add rule name=”COM+ Remote Administration (All Programs)” dir=in action=allow description=”” program=”%windir%\system32\dllhost.exe” enable=yes localport=RPC protocol=tcp

Allow remote iisreset

SharePoint Service Application Load Balancer

What is the Service Application Load Balancer?

https://blogs.msdn.microsoft.com/dtaylor/2011/02/23/sharepoint-2010-service-application-load-balancer/

Service Application Load Balancing Discoveries
https://blogs.msdn.microsoft.com/jimmiet/2012/07/15/service-application-load-balancing-discoveries/

How I Learned to Stop Worrying and Love the SharePoint Topology Service
https://blogs.msdn.microsoft.com/besidethepoint/2011/02/19/how-i-learned-to-stop-worrying-and-love-the-sharepoint-topology-service/

To find the service connection point for a farm by using Windows PowerShell
Get-SPFarmConfig -ServiceConnectionPoint

To get the URL for the Application Discovery and Load Balancer Service, run the following command.
Get-SPTopologyServiceApplication | select URI

SharePoint Service Application Load Balancer

Operation is not valid due to the current state of the object

ULS error logs:

SPSecurityContext: Request for security token failed with exception: System.ServiceModel.FaultException`1[System.ServiceModel.ExceptionDetail]: Operation is not valid due to the current state of the object. (Fault Detail is equal to An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is: System.InvalidOperation

Exception: Operation is not valid due to the current state of the object.

An exception occurred when trying to issue security token: Operation is not valid due to the current state of the object..

Exception caught in SearchService.Execute method. Exception: System.ServiceModel.FaultException`1[System.ServiceModel.ExceptionDetail]: Operation is not valid due to the current state of the object. (Fault Detail is equal to An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is: System.InvalidOperation

Exception: Operation is not valid due to the current state of the object.

Exception occured in scope Microsoft.Office.Server.Search.REST.SearchService.query. Exception=Microsoft.Office.Server.Search.REST.SearchServiceException: An unknown error occurred. —> System.ServiceModel.FaultException`1[System.ServiceModel.ExceptionDetail]: Operation is not valid due to the current state of the object.
(Last one – due to REST API search request)
Event ID from Event Log  – 8306

(An exception occurred when trying to issue security token: The server was unable to process the request due to an internal error.  For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the <serviceDebug> configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework 3.0 SDK documentation and inspect the server trace logs..)

 

How to handle:

Add debug flag to
\14\WebServices\SecurityToken

(SP2010)

\15\WebServices\SecurityToken
(SP2013)

<serviceDebug includeExceptionDetailInFaults=”True” httpHelpPageEnabled=”True”/>

6a012875706f1b970c014e88808662970d

 

Ref: http://underthehood.ironworks.com/2011/05/sharepoint-2010-an-exception-occurred-when-trying-to-issue-security-token-the-server-was-unable-to-p-1.html

 

* To enable  tracing as per the Microsoft .NET Framework 3.0 SDK documentation:

If related to WIF (Windows Identity Foundation) – and possible claims, do the following:

Ref: http://web.archive.org/web/20131207170456/http://tnbluesboy.wordpress.com/2010/07/15/how-to-enable-tracing-for-sharepoint-2010-claims/

Service Trace Viewer Tool (SvcTraceViewer.exe)

https://msdn.microsoft.com/en-us/library/ms732023.aspx

Operation is not valid due to the current state of the object