部署后的Azure webrole的自动启动 [英] Automatic start of Azure webrole after deploy

查看:205
本文介绍了部署后的Azure webrole的自动启动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一个与测试页的蔚蓝webrole,并在该角色的服务。
发布的作用后它​​不仅在第一次使用自动启动。
因此,如果角色被关闭出于某种原因后第一次使用是相当缓慢。

A have an azure webrole with a test page and a service in that role. After publishing the role it doesn't start automatically, only at first use. So if the role is shut down for some reason the first usage after that is quite slow.

有没有一种方法,使webroles自动启动部署后正确的(无论是第一次,或者迁移后)?

Is there a way to make webroles start automatically right after they are deployed (either first time, or after a migration)?

推荐答案

检查出的 IIS 7.5 自动启动功能。请确保您设置osFamily =2为webrole以便它使用Windows 2008 R2操作系统。

Check out the auto start feature of IIS 7.5. Make sure you set osFamily="2" for the webrole so that it uses the Windows 2008 R2 OS.

编辑:我们仍然停留在osFamily =1,因技术原因,所以我们一直没能实现自动启动功能呢。然而,这里是将需要设置自动启动的步骤:

We're still stuck on osFamily="1" for technical reasons, so we haven't been able to implement auto start functionality yet. However, here are the steps that would be required to setup auto start:


  1. 创建一个实现的 IProcessHost preloadClient接口。曾经有一个默认的提供者称为应用程序热身模块,但它不提供下载了。可以使用净反射来查看Microsoft.ApplicationServer.Hosting.AutoStart.ApplicationServerAutoStartProvider.dll的内容作为一个示例实现。此DLL是包含在Windows的服务器的(不天青)的AppFabric。

  1. Create your own auto start provider that implements the IProcessHostPreloadClient interface. There used to be a default provider called the Application Warm-Up Module, but it's not available for download anymore. You can use .Net Reflector to view the contents of the Microsoft.ApplicationServer.Hosting.AutoStart.ApplicationServerAutoStartProvider.dll as an example implementation. This dll is included in Windows Server (not Azure) AppFabric.

下一步是在你的applicationHost.config指定正确的设置。在code的一些变化列入<一href=\"http://blogs.technet.com/b/meamcs/archive/2011/05/12/writing-an-iis-7-5-auto-start-provider.aspx\"相对=nofollow>此处可以在RoleEntryPoint类,这样当你的Azure角色激发了它被称为输入。

The next step is to specify the correct settings in your applicationHost.config. Some variation of the code listed here can be entered in your RoleEntryPoint class so that it's called when your Azure Role fires up.

请让社会知道,如果你成功地创建自己的自动启动供应商。在这一点上,还没有一个有关实现的 IProcessHost preloadClient

Please let the community know if you successfully create your own auto start provider. At this point, there isn't a lot of information about implementing IProcessHostPreloadClient on the internet.

这篇关于部署后的Azure webrole的自动启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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