asp.net网站需要一段时间重新启动后加载 [英] asp.net site takes a while to load after restart

查看:122
本文介绍了asp.net网站需要一段时间重新启动后加载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个asp.net 2.0网站上的IIS 7.5上运行。
默认页面Page_Load事件需要一段时间,在IIS 7.5在重新启动后加载。在它说底部的等待......。结果
如果我击后的默认页面,无需重新启动IIS它加载速度非常快。我真的不能在这里发表的确切code。可能是什么原因呢?难道是重新编译整个网站?
如果是这样我怎么能prevent呢?

I have an asp.net 2.0 website running on IIS 7.5. The default page page_load event takes a while to load after a restart in iis 7.5. In the bottom it says "waiting for....".
If I hit the default page after without restarting iis it loads very quickly. I cant really post the exact code here. What could be the cause? Is it recompiling the whole website? If so how can I prevent this?

推荐答案

您可以通过增加应用程序池的生命周期的长短prevent它。在IIS,去应用程序池的文件夹,并选择适合您的网站的游泳池。点击右键,高级设置...,找到空闲超时分钟下过程模型,并增加以匹配使用你的网站的时间。 IE浏览器:如果您平均每小时一位访客,那么60分钟之后保持它活着

You can prevent it by increasing the length of the application pool's life cycle. In IIS, go the Application Pool's folder and select the pool for your site. Right click, Advanced Settings..., locate Idle Time-out Minutes under Process Model and increase the time to match use of your site. IE: if you average one visitor per hour, then 60 minutes will keep it alive.

第一次一个IIS复位后它会一直做,虽然至少一次。

The first time after an IIS Reset it will always do that at least once though.

你可以做的另一件事是获得更快的计算机,但你永远有更多的挂在第一时间比其他人。

Another thing you can do is get a faster computer, but you'll always have more hang the first time than others.

这篇关于asp.net网站需要一段时间重新启动后加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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