如何在下面的Web配置中啓用/創建MEX終端,以便從瀏覽器查看服務?在Web.Config中啓用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>
乾杯, 康納爾
...或者你自己打開該工具;在我的機器上它位於'C:\ Program Files \ Microsoft SDKs \ Windows \ v6.0A \ Bin \ SvcConfigEditor.exe' – josh3736 2010-05-02 20:59:05
嘿josh3736,我剛剛發現這個工具正確:)分鐘 – Conor 2010-05-02 21:00:01
希望我瞭解之前的這個工具,浪費了2天時間,用WCF綁定的web.configs,把它放到了體驗中! – Conor 2010-05-02 21:55:39