当前位置: 代码迷 >> C# >> 调用wcf报错误The remote name could not be resolved
  详细解决方案

调用wcf报错误The remote name could not be resolved

热度:38   发布时间:2016-05-05 04:10:02.0
调用wcf报异常The remote name could not be resolved
本帖最后由 gzyes 于 2014-09-24 10:13:24 编辑
c#网站,调用wcf报异常。
我的网站和wcf站点的顶级域名相同。 网站域名是http://www.shengshidanqing.com/, wcf服务域名是wcf.shengshidanqing.com,,可以访问http://www.shengshidanqing.com/查看异常信息。wcf站点本身是可以访问了。  我这个网站也一直可以访问,今天突然不行了, 报这个异常,大家给说说是什么原因呢?

网站web.config里的serviceModel节点配置:
<system.serviceModel>
    <bindings>
      <basicHttpBinding>
        <binding name="BasicHttpBinding_IBaseDataSrv" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true">
          <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
          <security mode="None">
            <transport clientCredentialType="None" proxyCredentialType="None" realm="" />
            <message clientCredentialType="UserName" algorithmSuite="Default" />
          </security>
        </binding>
      </basicHttpBinding>
    </bindings>
    <client>
      <endpoint address="http://wcf.shengshidanqing.com/BaseDataSrv.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IBaseDataSrv" contract="WCFService.IBaseDataSrv" name="BasicHttpBinding_IBaseDataSrv" />
    </client>
  </system.serviceModel>


wcf站点的配置是默认的
------解决思路----------------------
路由名称无法解析?
是不是域名服务器到期该续费了...
------解决思路----------------------
你ping一下www.shengshidanqing.com,看能不能ping通
------解决思路----------------------
你确定wcf正常运行着,而不是宕掉了?
  相关解决方案