Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/vb.net/17.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Vb.net 我的WCF服务赢得了';不要使用我的wsHttpBinding_Vb.net_Wcf_Wcf Binding - Fatal编程技术网

Vb.net 我的WCF服务赢得了';不要使用我的wsHttpBinding

Vb.net 我的WCF服务赢得了';不要使用我的wsHttpBinding,vb.net,wcf,wcf-binding,Vb.net,Wcf,Wcf Binding,my web.config的serviceModel部分: <system.serviceModel> <bindings> <wsHttpBinding> <binding name="default" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCooki

my web.config的serviceModel部分:

<system.serviceModel>
  <bindings>
    <wsHttpBinding>
      <binding name="default" closeTimeout="00:01:00" openTimeout="00:01:00"
        receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false"
        bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
        maxBufferPoolSize="2147483647"  maxReceivedMessageSize="2147483647"
        textEncoding="utf-8"  useDefaultWebProxy="true"
        messageEncoding="Text">
        <readerQuotas maxDepth="32" maxStringContentLength="8192" 
          maxArrayLength="2147483647"
          maxBytesPerRead="4096" maxNameTableCharCount="2147483647" />
      </binding>
    </wsHttpBinding>
  </bindings>
  <services>
    <service name="templateMgr">
      <endpoint address="http://edocengine.localtest.me/services/templateMgr.svc"
         name="templateMgr.svc" binding="wsHttpBinding" contract="ItemplateMgr"/>
    </service>
  </services>
  <behaviors>
    <serviceBehaviors>
      <behavior>
        <serviceMetadata httpGetEnabled="true" />
        <serviceDebug includeExceptionDetailInFaults="false" />
      </behavior>
    </serviceBehaviors>
  </behaviors>
  <serviceHostingEnvironment multipleSiteBindingsEnabled="true"
     aspNetCompatibilityEnabled="true"/>
</system.serviceModel>
有什么好处

编辑:这显然是服务器web.config。我的客户端使用老式的SOAP web服务(wsdl.exe代理)而不是WCF服务引用(svcutil.exe)引用该服务。因此,客户端的app.config中没有serviceModel部分。以下是客户端进行调用时发送的标头:

POST http://edocengine.localtest.me/services/templateMgr.svc HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 4.0.30319.18052)
Content-Type: text/xml; charset=utf-8
SOAPAction: "http://www.edocbuilder.com/ItemplateMgr/setAssets"
Host: edocengine.localtest.me
Content-Length: 12192
Expect: 100-continue

编辑:找到,修改标题。

如SE上其他地方所述:

您必须使用“添加服务” 引用/svcutil或将绑定更改为basicHttpBinding。 wsHttpBinding的默认配置使用高级安全性和ASMX 不支持它


因此,我想我需要回到basicHttpBinding并使其工作。

禁用mex时会发生什么?我的web.config中没有
mex
。如果默认情况下它处于启用状态,如何禁用它?尝试禁用这些行为,看看会发生什么。不管出于什么原因,它似乎引用了其他内容。我注释掉了
,然后再次运行了测试。没有变化。仍然以
BasicHttpBinding
的形式出现。是否有端点(1)?
POST http://edocengine.localtest.me/services/templateMgr.svc HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 4.0.30319.18052)
Content-Type: text/xml; charset=utf-8
SOAPAction: "http://www.edocbuilder.com/ItemplateMgr/setAssets"
Host: edocengine.localtest.me
Content-Length: 12192
Expect: 100-continue