qq_20617155
酸奶盖
采纳率50%
2015-01-07 03:03

调用WEBservice 程序错误显示,目标机积极拒绝链接

已采纳

公司让我把数据库的数据上传到外地客户端,以前的一个程序员写了一个上传程序,里面调用的web Service 程序,配置文件如下:

 <?xml version="1.0" encoding="utf-8"?>
<configuration>
  <appSettings>
    <add key="WebServiceUrl" value="http://121.15.129.225:8877/?wsdl/" />
    <add key="UploadTimeInterval" value="1" />
    <!--单位:分钟,表示上传时间间隔-->
    <add key="ConnectionString" value="Data Source=(local);Initial Catalog=LightningMonitorOnLine_SZ;User Id=sa;Password=123" />
    <add key="ClientSettingsProvider.ServiceUri" value="" />
  </appSettings>
  <system.serviceModel>
    <bindings>
      <basicHttpBinding>
        <binding name="LmsBLQService" />
      </basicHttpBinding>
    </bindings>
    <client>
      <endpoint address="http://121.15.129.225:8877/" binding="basicHttpBinding" bindingConfiguration="LmsBLQService" contract="ServiceReference1.LmsBLQServicePortType" name="LmsBLQService" />
    </client>
  </system.serviceModel>
  <startup>
    <supportedRuntime version="v2.0.50727" />
  </startup>
  <system.web>
    <membership defaultProvider="ClientAuthenticationMembershipProvider">
      <providers>
        <add name="ClientAuthenticationMembershipProvider" type="System.Web.ClientServices.Providers.ClientFormsAuthenticationMembershipProvider, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" />
      </providers>
    </membership>
    <roleManager defaultProvider="ClientRoleProvider" enabled="true">
      <providers>
        <add name="ClientRoleProvider" type="System.Web.ClientServices.Providers.ClientRoleProvider, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" cacheTimeout="86400" />
      </providers>
    </roleManager>
  </system.web>
</configuration>

我用这个样的配置文件执行程序,错误提示 tcp错误:10061 无法连接目标主机,
请问大神,配置文件WebServiceUrl和endpoint address如何写 ?

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

5条回答

相关推荐