要用到wcf了,看了下资料,在打开mex地址的时候显示400错误,不知道问题出在哪里,麻烦熟悉的朋友帮忙看看
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.web>
<compilation debug="true" defaultLanguage="c#" targetFramework="4.0" />
</system.web>
<system.serviceModel>
<services>
<service name="WcfService1.Service1">
<endpoint address="" binding="basicHttpBinding" contract="WcfService1.IService1" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="">
<!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
<serviceMetadata httpGetEnabled="true" />
<!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true" />
<defaultDocument>
<files>
<add value="Service1.svc" />
</files>
</defaultDocument>
</system.webServer>
</configuration>
http://localhost:8081/Service1.svc正常,http://localhost:8081/Service1.svc/mex就显示400错误
对WCF不熟悉,麻烦各位帮下忙,谢谢!
------最佳解决方案--------------------
需要暴露mex终结点
具体方法如下:
http://www.cnblogs.com/mane/archive/2011/05/27/2059578.html
------其他解决方案--------------------
看起来好像没有问题啊。
------其他解决方案--------------------
我也不知道问题出在哪,该做的貌似都已经做了....