本文介绍了在Silverlight Aynchronous Web服务器调用和最大的HTTP连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我读过,与Web服务器进行通信时的Silverlight 2.0强加设计异步模型。我还没有机会尝试使用Silverlight,但我相信,它使用一个线程池来管理一样.NET框架线程。


现在,由于某些浏览器,最值得注意的是Internet Explorer中,有一个可以在Web服务器上进行最多两个并发的HTTP连接的硬件codeD的限制,如果我做了一堆Silverlight的异步请求的,会发生什么?


Silverlight的是否绕过这个限制在Web浏览器,因为有可用线程,还是做异步请求排队,等待两个连接的一个变为可用打开多个HTTP连接?

I've read that Silverlight 2.0 imposes by design an asynchronous model when communicating with the web server. I haven't had a chance to experiment with Silverlight, but I assume that it uses a thread-pool to manage threads like in the .NET Framework.

Now, since some browsers, most notably Internet Explorer, have an hard-coded limit of maximum two concurrent HTTP connections that can be made on the web server, what happens if I make a bunch of asynchronous requests from Silverlight?

Does Silverlight bypass this limitation in the web browser and open as many HTTP connections as there are threads available, or do the asynchronous requests queue up and wait for one of the two connections to become available?

推荐答案

在IE浏览器(没有测试等)Silverlight是限制在一个时间2连接。

In IE (haven't tested others) Silverlight is restricted to 2 connections at a time.

在Silverlight的行为是根本不作要求。所以,如果你让5异步Web服务请求权成一排,第2会发生,其他三个不会。没有抛出异常,我已经看到...

The behavior in Silverlight is to simply not make the request. So if you make 5 Async web service requests right in a row, the first 2 will happen, the other three won't. No exception is thrown that i've seen...

提琴手是一个很大的帮助在这里:)

Fiddler is a big help here :)

这篇关于在Silverlight Aynchronous Web服务器调用和最大的HTTP连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-02 05:34