我正在尝试使用wsHttpBinding
设置我的服务。服务页面在firefox中加载很好,但是当使用WCFTestClient发出请求时,会触发一个错误异常,因为它显然是出于某种原因试图访问mex EndPoint
。如您所见,我甚至没有列出mex,这是配置:
<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>
然而,这是异常信息:
带有To的消息 'HTTP://localhost/SecAmerInc.STPCore.Services.WorkFlowManagement/WorkFlowManagement.xamlx/mex' 由于AddressFilter不匹配,无法在接收器处理 在EndpointDispatcher。检查发件人和收件人 EndpointAddresses同意。
这是WCFTestClient的配置:
<?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>
答案 0 :(得分:0)
MEX(元数据交换)端点将有关您的服务的元数据发送给呼叫者。该工具可能需要您的元数据来了解如何与您的服务进行通信。如果要使用此工具进行测试,请定义MEX端点。