WebExcpetion由于并发事务太多? [英] WebExcpetion due to too many concurrent transactions?
问题描述
我在IIS中运行了一个Web服务。
一个简单的ConnectionTest()方法只需等待Thread.Sleep一秒钟,然后返回一个我写了一个小的测试应用程序,它启动了许多并行线程。每个线程调用Web服务方法,然后只输出到控制台。
现在我想通了,如果正好有10个线程同时调用ws,那么在这段时间内每个其他线程的startet都会从中获取WebException。网络服务。只要其中一个工作线程完成(并且少于10个线程同时调用ws方法),一个新线程就可以成功执行ws方法。
令我恼火的是,WebException说:请求失败,HTTP状态为403:禁止访问。
*)为什么我可以建立与ws的10个连接?
*)我可以更改/更改的位置(打开)客户端,在服务器上,配置文件...)这个设置?
*)WebException可能是由另一个问题引起的,并且可能想到多个并发连接是错误的?
如果有人能帮助我,那将是很棒的,因为我已经花了几个小时进行实时搜索和谷歌解决这个问题。
谢谢,
Christian
Christian,
您能否阅读本文档并告诉我们这是否有帮助?
< a href ="http://msdn.microsoft.com/en-us/library/ms998583.aspx#scalenetchapt17_topic14"> http://msdn.microsoft.com/en-us/library/ ms998583.aspx #scalenetchapt17_topic14
http://support.microsoft.com/kb/821268 < BR>结果,谢谢,结果,克里斯
Hi,
i have a web service running in IIS.
A simple ConnectionTest() method just waits with Thread.Sleep for a second and then returns a string.
I've written a small test application, that starts a number of parallel threads. Each thread calls the web service method and then just outputs to the console.
Now i figured out, that if exactly 10 threads are concurrently calling the ws, each other thread startet during that time gets a WebException from the web service. As soon as one of the working threads finishes (and less than 10 threads are concurrently calling the ws method), a new one can successfully execute the ws method.
what irritates me is, that the WebException says: The request failed with HTTP status 403: Access Forbidden.
*) Why can i establish exactly 10 connections to the ws?
*) Can i change/where chan i change (on client, on server, which config file...) this setting?
*) May the WebException be caused by another problem, and may idea with to many concurrent connections is wrong?
It would be great, if anyone could help me, since i already spent hours on live search and google to solve this issue.
Thanks,
Christian
Christian,
Can you go over this documentation and tell us if this helps?
http://msdn.microsoft.com/en-us/library/ms998583.aspx#scalenetchapt17_topic14
http://support.microsoft.com/kb/821268
Thanks,
-Chris
这篇关于WebExcpetion由于并发事务太多?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!