无法配置IIS / Asp.NET以同时处理许多异步请求 [英] Unable to configure IIS/Asp.NET to process many asynchronous requests concurrently

查看:989
本文介绍了无法配置IIS / Asp.NET以同时处理许多异步请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图探讨异步ASP.NET请求。 Asp.NET应用程序由IIS 8托管。



客户端使用以下代码发出许多POST请求:

 私有静态异步任务<结果> IOAsync(Uri url,byte [] body)
{
var webClient = new WebClient();
webClient.Headers [Content-Type] =application / json;
return DeserializeFromBytes(await webClient.UploadDataTaskAsync(url,POST,body));
}

私人静态结果DeserializeFromBytes(byte [] bytes)
{
using(var jsonTextReader = new JsonTextReader(new StreamReader(new MemoryStream(bytes))) )
{
return new JsonSerializer()。Deserialize< Result>(jsonTextReader);
}
}

Asp.NET代码另一边是由VS 2013新项目向导创建的Asp.NET Web应用程序,在 HomeController 中略有修改:

  public class HomeController:Controller 
{
public ActionResult Index()
{
return View();
}

public ActionResult About()
{
ViewBag.Message =您的应用程序描述页面。

return View();
}

public ActionResult Contact()
{
ViewBag.Message =您的联系页面。

return View();
}

[System.Web.Mvc.HttpPost]
public async任务< JsonResult> SampleAPIAsync([FromBody] BaseContext c,Runner.BasicIOStrategy strategy)
{
return Json(await((IAsyncRunner)Runner.Create(Runner.IOStrategy)strategy。
}
}

SampleAPIAsync 是为了探索不同的方法来做数据库IO,其中只有一个是真正的异步,其余的在那里展示使用 Task.Run 和类似。



在我的特定情况下 IOAsync 方法是真正的异步:

  private async任务<结果> IOAsync(string sqlPauseDuration)
{
结果结果;
using(var conn = new SqlConnection(m_connectionString))
using(var cmd = CreateCommand(conn,sqlPauseDuration))
{
await conn.OpenAsync
using(var reader = await cmd.ExecuteReaderAsync())
{
await reader.ReadAsync();
result = new Result(reader.GetDateTime(0),reader.GetGuid(1));
}
}
返回结果;
}

private SqlCommand CreateCommand(SqlConnection conn,string sqlPauseDuration)
{
const string SQL =WAITFOR DELAY @Duration; SELECT GETDATE(),NEWID ;
var sqlCommand = new SqlCommand(SQL,conn){CommandTimeout = QueryTimeout};
sqlCommand.Parameters.Add(new SqlParameter(Duration,sqlPauseDuration));
return sqlCommand;
}

所以,你可以看到,一切都是异步的。我使用性能监视器检查线程计数:


  1. 客户端应用程序

  2. IIS工作进程(w3wp.exe)

  3. Sql Server进程

期望是为客户端和IIS工作进程看到一条相对平坦的线,并且在Sql Server中突然飙升。



这从不会发生。执行600个请求,最终转换为运行

  WAITFOR DELAY @Duration; SELECT GETDATE(),NEWID()

@Duration 20秒的sql服务器上不生成任何尖峰,需要5分钟(几乎完全)!从中我得出结论,请求没有被处理与足够的并发。如果我猜,我会说它同时处理(5 * 60)/ 20 = 15个请求。



注意:




  • 在进行测试之前,我有冷运行请求来预热IIS和Sql Server。因此,启动时间对方程没有贡献。

  • 当我使用相同的设置直接从客户端运行 IOAsync - 600个请求,20秒我看到预期的峰值Sql Server上的线程计数和所有的600个请求在不到21秒的时间内同时完成!





Googling问题提示我更改文件 C:\Windows \Microsoft.NET \Framework64\v4.0.30319\Aspnet.config c:\Windows \Microsoft.NET\Framework\v4.0.30319\Aspnet.config

 <?xml version =1.0encoding =UTF-8?& 
< configuration>
< runtime>
< legacyUnhandledExceptionPolicy enabled =false/>
< legacyImpersonationPolicy enabled =true/>
< alwaysFlowImpersonationPolicy enabled =false/>
< SymbolReadingPolicy enabled =1/>
< shadowCopyVerifyByTimestamp enabled =true/>
< / runtime>
< startup useLegacyV2RuntimeActivationPolicy =true/>
< system.web>
< applicationPool maxConcurrentRequestsPerCPU =5000maxConcurrentThreadsPerCPU =0requestQueueLimit =5000/>
< /system.web>
< / config>

请注意 /configuration/system.web/applicationPool 元素。这样做不会影响结果 - 仍然会同时显示15个请求。



我做错了什么?



编辑1



不确定是否相关,这是通过Fiddler观察到的典型HTTP请求和响应的样子:



请求

  POST http: // canws212:12345 / Home / SampleAPIAsync?strategy = Async HTTP / 1.1 
Content-Type:application / json
Host:canws212:12345
Content-Length:174
Expect :100-continue

{IsBlocking:false,Strategy:0,Server:CANWS212,Count:600,QueryTimeout:30,DurationSeconds:20 ,ConnectionTimeout:4,DBServer:localhost,DBName:tip_DFControl}

回应

  HTTP / 1.1 200 OK 
Cache-Control:private
Content-Type:application / json; charset = utf-8
服务器:Microsoft-IIS / 8.0
X-AspNetMvc版本:5.2
X-AspNet版本:4.0.30319
X-Powered- ASP.NET
Date:Thu,19 Nov 2015 17:37:15 GMT
Content-Length:83

{Id:16e8c3a2-fc95-446a-9459 -7a89f368e074,Timestamp:\ / Date(1447954635240)\ /}

EDIT 2



请在Asp.Net应用程序的web.config下找到



 <?xml version =1.0?> 
<! -
有关如何配置ASP.NET应用程序的更多信息,请访问
http://go.microsoft.com/fwlink/?LinkId=301880
- >
< configuration>
< appSettings>
< add key =webpages:Versionvalue =3.0.0.0/>
< add key =webpages:Enabledvalue =false/>
< add key =ClientValidationEnabledvalue =true/>
< add key =UnobtrusiveJavaScriptEnabledvalue =true/>
< / appSettings>
<! -
有关web.config更改的描述,请参见http://go.microsoft.com/fwlink/?LinkId=235367。

以下属性可以在< httpRuntime>标签。
< system.Web>
< httpRuntime targetFramework =4.5.2/>
< /system.Web>
- >
< system.web>
< compilation debug =truetargetFramework =4.5.2/>
< httpRuntime targetFramework =4.5/>
< /system.web>
< runtime>
< assemblyBinding xmlns =urn:schemas-microsoft-com:asm.v1>
< dependentAssembly>
< assemblyIdentity name =Newtonsoft.Jsonculture =neutralpublicKeyToken =30ad4fe6b2a6aeed/>
< bindingRedirect oldVersion =0.0.0.0-6.0.0.0newVersion =6.0.0.0/>
< / dependentAssembly>
< dependentAssembly>
< assemblyIdentity name =System.Web.OptimizationpublicKeyToken =31bf3856ad364e35/>
< bindingRedirect oldVersion =1.0.0.0-1.1.0.0newVersion =1.1.0.0/>
< / dependentAssembly>
< dependentAssembly>
< assemblyIdentity name =WebGreasepublicKeyToken =31bf3856ad364e35/>
< bindingRedirect oldVersion =0.0.0.0-1.5.2.14234newVersion =1.5.2.14234/>
< / dependentAssembly>
< dependentAssembly>
< assemblyIdentity name =System.Web.HelperspublicKeyToken =31bf3856ad364e35/>
< bindingRedirect oldVersion =1.0.0.0-3.0.0.0newVersion =3.0.0.0/>
< / dependentAssembly>
< dependentAssembly>
< assemblyIdentity name =System.Web.WebPagespublicKeyToken =31bf3856ad364e35/>
< bindingRedirect oldVersion =1.0.0.0-3.0.0.0newVersion =3.0.0.0/>
< / dependentAssembly>
< dependentAssembly>
< assemblyIdentity name =System.Web.MvcpublicKeyToken =31bf3856ad364e35/>
< bindingRedirect oldVersion =1.0.0.0-5.2.3.0newVersion =5.2.3.0/>
< / dependentAssembly>
< / assemblyBinding>
< / runtime>
< / config>

编辑3



关闭了web.config中的 sessionState

 < system.web& 
< compilation debug =truetargetFramework =4.5.2/>
< httpRuntime targetFramework =4.5/>
< sessionState mode =Off/>
< /system.web>

没有爱,结果相同。



编辑4



选中< limits> 元素,

  PS C:\> &C:\ Program Files \ IIS Express \appcmd.exe列表config -section:system.applicationHost / sites | sls limits |组

计数名称组
----- ---- -----
30< limits /> {< limits />,< limits />,< limits />,< limits /> ...}


PS C:\> ;

所以,我想我不是人为限制。 InetMgr报告以下内容:



< img src =https://i.stack.imgur.com/IFDWj.pngalt =enter image description here>



在另一方面,我使用IIS 8运行Windows 8,因此 http://weblogs.asp.net/owscott/windows-8-iis8-concurrent-requests-limit 应该适用。我尝试将限制更改为5000作为网站默认值和在我的网站,但它没有任何成果 - 相同的结果。



我做的是: p>


  1. 使用InetMgr GUI在相关网站上将限制更改为5000。

  2. iisreset

  3. 运行我的测试

相同的结果。



EDIT 5



我的JSON正文反序列化代码有一个错误 - 它使用了持续时间的默认值,而不是请求正文。所以,它不是20秒,但每个SQL语句5秒的持续时间。我使用的公式是错误的,应该是

  NumberOfConcurrentRequests = TotalRequests / NumberOfBatches 
= TotalRequests / OneRequestDuration)
=(TotalRequests / TotalTime)* OneRequestDuration
=(600/300)* 5
= 10

这与 http://weblogs.asp.net/owscott/windows-8-iis-8-concurrent-requests-limit



现在,我已部署到Windows Server 2012,我能够发出75个DB请求,每个10秒的长度,几乎完成10秒完成在一起。但不是76,从中我得出结论实际的并发限制是75.不是5000.仍在寻找线索。



编辑6 p>

按照 Stephen Cleary 的建议,我已将所有



没有asp.net我可以很容易地运行600 Task.Delay 为10秒,所有这些都在10秒内结束(稍微添加一点)。



asp.net的结果是一致的 - 75个请求是完全并发和异步的。在上面,图片是不同的。因此,80个请求花了16秒,100个请求花了20秒,200个花了30秒。对我来说很明显,请求被Asp.NET或IIS限制,就像之前的DB IO被执行一样。

解决方案

如果您在Windows 8而不是Server 2012上运行IIS 8.0,对某些事情有硬编码限制。您应该能够将其增加到默认值之上(Windows 8 Professional的默认限制为10,基本版的默认限制为3):网站的默认限制,还可以 Windows 8 / IIS 8并发请求限制



因此,在 ; system.applicationHost> 部分的applicationHost.config(通常位于C:\Windows \System32\inetsrv\config)中,您可以添加< limits> 元素:

 < sites& 
< site name =Default Web Siteid =1serverAutoStart =true>
< application path =/>
< virtualDirectory path =/physicalPath =C:\inetpub\wwwroot/>
< / application>
< bindings>
< binding protocol =httpbindingInformation =*:80:/>
< / bindings>
< / site>
< site name =Xid =2>
< application path =/applicationPool =X>
< virtualDirectory path =/physicalPath =C:\ Inetpub\wwwroot\X/>
< / application>
< bindings>
< binding protocol =httpbindingInformation =*:80:X/>
< / bindings>
< traceFailedRequestsLogging enabled =false/>
< limits maxConnections =40/>
< / site>
< siteDefaults>
< logFile logFormat =W3Cdirectory =%SystemDrive%\inetpub\logs\LogFiles/>
< traceFailedRequestsLogging directory =%SystemDrive%\inetpub\logs\FailedReqLogFiles/>
< / siteDefaults>
< applicationDefaults applicationPool =DefaultAppPool/>
< virtualDirectoryDe​​faults allowSubDirConfig =true/>
< / sites>

最大可用值为40。



使用IIS管理器选择网站,然后更改高级设置... - >限制 - >最大并发连接数中的值可能更安全。



如果您需要更多并发连接,一个选项是获得Windows Server 2012的试用版并在虚拟机(Hyper-V)中运行它。我建议获得对应于开发平台的服务器版本,例如。 Server 2012 R2与Windows 8.1一起使用,以便您在两者上找到相同的问题。


I am trying to explore the asynchronous ASP.NET requests. The Asp.NET application is hosted by IIS 8.

The client side is issuing many POST requests using the following code:

private static async Task<Result> IOAsync(Uri url, byte[] body)
{
    var webClient = new WebClient();
    webClient.Headers["Content-Type"] = "application/json";
    return DeserializeFromBytes(await webClient.UploadDataTaskAsync(url, "POST", body));
}

private static Result DeserializeFromBytes(byte[] bytes)
{
    using (var jsonTextReader = new JsonTextReader(new StreamReader(new MemoryStream(bytes))))
    {
        return new JsonSerializer().Deserialize<Result>(jsonTextReader);
    }
}

The Asp.NET code on the other side is the Asp.NET Web application created by the VS 2013 New Project Wizard with a slight modification in the HomeController:

public class HomeController : Controller
{
    public ActionResult Index()
    {
        return View();
    }

    public ActionResult About()
    {
        ViewBag.Message = "Your application description page.";

        return View();
    }

    public ActionResult Contact()
    {
        ViewBag.Message = "Your contact page.";

        return View();
    }

    [System.Web.Mvc.HttpPost]
    public async Task<JsonResult> SampleAPIAsync([FromBody] BaseContext c, Runner.BasicIOStrategy strategy)
    {
        return Json(await ((IAsyncRunner)Runner.Create((Runner.IOStrategy)strategy)).IOAsync(c));
    }
}

The SampleAPIAsync is meant to explore different approaches to do database IO, of which only one is truly asynchronous, the rest are there to demonstrate the usual misconceptions about "simulating" it using Task.Run and similar.

In my particular scenario the IOAsync method is truly asynchronous:

private async Task<Result> IOAsync(string sqlPauseDuration)
{
    Result result;
    using (var conn = new SqlConnection(m_connectionString))
    using (var cmd = CreateCommand(conn, sqlPauseDuration))
    {
        await conn.OpenAsync();
        using (var reader = await cmd.ExecuteReaderAsync())
        {
            await reader.ReadAsync();
            result = new Result(reader.GetDateTime(0), reader.GetGuid(1));
        }
    }
    return result;
}

private SqlCommand CreateCommand(SqlConnection conn, string sqlPauseDuration)
{
    const string SQL = "WAITFOR DELAY @Duration;SELECT GETDATE(),NEWID()";
    var sqlCommand = new SqlCommand(SQL, conn) { CommandTimeout = QueryTimeout };
    sqlCommand.Parameters.Add(new SqlParameter("Duration", sqlPauseDuration));
    return sqlCommand;
}

So, as you can see, everything is asynchronous. I am using the Performance Monitor to check the Thread Count on:

  1. The client application
  2. The IIS worker process (w3wp.exe)
  3. The Sql Server process

My expectation is to see a relatively flat line for the client and the IIS worker process and a sudden spike in the Sql Server.

This never happens. Doing 600 requests ultimately translating to running

WAITFOR DELAY @Duration;SELECT GETDATE(),NEWID()

on the sql server with the @Duration of 20 seconds does not generate any spikes and takes 5 minutes (almost exactly)! From which I conclude the requests are not being processed with the sufficient concurrency. If I am to guess, I would say it processes (5 * 60) / 20 = 15 requests concurrently.

Note, that:

  • Before doing the test I have "cold run" requests to warm up the IIS and the Sql Server. So, the startup time does not contribute to the equation.
  • When I run the IOAsync directly from the client using the same setup - 600 requests and 20 seconds I do see the expected spike of the Thread Count on the Sql Server and all of the 600 requests complete at the same time after less than 21 second!

From which I conclude the problem is on the Asp.NET/IIS side.

Googling the issue prompted me to change the files C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Aspnet.config and c:\Windows\Microsoft.NET\Framework\v4.0.30319\Aspnet.config like this:

<?xml version="1.0" encoding="UTF-8" ?>
<configuration>
    <runtime>
        <legacyUnhandledExceptionPolicy enabled="false" />
        <legacyImpersonationPolicy enabled="true"/>
        <alwaysFlowImpersonationPolicy enabled="false"/>
        <SymbolReadingPolicy enabled="1" />
        <shadowCopyVerifyByTimestamp enabled="true"/>
    </runtime>
    <startup useLegacyV2RuntimeActivationPolicy="true" />
    <system.web> 
        <applicationPool maxConcurrentRequestsPerCPU="5000" maxConcurrentThreadsPerCPU="0" requestQueueLimit="5000"/> 
    </system.web>
</configuration>

Notice the /configuration/system.web/applicationPool element. Doing so does not affect the outcome - still apparent 15 requests at the same time.

What am I doing wrong?

EDIT 1

Not sure if it is relevant, this is how a typical HTTP request and response look like when observed through Fiddler:

Request

POST http://canws212:12345/Home/SampleAPIAsync?strategy=Async HTTP/1.1
Content-Type: application/json
Host: canws212:12345
Content-Length: 174
Expect: 100-continue

{"IsBlocking":false,"Strategy":0,"Server":"CANWS212","Count":600,"QueryTimeout":30,"DurationSeconds":20,"ConnectionTimeout":4,"DBServer":"localhost","DBName":"tip_DFControl"}

Response

HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/json; charset=utf-8
Server: Microsoft-IIS/8.0
X-AspNetMvc-Version: 5.2
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Date: Thu, 19 Nov 2015 17:37:15 GMT
Content-Length: 83

{"Id":"16e8c3a2-fc95-446a-9459-7a89f368e074","Timestamp":"\/Date(1447954635240)\/"}

EDIT 2

Please, find below the web.config of the Asp.Net application:

<?xml version="1.0"?>
<!--
  For more information on how to configure your ASP.NET application, please visit
  http://go.microsoft.com/fwlink/?LinkId=301880
  -->
<configuration>
  <appSettings>
    <add key="webpages:Version" value="3.0.0.0"/>
    <add key="webpages:Enabled" value="false"/>
    <add key="ClientValidationEnabled" value="true"/>
    <add key="UnobtrusiveJavaScriptEnabled" value="true"/>
  </appSettings>
  <!--
    For a description of web.config changes see http://go.microsoft.com/fwlink/?LinkId=235367.

    The following attributes can be set on the <httpRuntime> tag.
      <system.Web>
        <httpRuntime targetFramework="4.5.2" />
      </system.Web>
  -->
  <system.web>
    <compilation debug="true" targetFramework="4.5.2"/>
    <httpRuntime targetFramework="4.5"/>
  </system.web>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="Newtonsoft.Json" culture="neutral" publicKeyToken="30ad4fe6b2a6aeed"/>
        <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0"/>
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Optimization" publicKeyToken="31bf3856ad364e35"/>
        <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="1.1.0.0"/>
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35"/>
        <bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234"/>
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35"/>
        <bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0"/>
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35"/>
        <bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0"/>
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35"/>
        <bindingRedirect oldVersion="1.0.0.0-5.2.3.0" newVersion="5.2.3.0"/>
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>

EDIT 3

Turned off the sessionState in the web.config:

<system.web>
  <compilation debug="true" targetFramework="4.5.2"/>
  <httpRuntime targetFramework="4.5"/>
  <sessionState mode="Off" />
</system.web>

No loving, same result.

EDIT 4

Checked the <limits> element, it is the default:

PS C:\> &"C:\Program Files\IIS Express\appcmd.exe" list config -section:system.applicationHost/sites |sls limits | group

Count Name                      Group
----- ----                      -----
   30       <limits />          {      <limits />,       <limits />,       <limits />,       <limits />...}


PS C:\>

So, I suppose I am not limiting it artificially. The InetMgr reports the following:

On the other hand I am running Windows 8 with IIS 8, so http://weblogs.asp.net/owscott/windows-8-iis-8-concurrent-requests-limit should apply. I tried to change the limit to 5000 both as site defaults and on my site, but it did not bear any fruits - same result.

What I did was:

  1. Change the limit to 5000 on the relevant site using InetMgr GUI.
  2. iisreset
  3. Run my test

Same result.

EDIT 5

My JSON body deserialization code has a bug - it used the default value for the duration, rather than the one in the request body. So, it was not 20 seconds, but 5 seconds duration per SQL statement. And the formula I used is wrong, it should be

NumberOfConcurrentRequests = TotalRequests / NumberOfBatches 
                           = TotalRequests / (TotalTime / OneRequestDuration)
                           = (TotalRequests / TotalTime) * OneRequestDuration
                           = (600 / 300) * 5
                           = 10

Which is consistent with http://weblogs.asp.net/owscott/windows-8-iis-8-concurrent-requests-limit

Now, I have deployed to a Windows Server 2012 and there I am able to issue 75 DB requests, each 10 seconds long which complete in almost exactly 10 seconds all together. But not 76, from which I conclude the actual concurrency limit is 75. Not 5000. Still looking for the clues.

EDIT 6

Following the suggestion of Stephen Cleary I have replaced all the DB IO with Task.Delay and stopped the Sql Server.

Without asp.net I can easy run 600 Task.Delay of 10 seconds and all of them end in 10 seconds (with a little tiny extra).

With asp.net the result is consistent - 75 requests are fully concurrent and asynchronous. Above that, the picture is different. So, 80 requests took 16 seconds, 100 requests took 20 seconds and 200 took 30 seconds. It is obvious to me that the requests are throttled either by Asp.NET or IIS, just as before when the DB IO was exercised.

解决方案

If you're running IIS 8.0 on Windows 8 rather than Server 2012, there are hard-coded limits on some things. You should be able to increase it above the default (the default limit would be 10 for Windows 8 Professional, 3 for Basic edition): Default Limits for Web Sites , also Windows 8 / IIS 8 Concurrent Requests Limit‌​.

So, in the <system.applicationHost> section of applicationHost.config (normally located in C:\Windows\System32\inetsrv\config) you can add a <limits> element as shown near the end of this:

<sites>
    <site name="Default Web Site" id="1" serverAutoStart="true">
        <application path="/">
            <virtualDirectory path="/" physicalPath="C:\inetpub\wwwroot" />
        </application>
        <bindings>
            <binding protocol="http" bindingInformation="*:80:" />
        </bindings>
    </site>
     <site name="X" id="2">
        <application path="/" applicationPool="X">
            <virtualDirectory path="/" physicalPath="C:\Inetpub\wwwroot\X" />
        </application>
        <bindings>
            <binding protocol="http" bindingInformation="*:80:X" />
        </bindings>
        <traceFailedRequestsLogging enabled="false" />
        <limits maxConnections="40" />
    </site>
    <siteDefaults>
        <logFile logFormat="W3C" directory="%SystemDrive%\inetpub\logs\LogFiles" />
        <traceFailedRequestsLogging directory="%SystemDrive%\inetpub\logs\FailedReqLogFiles" />
    </siteDefaults>
    <applicationDefaults applicationPool="DefaultAppPool" />
    <virtualDirectoryDefaults allowSubDirConfig="true" />
</sites>

With a maximum usable value of 40.

It could be safer to use IIS Manager to select the web site then change the value in "Advanced settings..."->"Limits"->"Maximum Concurrent Connections".

If you have a need for more concurrent connections, one option would be to get a trial version of Windows Server 2012 and run it in a virtual machine (Hyper-V). I suggest getting the server version which corresponds to the development platform, e.g. Server 2012 R2 to go with Windows 8.1, so that you find the same problems on both.

这篇关于无法配置IIS / Asp.NET以同时处理许多异步请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆