公司讓我把數據庫的數據上傳到外地客戶端,以前的一個程序員寫了一個上傳程序,裡面調用的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如何寫 ?
參考下這些問題,能不能幫你
http://www.zhixing123.cn/net/25814.html
http://www.educity.cn/wenda/80692.html
http://blog.csdn.net/jjp837661103/article/details/9029061