无法在Web浏览器中查看WCF Mex终结点输出
我是WCF的新手,试图了解Mex端点。我已经创建了一个testservice。它工作正常,并且我能够使用URL或URL?WSDL查看URL=的WSDL输出 然而,我在浏览器中浏览URL/mex时收到400个错误请求。我将httpGetEnabled设置为false,然后还可以使用svcutil生成代理类 您能告诉我为什么我不能在web浏览器中查看mex端点输出吗。下面是配置文件: App.Config无法在Web浏览器中查看WCF Mex终结点输出,wcf,Wcf,我是WCF的新手,试图了解Mex端点。我已经创建了一个testservice。它工作正常,并且我能够使用URL或URL?WSDL查看URL=的WSDL输出 然而,我在浏览器中浏览URL/mex时收到400个错误请求。我将httpGetEnabled设置为false,然后还可以使用svcutil生成代理类 您能告诉我为什么我不能在web浏览器中查看mex端点输出吗。下面是配置文件: App.Config UR无法访问。它是本地的URL吗?是的,它是我的本地机器。为了澄清,URL会给你400个响应?
UR无法访问。它是本地的URL吗?是的,它是我的本地机器。为了澄清,URL会给你400个响应?是的,但是页面是空白的。当我在chrome中执行F12时,我看到400个错误请求,但or工作正常
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<services>
<service name="HelloTest.testservice" behaviorConfiguration="serviceBehaviour">
<endpoint binding="basicHttpBinding" contract="HelloTest.Itestservice" address="HelloTest">
</endpoint>
<endpoint binding="mexHttpBinding" contract="IMetadataExchange" address="mex">
</endpoint>
<host>
<baseAddresses>
<add baseAddress="http://myweb.com:8000/testservice"/>
</baseAddresses>
</host>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="serviceBehaviour">
<serviceMetadata httpGetEnabled="true"></serviceMetadata>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>