要启动发布元数据终结点必须将serviceMetadataBehavior服务行为添加到该服务
在默认的情况下,WCF服务不发布元数据终结点
- <endpoint address="mex"
- binding="mexHttpBinding"
- contract="IMetadataExchange"/>
- 说明:
- mexHttpBinding --对Http发布
- mexHttpsBinding --对Https 发布
- mexNamedpipeBinding --对命名管道发布
- mexTcpBinding --对Tcp发布
还必须将httpGecEnabled设为true
- <behavion name="">
- <serviceMetadate httpGetEnabled="true"/>
- </behavion>