net.tcp binding metadata problem

巧了我就是萌 提交于 2019-12-06 05:40:36

You have two identical base addresses defined:

<service name="SUR.Core.Service.Implementation.SURDirectoryService" 
         behaviorConfiguration="DefaultServiceBehavior">
  <host>
    <baseAddresses>
      <add baseAddress="net.tcp://127.0.0.1:8731/ISURDirectoryService"/>
    </baseAddresses>


<service name="MSS.Core.Service.Implementation.MSSDirectoryService" 
         behaviorConfiguration="DefaultServiceBehavior">
   <host>
     <baseAddresses>
       <add baseAddress="net.tcp://127.0.0.1:8731/IMSSDirectoryService"   />

That is the cause of your problems - when connecting to net.tcp://127.0.0.1:8731/, WCF doesn't know which service you mean.

The base address must be UNIQUE within its "schema" (e.g. http, net.tcp etc.)

Marc

EDIT: if you want to be able to retrieve your metadata using the browser and navigating to a URL to get it, you'll need to activate the <serviceMetadata httpGetEnabled="True"/> in your service behavior option. Otherwise, you'll only be able to get at your metadata using a SOAP call over net.tcp - e.g. using the "WcfTestClient.exe" app which is in your Visual Studio 9/Common7/IDE folder.

EDIT 2: you have defined a number of extra bindings and behaviors for MEX, but since none of your mex endpoints is actually referencing any of those settings, they're not being used.

I solved the problem, I just change mex binding for MSS service to http. thanks a lot marc_s your response help me to understand the problem!

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!