【发布时间】:2010-05-02 20:49:18
【问题描述】:
如何在以下 Web 配置中启用/创建 MEX 端点,以便我可以从浏览器查看服务?
我尝试了一些谷歌搜索的变体,但 VS 总是抱怨它。 (不是有效的子元素等...)
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0" />
</system.web>
<system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true"/>
<services>
<service name="MyApp.MyService" behaviorConfiguration="WebServiceBehavior">
<endpoint address="" binding="webHttpBinding" contract="MyApp.IMyService" behaviorConfiguration="JsonBehavior">
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
</service>
</services>
<behaviors>
<endpointBehaviors>
<behavior name="JsonBehavior">
<webHttp/>
</behavior>
</endpointBehaviors>
</behaviors>
</system.serviceModel>
</configuration>
干杯, 康纳
【问题讨论】:
标签: wcf wcf-binding