L
loskiller
Unregistered / Unconfirmed
GUEST, unregistred user!
我调用了http://www.wopos.com/webservice/weather.asmx这个web services.
private void button1_Click(object sender, System.EventArgs e)
{
com.wopos.www.Weather w=new com.wopos.www.Weather();
weatherStr=w.getWeather("北京"
MessageBox.Show(weatherStr);
}
过一段时间后再调用会报如下错误,但是我用delphi调用就没有问题:
[WebException: 基础连接已经关闭: 发送时发生意外错误。]
System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest request) +58
System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest request) +5
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) +183
Weather.getWeather(String mCity) in c:/inetpub/wwwroot/WebApplication2/Weather.cs:54
WebApplication2.WebForm1.Button1_Click(Object sender, EventArgs e) in c:/inetpub/wwwroot/webapplication2/webform1.aspx.cs:62
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1277
private void button1_Click(object sender, System.EventArgs e)
{
com.wopos.www.Weather w=new com.wopos.www.Weather();
weatherStr=w.getWeather("北京"
MessageBox.Show(weatherStr);
}
过一段时间后再调用会报如下错误,但是我用delphi调用就没有问题:
[WebException: 基础连接已经关闭: 发送时发生意外错误。]
System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest request) +58
System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest request) +5
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) +183
Weather.getWeather(String mCity) in c:/inetpub/wwwroot/WebApplication2/Weather.cs:54
WebApplication2.WebForm1.Button1_Click(Object sender, EventArgs e) in c:/inetpub/wwwroot/webapplication2/webform1.aspx.cs:62
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1277