简体   繁体   English

应用程序池标识(.net Framework 4.0)提供响应超时异常,但网络服务(框架2.0)正常运行

[英]Application pool identity (.net framework 4.0) is giving response timeout exception but network service (frame work 2.0) is working OK

We changed framework for our web site from .net 2.0 to 4.0. 我们将网站的框架从.net 2.0更改为4.0。 We had application pool, running under 'network service' for .net 2.0. 我们有应用程序池,在.net 2.0的“网络服务”下运行。 we are migrating to application pool running under 'Application pool identity' with .net 4.0. 我们正在迁移到.net 4.0在“应用程序池标识”下运行的应用程序池。 Both application pools are in the same server with IIS 7.5. 这两个应用程序池与IIS 7.5位于同一服务器中。

After migration , we were getting frequent request time out exceptions. 迁移后,我们经常收到请求超时异常。 Adding the below sections in configuration fixed the issue. 在配置中添加以下部分可解决此问题。

<httpRuntime executionTimeout="600"/> 
<compilation debug="false"/>

Could you please explain the reason for this timeout exception? 您能否解释此超时异常的原因? Why this is now required in .net 4.0 'Application pool identity' ? 为什么现在在.net 4.0“应用程序池标识”中需要这样做? Why .NET 2.0 'network service' application pool was working without this segment? 为什么.NET 2.0“网络服务”应用程序池在没有此段的情况下可以正常工作?

Although we had and still exists the below section in configuration 尽管我们已经并且仍然存在以下配置部分

<compilation debug="true" strict="false" explicit="true"> 

we did not have 我们没有

<httpRuntime executionTimeout="600"/>

'network service' and 'Application pool identity' have completely different rights. “网络服务”和“应用程序池标识”具有完全不同的权利。 Are you sure you are not just hitting a security issue which is taking more time to resolve; 您确定您不仅遇到了需要花费更多时间解决的安全问题; you are getting an execution timeout - which means your code is taking way too long to execute. 您将获得执行超时-这意味着您的代码执行时间过长。 Others have commented on using debug code and that being slower - but this will be minute on a normal HTTP endpoint code. 其他人则对使用调试代码发表了评论,但它的速度较慢-但这在普通的HTTP终结点代码上只是几分钟。 I think the timeout might be occurring because of security negotiation. 我认为超时可能是由于安全协商而发生的。 Try changing your Application Pool identity back to Network Service in IIS Manager and see if your problem goes away. 尝试在IIS管理器中将应用程序池标识更改回网络服务,然后查看问题是否消失。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM