I'm trying to stand up some Windows Workflow Foundation applications in AppFabric for a spike on an application I'm building and so far it has been... unpleasant. Here are a couple of solutions to some frustrating problems I encountered. Hopefully I can help save someone else a bit of time.
Workflow persistence is not functional because the net.pipe binding is not enabled for this web site
Encountered while trying to configure my WF service on an IIS virtual directory. In particular I encountered this error on the Workflow Persistence tab and a similar one onthe Workflow Host Management tab in the Configure WCF and WF for Application dialog.
- Right click the web site that hosts your service in the IIS Connections pane, click Manage Websites -> Advanced Settings and add ,net.pipe to the end of the "Enabled Protocols" setting (no spaces!)
- With the same site selected, click Edit Bindings on the Actions pane and add a net.pipe binding with Binding Information = *
And in theory, practice and theory are the same. But in practice, unfortunately, they are not. If you're not running Windows Server (or your install is a bit wonky) then there's an extra step to take, because you'll find that net.pipe is not an available binding type in the bindings dialog.
To resolve: Open the "Turn Windows features on or off" dialog (find it by searching in the Start menu/screen, under Settings). Open up the Microsoft .NET 3.5 folder and tick "Windows Communication Foundation Non-HTTP Activation". This should make the net.pipe binding available to you. You may need to run iireset in a console as admin first.
Error: Unable to start debugging on the Web Server
or, if you try running without debugging
Error: Cannot obtain Metadata from xamlx The remote server returned an unexpected response: (405) Method Not Allowed.
or, if you drill further into that error
HTTP Error 404.3 - Not Found The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map
The honest truth is I'm not sure what caused this error. I tried a whole bunch of stuff. I added some handlers to my root Web.config, installed some Workflow hosting modules in IIS, played with permissions, all kinds of stuff and I couldn't get the site to handle the .xamlx request. Ultimately here's what resolved the issue for me. The first step may not be necessary, I honestly don't know (I recommend reading the linked article). But it worked.
- Run the following command: "%WINDIR%\Microsoft.Net\Framework\v3.0\Windows Communication Foundation\ServiceModelReg.exe" -r
- Uninstall and reinstall the following Windows features from the "Turn Windows features on or off" dialog: Windows Communication Foundation HTTP Activation, Windows Communication Non-HTTP Activation. They are both under the .NET Framework 3.5 feature.
applicationHost.config : Unrecognised attribute: 'serviceAutoStartMode'
After I got my workflow up and running I realised that every other service and website on my machine was broken. It seems that AppFabric stepped all over my applicationHost.config file and left an invalid attribute in there. Take a look at this thread for the solutions to this issue.