如何热身在IIS 7.5 ASP.NET MVC应用程序? [英] How to warm up an ASP.NET MVC application on IIS 7.5?

查看:110
本文介绍了如何热身在IIS 7.5 ASP.NET MVC应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们想热身托管IIS 7.5服务器上的ASP.NET MVC应用程序。曾经是位于 http://forums.iis.net/t/1176740.aspx已被删除。

We would like to warm up an ASP.NET MVC application hosted on IIS 7.5 server. The warm up module that used to be available at http://forums.iis.net/t/1176740.aspx has been removed since sometime.

应用程序应预热每次IIS或ASP.NET辅助进程重新启动因任何原因。在热身期间,IIS应返回的HTTP状态code足见其热身状态或者它无法满足任何客户端。

The application should be warmed up everytime IIS or ASP.NET worker-process restarts for any reason. During the warm up period, IIS should return some HTTP status code signifying its warm up state or its inability to serve any clients.

就像创建,通过通过了Htt prequests在网站页面需要一个导航可执行文件是一个好主意?该可执行文件可以从IProcessHost preloadClient实施触发。是否可以配置IIS,以便将只接受从本地主机,一旦执行完毕后,就可以切换到所有客户端的请求 - 但该交换机不应该触发重新启动IIS(显然)

Would creating a executable that navigates through necessary pages in the site via HttpRequests be a good idea? The executable can be triggered from IProcessHostPreloadClient implementation. Is it possible to configure IIS so that it would only accept requests from localhost and once the executable is done, it can switch over to all clients - but that switch should not trigger an IIS restart (obviously).

是否可以使用Visual Studio 2010中 - Web性能测试热身的应用程序,而不是创建一个手动可执行文件?任何其他的选择吗?

Is it possible to use an Visual Studio 2010 - Web Performance Test to warm-up an application instead of creating an manual executable? Any other alternatives?

PS:该应用程序使用窗体身份验证,并使用会话 - 所以保持状态的cookie和其他饼干是非常重要的。

PS: The application uses Forms Authentication and uses sessions - so maintaining state cookie and other cookies is important.

更新1 - 我们在我们的应用程序中使用的.NET Framework 4.0和Entity Framework(数据库在前)。第一次打EF英孚的查询很慢。后面热身的原因是为了让这些首次出击的方式。我们已经使用编译最多的地方查询,我们已经实现了pre-编译的意见EF。型号和应用程序的大小是非常大的和复杂的。热身需要通过多个页面走路,确保编译和非编译EF查询得到的,至少一次的任何最终用户获得前访问应用程序。执行

UPDATE 1 - We are using .NET Framework 4.0 and Entity Framework (database first) in our application. The first time hits to EF queries are slow. The reason behind the warm up is to get these first time hits out of the way. We are already using compiled queries at most places and we have implemented pre-compiled views for EF. The size of the model and application is very large and complex. Warm up needs to walk through many pages to ensure that compiled and non-compiled EF queries get executed at-least once before any end user gets access to the application.

推荐答案

您可以看一看的<一个href=\"http://weblogs.asp.net/scottgu/archive/2009/09/15/auto-start-asp-net-applications-vs-2010-and-net-4-0-series.aspx\">following帖子为内置于IIS 7.5和ASP.NET 4.0中的自动启动功能。

You may take a look at the following post for the Auto-Start feature built into IIS 7.5 and ASP.NET 4.0.

这篇关于如何热身在IIS 7.5 ASP.NET MVC应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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