Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/wcf/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
为什么我的WCF服务没有';不公开元数据?_Wcf_Metadata - Fatal编程技术网

为什么我的WCF服务没有';不公开元数据?

为什么我的WCF服务没有';不公开元数据?,wcf,metadata,Wcf,Metadata,我正在与一个不想公开元数据的WCF服务作斗争。根据互联网上的许多帖子,配置文件似乎还可以: <service behaviorConfiguration="Mia.Configurazione" name="Mio.UserService"> <endpoint address="JSON" binding="webHttpBinding" contract="MioWS.IUserService" behaviorConf

我正在与一个不想公开元数据的WCF服务作斗争。根据互联网上的许多帖子,配置文件似乎还可以:

<service behaviorConfiguration="Mia.Configurazione" name="Mio.UserService">
        <endpoint address="JSON" binding="webHttpBinding" contract="MioWS.IUserService" 
                  behaviorConfiguration="JSONEndpointBehavior" bindingConfiguration="" name="RESTEP">
        </endpoint>
        <endpoint address="" binding="basicHttpBinding" contract="MioWS.IUserService">
          <identity>
            <dns value="localhost"/>
          </identity>
        </endpoint>
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
      </service>

服务器回复HTTP错误400(错误请求)。有什么想法吗?

我会为服务添加基本地址,并尝试您的url,以/mex而不是/$metadata

服务器总是回复“错误请求”@pierpaoloilcontectparis-您解决了这个问题吗?
http://localhost:55555/api/UserService.svc/$metadata