当前位置: 代码迷 >> Web Service >> WCF引用失败有关问题
  详细解决方案

WCF引用失败有关问题

热度:302   发布时间:2016-05-02 02:32:36.0
WCF引用失败问题,求助
我点发现按钮,找到的服务路径为http://localhost:1559/DGService.svc
但是
出错了

我想起DGService.svc文件是在sample.Web项目下的
于是我修改路径为http://localhost:1559/sample.Web/DGService.svc
但是
究竟怎么回事?

我的web配置如下:
<system.serviceModel>
        <behaviors>
          <!--添加WCF通讯类型-->
          <endpointBehaviors address="" binding="basicHttpBinding" contract="IServices">
            <identity>
              <dns value="localhost"></dns>
            </identity>
          </endpointBehaviors>
          <endpointBehaviors address="mex" binding="mexHttpBinding" contract="IMetadataExchange"></endpointBehaviors>
            <serviceBehaviors>
             
                <behavior name="">
                    <serviceMetadata httpGetEnabled="true" />
                    <serviceDebug includeExceptionDetailInFaults="false" />
                </behavior>
              
            </serviceBehaviors>
        </behaviors>
        <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
    </system.serviceModel>


求助啊,谢谢了

------解决方案--------------------
你是怎么寄宿你的wcf程序的?用的iis?
  相关解决方案