Question

I'm trying to set up my service with wsHttpBinding. The service page loads up just fine in firefox but when using WCFTestClient to make a request, a fault exception is fired because it is apparently trying to access the mex EndPoint for some reason. As you can see, I don't even have mex listed, here is the config:

<system.serviceModel>    
    <services>
      <service name="WorkFlowManagement" behaviorConfiguration="WorkFlowManagementBehavior">
        <endpoint binding="wsHttpBinding" contract="IWorkflowManagement"
                  bindingConfiguration="WSHttpBinding_IWorkflowManagement"
                  name="WSHttpBinding_IWorkflowManagement"/>
      </service>
    </services>
    <bindings>
      <wsHttpBinding>
        <binding name="WSHttpBinding_IWorkflowManagement" maxBufferPoolSize="999965536"
                 maxReceivedMessageSize="999965536" messageEncoding="Text" textEncoding="utf-8">
          <readerQuotas maxArrayLength="999965536" maxBytesPerRead="999965536" maxDepth="999965536"
                        maxNameTableCharCount="999965536" maxStringContentLength="999965536"/>
          <security mode="None"/>
        </binding>
      </wsHttpBinding>
    </bindings>
    <behaviors>
      <serviceBehaviors>
        <behavior name="WorkFlowManagementBehavior">
          <serviceMetadata httpGetEnabled="true"/>
          <serviceDebug includeExceptionDetailInFaults="true"/>
          <sqlWorkflowInstanceStore
            connectionString="my connection string"
           instanceEncodingOption="None" instanceCompletionAction="DeleteAll" instanceLockedExceptionAction="BasicRetry" hostLockRenewalPeriod="00:00:30" runnableInstancesDetectionPeriod="00:00:02" />
          <workflowIdle timeToUnload="0"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true">
      <serviceActivations>
        <add factory="SecAmerInc.STPCore.Services.WorkFlowManagment.WFServiceFactory"
             relativeAddress="./WorkFlowManagement.xamlx"
             service="WorkFlowManagement.xamlx"/>
      </serviceActivations>
    </serviceHostingEnvironment>
  </system.serviceModel>

Yet, this is the exception message:

The message with To 'http://localhost/SecAmerInc.STPCore.Services.WorkFlowManagement/WorkFlowManagement.xamlx/mex' cannot be processed at the receiver, due to an AddressFilter mismatch at the EndpointDispatcher. Check that the sender and receiver's EndpointAddresses agree.

This is the WCFTestClient's config:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <system.serviceModel>
        <bindings>
            <wsHttpBinding>
                <binding name="WSHttpBinding_IWorkflowManagement" sendTimeout="00:05:00">
                    <security mode="None" />
                </binding>
            </wsHttpBinding>
        </bindings>
        <client>
            <endpoint address="http://localhost/SecAmerInc.STPCore.Services.WorkFlowManagement/WorkFlowManagement.xamlx"
                binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IWorkflowManagement"
                contract="IWorkflowManagement" name="WSHttpBinding_IWorkflowManagement" />
        </client>
    </system.serviceModel>
</configuration>
Was it helpful?

Solution

The MEX (Metadata Exchange) endpoint sends metadata about your service to callers. The tool likely needs your metadata to understand how to communicate with your service. If you want to test with this tool, define your MEX endpoint.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top