Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have got issue. It's an update from a question that I have asked a week ago: I have a State Machine Workflow that is deployed in my local SP machine. It is attached to a list, and will consume a WCF Service hosted in IIS. I have added a service reference through Visual Studio 2010 for the workflow.

We had a deployment today (WCF Service in another server, and the Workflow to the integration server), and I thought that I could just edit the address of the service in the web.config in order to the workflow to consumes my WCF Service at the newest address. However, the workflow is unable to reach the service and returns this exception:

The message could not be processed because the action http:... is invalid or unrecognized.

What is the problem? I have tried to test the service (console app, WCF Test Client) and I am able to consume the service correctly. I have also tried to consume the new located Service from the workflow that is located in my computer (by editing the web.config in inetpub/wwwroot...), and at first I got the same exception, but after some reset, I don't know what happen but the new service address finally worked...

I have noticed that if I try to edit the address of the web.config, it will often throws this exception, unless if I edit the service reference and link to the same address as the one to the web.config, it will work... why?

TLDR:

  • Development: WCF Service in Serv A. Workflow in SP Site local. workflow consumes WCF
  • Deployment:WCF Service in Serv B. workflow in SP Site dev. edit the web.config from inetpub/wwwroot so workflow consumes service from Serv B but can't reach and got this exception.
  • Found that if I update the edit the address of the service reference and use that same address in the web.config, it should work fine. but shouldn't editing the address of the web.config enough? Or when I am publishing the workflow after updating, it will do something else that I have forgotten...?

web.config wcf:

<system.serviceModel>
<services>
  <service behaviorConfiguration="Service.TaskManagementService.TaskMgmtBehavior" name="Service.TaskManagementService.TaskMgmtService">
    <endpoint address="" binding="wsHttpBinding" contract="Service.TaskManagementService.ITaskMgmtService">
    </endpoint>
  </service>
</services>
<behaviors>
  <serviceBehaviors>
    <behavior name="Service.TaskManagementService.TaskMgmtBehavior">
      <serviceMetadata httpGetEnabled="true"/>
      <serviceDebug includeExceptionDetailInFaults="true"/>
    </behavior>
  </serviceBehaviors>
</behaviors>

client:

<system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
<bindings>
  <wsHttpBinding>
    <binding name="WSHttpBinding_ITaskMgmtService" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false">
      <readerQuotas maxDepth="64" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
      <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" />
      <security mode="Message">
        <transport clientCredentialType="Windows" proxyCredentialType="None" realm="" />
        <message clientCredentialType="Windows" negotiateServiceCredential="true" algorithmSuite="Default" />
      </security>
    </binding>
  </wsHttpBinding>
</bindings>
<client>
  <endpoint address="http://blabla-dev/TaskService/TaskMgmtService.svc" binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_ITaskMgmtService" contract="TaskMgmtService.ITaskMgmtService" name="WSHttpBinding_ITaskMgmtService">
  </endpoint>
</client>

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

The problem came because I edited the namespace of the service when deploying it. If you edit the namespace, you must "Update" the service reference in your project too.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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