显示存根页,而ASP.NET应用程序启动 [英] Displaying a stub page while ASP.NET app starts

查看:167
本文介绍了显示存根页,而ASP.NET应用程序启动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以当ASP.NET应用还处于初始化的过程中显示特定的页面?

Can I display a specific page while ASP.NET application is still in the process of initialization?

我们已经有了一个巨大的ASP.NET应用程序约需30秒钟每个重新部署或AppDomain重新启动后完成它的的Application_Start()处理程序。在这段时间内表现出很好的自我重装暂时不可用页面将极大地提高第一用户的体验。

We've got a huge ASP.NET application that takes about 30 seconds to complete its Application_Start() handler after each redeploy or AppDomain restart. Showing a nice self-reloading "temporarily unavailable" page during that time will greatly improve the experience for first users.

我试图提取初始code到一个不同的线程,但它有很大的依赖性:在的HttpContext 服务器和其他几类都源自线程不可用。在code成为intervowen和INCOM prehendable,所以我在寻找一个更好的解决方案。也许一些IIS配置或扩展?

I tried to extract the initializer code into a different thread, but it has a lot of dependencies: the HttpContext, Server and several other classes are unavailable from derived threads. The code becomes intervowen and incomprehendable, so I'm looking for a better solution. Maybe some IIS configuration or extension?

推荐答案

好吧,既然IIS 7.5,您可以使用该应用程序的初始化(的 http://www.iis.net/downloads/microsoft/application-initialization ),将有可能要么显示启动画面,或只是pre-启动应用程序池。

Well, since IIS 7.5 you can use Application Initialization for that (http://www.iis.net/downloads/microsoft/application-initialization) that will make it possible to either show a "splash-Screen" or to just pre-start Application-Pools.

下面是IIS8的解释:的http://www.iis.net/learn/get-started/whats-new-in-iis-8/iis-80-application-initialization它将工作与IIS7.5相似,但你必须预先安装该模块。

Here is the explanation for IIS8: http://www.iis.net/learn/get-started/whats-new-in-iis-8/iis-80-application-initialization It will work similar with IIS7.5, but there you have to install the module beforehand.

在这里,从注释中采取的链接:http://blogs.msdn.com/b/abhisk/archive/2013/08/16/configuring-application-initialization.aspx

And here a link taken from the comments: http://blogs.msdn.com/b/abhisk/archive/2013/08/16/configuring-application-initialization.aspx

这篇关于显示存根页,而ASP.NET应用程序启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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