IIS7.5/MVC Limit number of Managed Threads
I'm trying to limit the number of managed threads permitted by an ASP.NET MVC application running under IIS7.5 on Windows Server 2008. I've attempted a number of different approaches but none seem to have worked as expected, I need to limit the number of threads as reported by
Threading.Thread.CurrentThread.ManagedThreadId
I also tried changing the ASP/behaviour/limits properties/threads per processor limit but I still get new threads with a different thread id.
I really need a limited number of threads (say 5-10) with the same thread id for each one every time it's used.
At the moment I have the following config file
<configuration>
<system.web>
<applicationPool maxConcurrentRequestsPerCPU="1" maxConcurrentThreadsPerCPU="1" requestQueueLimit="5000"/>
</system.web> </configuration>
pointed to by applicationhost.config
<applicationPools>
<add name="DefaultAppPool" ena开发者_运维知识库ble32BitAppOnWin64="true" CLRConfigFile="C:\Inetpub\wwwroot\SCRWeb\Data\apppool.config">
<processModel identityType="NetworkService" />
</add>
And yet I still see more than 1 thread id in my application as reported by Threading.Thread.CurrentThread.ManagedThreadId
Any ideas?
Thanks
精彩评论