none
sharepoint 2013 New-SPSite : There was no endpoint listening at http://localhost:32843/SecurityTokenServiceApplication/securitytoken.svc

    Question

  • Creating New-spsite returns error

    "New-SPSite : There was no endpoint listening at http://localhost:32843/SecurityTokenServiceApplication/securitytoken.svc that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details."

    Reinstall sharepoint 2013 does not solve the problem. Same error all the time. The log files said:


    10/07/2013 22:45:27.58  PowerShell.exe (0x0E60)                  0x0788 SharePoint Foundation          Claims Authentication          fsq7 High     SPSecurityContext: Request for security token failed with exception: System.ServiceModel.EndpointNotFoundException: There was no endpoint listening at http://localhost:32843/SecurityTokenServiceApplication/securitytoken.svc that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details. ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it [::1]:32843     at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)     at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, Con... 84766e3a-b28f-40eb-9b61-574e9e232ca5
    10/07/2013 22:45:27.58* PowerShell.exe (0x0E60)                  0x0788 SharePoint Foundation          Claims Authentication          fsq7 High     ...nectSocketState state, IAsyncResult asyncResult, Exception& exception)     --- End of inner exception stack trace ---     at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)     at System.Net.HttpWebRequest.GetRequestStream()     at System.ServiceModel.Channels.HttpOutput.WebRequestHttpOutput.GetOutputStream()     --- End of inner exception stack trace ---    Server stack trace:      at System.ServiceModel.Channels.HttpOutput.WebRequestHttpOutput.GetOutputStream()     at System.ServiceModel.Channels.HttpOutput.Send(TimeSpan timeout)     at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.SendRequest(Message message, TimeSpan timeout)     at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)     ... 84766e3a-b28f-40eb-9b61-574e9e232ca5
    10/07/2013 22:45:27.58* PowerShell.exe (0x0E60)                  0x0788 SharePoint Foundation          Claims Authentication          fsq7 High     ...at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)     at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)     at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)    Exception rethrown at [0]:      at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)     at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)     at Microsoft.IdentityModel.Protocols.WSTrust.IWSTrustContract.Issue(Message message)     at Microsoft.IdentityModel.Protocols.WSTrust.WSTrustChannel.Issue(RequestSecurityToken rst, Reques... 84766e3a-b28f-40eb-9b61-574e9e232ca5
    10/07/2013 22:45:27.58* PowerShell.exe (0x0E60)                  0x0788 SharePoint Foundation          Claims Authentication          fsq7 High     ...tSecurityTokenResponse& 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, SPRequestSecurityTokenProperties properties) 84766e3a-b28f-40eb-9b61-574e9e232ca5
    10/07/2013 22:45:27.58  PowerShell.exe (0x0E60)                  0x0788 SharePoint Foundation          Claims Authentication          8306 Critical An exception occurred when trying to issue security token: There was no endpoint listening at http://localhost:32843/SecurityTokenServiceApplication/securitytoken.svc that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.. 84766e3a-b28f-40eb-9b61-574e9e232ca5
    10/07/2013 22:45:27.58  PowerShell.exe (0x0E60)                  0x0788 SharePoint Foundation          Monitoring                     b4ly High     Leaving Monitored Scope (ExecuteSecurityTokenServiceOperationCaller:http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Issue). Execution Time=2009.99498539619 84766e3a-b28f-40eb-9b61-574e9e232ca5

    Anyone have solved in sps2013? Thank you. I follow the answers for sharepoint 2010. Nothing help.

    Monday, October 7, 2013 5:30 PM

All replies

  • Is the Security Token Application Pool in IIS running?

    Trevor Seward, MCC

    Follow or contact me at...
      

    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

    Tuesday, October 8, 2013 5:52 PM
    Moderator
  • try to recycle the App pool for the Security token services. make sure the STS services running in Central Admin(manage services on Server).

    how many servers in farm you have?


    Thanks -WS SharePoint administrator, MCITP(SharePoint 2010, 2013) Blog: http://wscheema.com/blog

    Tuesday, October 8, 2013 6:09 PM
    Moderator
  • When I browse: http://localhost:32843/SecurityTokenServiceApplication/securitytoken.svc , it said "This page can't be displayed".

    But when I browse: http://(servername):32843/SecurityTokenServiceApplication/securitytoken.svc , it showed    " SecurityTokenService Service.You have created a service. To test this service, you will need to create a client and use it to call the service. You can do this using the svcutil.exe tool from the command line with the following syntax:"

    Wednesday, October 9, 2013 5:09 AM
  • Thank you for the reply.  I did recycle.  But it was not improved. Remain the same.
    Only one server in this farm.
    It is running on windows server 2008 R2 with sql server 2012 standard.

    The STS service is not running in Central Admin.

    It said :

    The SharePoint Health Analyzer has detected some critical issues that require your attention. View these issues.

    Title

    The Security Token Service is not available.

    Severity

    2 - Warning

    Category

    Availability

    Explanation

    The Security Token Service is not issuing tokens. The service could be malfunctioning or in a bad state.

    Remedy

    Administrator should try to restart the Security Token Service on the boxes where it is not issuing tokens. If problem persists, further troubleshooting may be available in the KB article. For more information about this rule, see "http://go.microsoft.com/fwlink/?LinkID=160531".

    Failing Servers

    WEB

    Failing Services

    SPSecurityTokenService (SecurityTokenService)

       

    Wednesday, October 9, 2013 5:30 AM
  • Any suggestion?  How to make STS running properly and in Central Admin?  Thank you for any help. 

    Friday, October 11, 2013 3:31 PM
  • Same problem, even reinstall the sharepoint 2013, remove all the windows updates.

    STS is  "started" in "Manage service applications"  in Central Admin.
    But in The SharePoint Health Analyzer has said "The Security Token Service is not available".

    Creating new-spsite with powershell give same error. (plan to create host-named site collection)
    "There was no endpoint listening at http://localhost:32843/SecurityTokenServiceApplication/securitytoken.svc that could accept the message. This is often caused by an incorrect address or SOAP action."

    Creating new site with central admin dose not show any error. But accessing the site gives "http 500 internal server error".

    When I browse: http://localhost:32843/SecurityTokenServiceApplication/securitytoken.svc , it said "This page can't be displayed".
    But when I browse: http://(servername):32843/SecurityTokenServiceApplication/securitytoken.svc , it showed    " SecurityTokenService Service.You have created a service. To test this service, you will need to create a client and use it to call the service. You can do this using the svcutil.exe tool from the command line with the following syntax:"

    The log gives the error "SPSecurityContext: Request for security token failed with exception: System.ServiceModel.EndpointNotFoundException: There was no endpoint listening at http://localhost:32843/SecurityTokenServiceApplication/securitytoken.svc/actas that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details. ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it [::1]:32843     at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)     at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& addres..."

    It is on window server 2008 R2, sql server 2012 standard edition and VMware Virtual Machine.

    Any help will be so grateful.

    Thursday, October 17, 2013 1:05 PM
  • I'm still looking for the same solution to the issue you mention. However I can still create both web applications and site collections by using PowerShell. The trick is to create them in "classic" mode instead of by using Claims.

    If you can notice, Central Admin Website is also created in classic mode as you can still access it. So here's the mended way I'm doing.

    Create a PowerShell script with the following:

    Add-PSSnapIn Microsoft.SharePoint.PowerShell
    New-SPWebApplication -Name "Name of your webapp" -ApplicationPool "name of app pool" -AuthenticationMethod "Kerberos" -ApplicationPoolAccount (Get-SPManagedAccount "<domain>\<managed user account>") -DatabaseName "<content-database-of-your-choice>" -DatabaseServer "<SQL server hostname>" -Port 80 -URL "http://social.seac.com" -HostHeader "<host header>" -Path "physical location for the files"

    The first line of the script is for loading the PowerShell cmdlets and you can avoid it if you're using SharePoint Management Shell (which I don't use).

    I hope it helps in the meanwhile Microsoft can offer a solution to this issue.

    Friday, December 13, 2013 7:09 PM
  • https://social.technet.microsoft.com/Forums/en-US/14887753-bc8d-4337-b8d1-c3f16e5ba3b6/errors-in-the-event-view-about-claims-based-authentication Read this post
    Tuesday, June 2, 2015 6:27 AM