简体   繁体   English

应用服务计划实例中的 applicationHost.xdt

[英]applicationHost.xdt in App Service Plan instances

The Issue问题

I am currently in the process of integrating a pre-rendering service for SEO optimization, however we use an Azure App Service Plan to scale up or down when necessary.我目前正在集成用于 SEO 优化的预渲染服务,但是我们使用 Azure 应用服务计划在必要时进行扩展或缩减。

One of the steps for setting up the proper configuration requires placing an applicationHost.xdt file in the /site/ directory, which is one level above the /site/wwwroot directory where the application itself gets deployed to.设置正确配置的步骤之一需要在/site/目录中放置一个applicationHost.xdt文件,该目录比应用程序本身部署到的/site/wwwroot目录高一级。

What steps should I take in order to have the applicationHost.xdt file persist to new instances spawned by the scaling process?我应该采取哪些步骤才能让applicationHost.xdt文件持久化到由扩展过程产生的新实例?

Steps I have taken to solve the issue我为解决问题而采取的步骤

So far I have been Googling a lot, but haven't succeeded in finding a lot of documentation on using an applicationHost.xdt file in combination with an Azure App Service Plan.到目前为止,我一直在谷歌搜索,但没有成功找到大量关于将applicationHost.xdt文件与 Azure 应用服务计划结合使用的文档。

I am able to upload the file to an instance manually, however I have assumed that when we then scale up to more instances the manually uploaded file will not be present on the new instance(s).我可以手动将文件上传到实例,但是我假设当我们扩展到更多实例时,手动上传的文件将不会出现在新实例上。

Etcetera等等

  • We are using Prerender.io as pre-rendering service.我们使用Prerender.io作为预渲染服务。
  • Should there be an easier to set-up & similarly priced service available, we would be open to suggestions as we are in an exploratory phase regarding pre-rendering.如果有更易于设置且价格相似的服务可用,我们将乐于接受建议,因为我们正处于有关预渲染的探索阶段。

Suppose this won't be a problem, cause all files under azure app are shared between all your instances.假设这不会有问题,因为 azure app 下的所有文件都在您的所有实例之间共享。 You could check it in this Kudu wiki: Persisted files .你可以在这个 Kudu wiki: Persisted files 中检查它。 And in my test all instances will keep the file.在我的测试中,所有实例都会保留该文件。

About upload the applicationHost.xdt , you don't have to do it manually, there is a IIS Manager Site Extension to lets you very easily create XDT files.关于上传applicationHost.xdt ,您不必手动执行,有一个IIS Manager Site Extension 可以让您非常轻松地创建 XDT 文件。 And it will provide some sample XDT's for you.它会为您提供一些示例 XDT。

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

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