求救啊!为什么调用webservice方法的时候总提示SERVER ERROR的错误

qq9511971 2010-05-06 07:03:54
我在本机上调用远程服务器的webservice没有任何问题,他调用我的也没问题。但是放到服务器的IIS上的时候就报错。注释掉webservice的时候没问题。
错误代码如下,权限我全开了,是.net 2.0的。

Server Error in '/message' Application.
--------------------------------------------------------------------------------

An existing connection was forcibly closed by the remote host
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host


大家帮我看看到底是怎么回事啊
...全文
831 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
qq9511971 2010-05-07
  • 打赏
  • 举报
回复
[Quote=引用 4 楼 ly302 的回复:]
低版本的NET 無法使用 HTTP GET 或 HTTP POST 來叫用 Web 服務的應用程式就會失敗

需要在webservice的web.config裡面加入下列的設定:
<webServices>
<protocols>
<add name="HttpGet"/>
<add name="HttpPost"/>
</protocols>
</webServices>
這樣……
[/Quote]

加了,没用。。我在其他服务器上试都没问题,就拿台服务器有问题,我怀疑是不是IIS的问题
mark620 2010-05-07
  • 打赏
  • 举报
回复
皇城龙三 2010-05-06
  • 打赏
  • 举报
回复
低版本的NET 無法使用 HTTP GET 或 HTTP POST 來叫用 Web 服務的應用程式就會失敗

需要在webservice的web.config裡面加入下列的設定:
<webServices>
<protocols>
<add name="HttpGet"/>
<add name="HttpPost"/>
</protocols>
</webServices>
這樣就不會發生Internal Server Error的問題了!!
qq9511971 2010-05-06
  • 打赏
  • 举报
回复
没有错误,同样的程序,我在本机调试时完全没有问题的
足球中国 2010-05-06
  • 打赏
  • 举报
回复
ws有错误没捕捉吧。看日志。
「已注销」 2010-05-06
  • 打赏
  • 举报
回复
一个现有的连接被远程主机强制关闭!google

12,162

社区成员

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

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