WebService 连接问题?????????????????????????????

kewudemao 2003-09-12 10:18:19
我是在一个clientforms里面调用一个webservice方法,clientforms等待一段时间后,执行操作,弹出下面的错误信息:

An unbandled exception has occurred in your application. If you click continue, the application will ignore this error and attempt to continue. If you click quit, the application will be shut dowm immediately. The underlying connection was closed:An unexpected error occurred on a send.

如果按了Continue就又可以正常操作了,请问这个问题该怎么样解决。谢谢了先
...全文
79 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
kewudemao 2003-09-12
  • 打赏
  • 举报
回复
可是我一开始操作并不出错,只有当整个程序放在那里不动,大概5分钟左右,在去操作才出现这个错误
netcoder 2003-09-12
  • 打赏
  • 举报
回复
楼上说的对,如果你的webservice没有错误,说明就是你的程序的错误了
另外,可以在调用webservice 地方加上错误捕捉:如:

Dim tempAgent As localhost.Service1
tempAgent = New localhost.Service1("http://localhost/webservice1/Service1.asmx")
Try

tempAgent.webmethod1("haha")

Catch ex As Exception
……

End Try
JB-Zhang 2003-09-12
  • 打赏
  • 举报
回复
信息里都说是未知错误了,我怀疑不是Web Service错误,而是你的Client程序有错误,你可以先不用Client 程序来调用Web Service,用IE来调用试试,要是能看到正确结果,那就说明人的Web Service没问题,然后就去检查你的CLient的代码就OK了。

12,162

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 Web Services
社区管理员
  • Web Services社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧