Problem Description
When trying to start declarative workflow service within Console Application of similar you may get following error:
A binding instance has already been associated to listen URI 'http://localhost:88/TestService.xamlx'. If two endpoints want to share the same ListenUri, they must also share the same binding object instance. The two conflicting endpoints were either specified in AddServiceEndpoint() calls, in a config file, or a combination of AddServiceEndpoint() and config.
Workaround
The problem occurs, when Workflow Designer corrupts the XAMLX file , which describes your declarative workflow service. When working with send an dreceive activities (means adding new and deleting existing, changing of configuration, adding and deleting contracts etc), XAMLX file may contain multiple endpoints.
To solve the problem first forget designer. Second, open XAMLX file with XML editor and look for endpoints. Before you do that close file opened in designer. Otherwise VS will cache designer state and your changes in XML editor will be thrown away. Then delete the endpoint which you do not need. This is mostly the first one, which has been automatically created. It is always named “GetDataEndpoint”.
After that save XAMLX file an open workflow. You will gen another error now, which indicates that some reference is missing (For example __ Reference ID 0 – See picture above). Then open XAMLX again find refernce and delete it.
Following picture shows what I have deleted in my case:
Save XAMLX again and open it now in designer.
Hope this helps…
Damir
Posted
Apr 10 2009, 11:52 AM
by
Damir Dobric