I ran Workflow Manager on the server. In the SharePoint shell I have been running the following command with [myservername]/[mysitecollectionname] being the actual URL of server and site collection.

Register-SPWorkflowService -SPSite "http://[myservername]/[mysitecollectionname]" -WorkflowHostUri "http://[myservername]:12290"

Here is the error I am getting:

(I had posted this question previously but on a non-logged in and disorganized post on my part. This is my first post in being an actual member around here :))

Microsoft.Workflow.Client.WorkflowCommunicationException: The underlying connection was closed: An unexpected error occurred on a receive. Client ActivityId : e4fd62b4-00bb-458e-b5bd-95529a187ee6. ---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a receive. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult) - -- End of inner exception stack trace ---
at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)
at System.Net.Connection.ReadCallback(IAsyncResult asyncResult) - -- End of inner exception stack trace ---
at Microsoft.Workflow.Common.AsyncResult.End[TAsyncResult](IAsyncResult result)
at Microsoft.Workflow.Client.HttpGetResponseAsyncResult`1.End(IAsyncResult result)
at Microsoft.Workflow.Client.ClientHelpers.SendRequest[T](HttpWebRequest request, T content) - -- End of inner exception stack trace ---
at Microsoft.Workflow.Client.ClientHelpers.SendRequest[T](HttpWebRequest request, T content)
at Microsoft.Workflow.Client.WorkflowManagementClient.SendRequest[T](HttpWebRequest request, T content)
at Microsoft.Workflow.Client.ScopeManager.Get()
at Microsoft.SharePoint.WorkflowServices.WorkflowServerPairingContext.RegisterFarm()
at Microsoft.SharePoint.WorkflowServices.PowerShell.RegisterSPWorkflowService.InternalProcessRecord()
at Microsoft.SharePoint.PowerShell.SPCmdlet.ProcessRecord()


Register-SPWorkflowService : The underlying connection was closed: An unexpected error occurred on a receive. Client ActivityId : 1efcdbef-e934-4188-a1a8-779ba2c2885a. At line:1 char:1 + Register-SPWorkflowService -SPSite http://acmesp/sites/DevTeam -WorkflowHostUr ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~ + CategoryInfo : InvalidData: (Microsoft.Share...WorkflowService: RegisterSPWorkflowService) [Register-SPWorkflowService], WorkflowCommunica tionException + FullyQualifiedErrorId : Microsoft.SharePoint.WorkflowServices.PowerShell

  • are you using the Https or Http for the workflowhost uri....from your command, i am seeing you are using http but portnumber is wrong....Register-SPWorkflowService -SPSite "http://[myservername]/[mysitecollectionname]" -WorkflowHostUri "http://[myservername]:12291" or for https Register-SPWorkflowService -SPSite "http://[myservername]/[mysitecollectionname]" -WorkflowHostUri "https://[myservername]:12290"
    – Waqas Sarwar MVP
    Nov 3, 2015 at 14:31
  • I dont know, however I do know that the port is what I found on the workflow website in IIS. so I know the port number part is right. I believe I tried changing the workflow address to https:// with the same out come but I will try again and see if I get a different error. I also get this error before the log I showed above: once I learn how to use this site
    – seanw432
    Nov 3, 2015 at 14:36
  • one more thing, try to use the fQDN for your server i.e server.domain.com.....so what ever your server full address is?
    – Waqas Sarwar MVP
    Nov 3, 2015 at 14:38
  • I think I found something once I changed it to https:// but its to long to post on this comment so it will be on the next comment
    – seanw432
    Nov 3, 2015 at 14:38
  • Register-SPWorkflowService : The root of the certificate chain is not a trusted root authority. At line:1 char:1 + Register-SPWorkflowService -SPSite "acmesp/sites/DevTeam" -WorkflowHostUr ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~ + CategoryInfo : InvalidData: (Microsoft.Share...WorkflowService: RegisterSPWorkflowService) [Register-SPWorkflowService], ConfigurationExce ption + FullyQualifiedErrorId : Microsoft.SharePoint.WorkflowServices.PowerShell .RegisterSPWorkflowService
    – seanw432
    Nov 3, 2015 at 14:43

4 Answers 4


As i going through with your Issue, i would recommend you to use FQDN for the server and also select the proper Port if using http then 12291 or for https use 12290.

sample command will be:

Register-SPWorkflowService -SPSite "http://[myservername]/[mysitecollectionname]" -WorkflowHostUri "http://FQDN:12291"

Do the following:

Goto the WFM Farm and execute the following Powershell script:


Then look for the ENDPOINT value.

Goto the SP-Server were you register the WFM and open the URL from the endpoint

Some XML should show... If it does register with the Endpoint URL, if nothing shows... Troubleshoot WFM

Edit: In the comments I saw a certificate issue...

Follow this from spences blog: http://www.harbar.net/articles/wfm2.aspx

Perform the following steps on FABSP1: Using Internet Explorer, browse to https://wfm.fabrikam.com:12290. We will see a certificate warning – as the certificate is untrusted. Click Continue to this website (not recommended) and we will see the Workflow Manager configuration returned:

  • Click the Certificate Error icon to the right of the Address Bar
  • Click View Certificates
  • Click the Details tab Click the Copy to File… button On the Welcome to the Certificate Export Wizard page, click Next On the Export File Format page, click Next In the File name text box enter c:\wfm.cer and click Next
  • Click Finish, followed by OK twice

Goto your SPFarm

Perform the following tasks on FABSP1: Import the Workflow Manager SSL Services Certificate to the SharePoint Certificate Store. Execute the following Windows PowerShell:

$trustCert = Get-PfxCertificate "c:\wfm.cer"

New-SPTrustedRootAuthority -Name "Workflow Manager Farm" -Certificate $trustCert


I got mine to work by using the fully qualified name of the computer as the URL so: https://FQN.com:12290

  • Oh, come on guys. This is not a link, it is a format for the URI that should be entered when running the PowerShell command above @BennySkogberg Nov 4, 2015 at 8:00
  • @RobertLindgren Sorry, I was to fast :-) Fixing...
    – Benny Skogberg
    Nov 4, 2015 at 8:02

Check the firewall of system where WF Manager is installed. May be the port is blocked from firewall.

Also, in comment you mentioned you that you dont know is it HTTP or HTTPS site collection. To register workflow, you must be aware of this. Without that you wont be able to register workflow properly. As the workflow manager expose on two ports one for HTTP and another for HTTPS. You can ask your admins, either the SSL is configured or not for your web application and the firewall of WF Manager system exposing those two ports.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.