两种发布wcf元数据的方式
1 通过制定service的behaviorConfiguration属性设置serviceMetadata
<serviceBehaviors> <behavior name="ffff"> <serviceMetadata httpGetEnabled="true" httpGetUrl="metadata"/> </behavior> </serviceBehaviors> <service name="jqueryWCF.WCFservice" behaviorConfiguration="ffff"> <host> <baseAddresses> <add baseAddress="http://127.0.0.1:9999/Service"/> </baseAddresses> </host> <endpoint address="" behaviorConfiguration="AllenBehavior" binding="webHttpBinding" contract="jqueryWCF.WCFservice" />
2 通过<endpoint address="mex" binding="mexHttpBinding"
contract="IMetadataExchange" />
<serviceBehaviors> <behavior name="mexBehavior"> <serviceDebug includeExceptionDetailInFaults="true" /> <serviceMetadata httpGetEnabled="false" /> <serviceThrottling maxConcurrentCalls="1000" maxConcurrentSessions="1000" /> </behavior> </serviceBehaviors> <services> <service name="jqueryWCF.WCFservice" behaviorConfiguration="mexBehavior"> <host> <baseAddresses> <add baseAddress="http://127.0.0.1:9999/Service"/> </baseAddresses> </host> <endpoint address="" behaviorConfiguration="AllenBehavior" binding="webHttpBinding" contract="jqueryWCF.WCFservice" /> <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /> </service> </services>
1和2有什么区别吗?