WCF协作室:此服务的元数据发布当前已禁用

WCF协作室:此服务的元数据发布当前已禁用,wcf,castle-windsor,Wcf,Castle Windsor,我以前问过这个,但不知道在哪里,所以我再次问,因为我现在绝望了 哎 如果我创建一个新的wcf项目,我可以立即浏览元数据 如果我尝试使用WCF设施,我会得到以下结果: 此服务的元数据发布当前已禁用 我在那里和其他一百万个地方按照指示行事,结果一无所获 如果我将设施服务的内容复制到新创建的项目中,它会抱怨没有启用aspNetCompatibilityEnabled 所以我启用它,然后再次禁用mex,我得到:此服务的元数据发布当前已禁用 再来一次 这让我发疯了——我已经试着在网络上模仿每一个例子 这是

我以前问过这个,但不知道在哪里,所以我再次问,因为我现在绝望了

如果我创建一个新的wcf项目,我可以立即浏览元数据

如果我尝试使用WCF设施,我会得到以下结果:

此服务的元数据发布当前已禁用

我在那里和其他一百万个地方按照指示行事,结果一无所获

如果我将设施服务的内容复制到新创建的项目中,它会抱怨没有启用aspNetCompatibilityEnabled

所以我启用它,然后再次禁用mex,我得到:此服务的元数据发布当前已禁用

再来一次

这让我发疯了——我已经试着在网络上模仿每一个例子

这是我当前的配置-还没有客户端:

<system.serviceModel>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
        <services>
            <service name="IbzStar.WebServices.UserServices" behaviorConfiguration="ServiceBehavior">
                <!-- Service Endpoints -->
                <endpoint address="" binding="wsHttpBinding" contract="IbzStar.WebServices.IUserServices">
                    <!-- 
              Upon deployment, the following identity element should be removed or replaced to reflect the 
              identity under which the deployed service runs.  If removed, WCF will infer an appropriate identity 
              automatically.
          -->
                    <identity>
                        <dns value="localhost"/>
                    </identity>
                </endpoint>
                <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
            </service>
        </services>
        <behaviors>
            <serviceBehaviors>
                <behavior name="ServiceBehavior">
                    <!-- 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>
    </system.serviceModel>

在我的笔记本电脑进入轨道之前,请有人帮帮我


w://

是的,您需要确保正确定义了服务名称、接口和配置定义。检查名称等是否不匹配。最好从头定义配置,而不是识别错误