【问题标题】:Url Rewrite Provider on Azure Web AppAzure Web App 上的 URL 重写提供程序
【发布时间】:2016-09-16 23:28:06
【问题描述】:

我们使用来自URL Rewrite Extensibility Samples 的 DbProvider 来允许我们的重写规则使用 db 值。我正在尝试将此网站移动到 Azure Web 应用程序。部署到 Windows Azure Web 应用程序后,我收到此错误:

HTTP Error 500.50 - URL Rewrite Module Error.
System.IO.FileNotFoundException: Could not load file or assembly
 'Microsoft.Web.Iis.Rewrite.Providers, Version=7.1.761.0, Culture=neutral, PublicKeyToken=0545b0627da60a5f' 
or one of its dependencies. The system cannot find the file specified. 
File name: 'Microsoft.Web.Iis.Rewrite.Providers, Version=7.1.761.0, Culture=neutral, PublicKeyToken=0545b0627da60a5f'

由于我无法直接安装 URL 重写扩展性示例,我也不想安装,因此如何在 Azure Web 应用上安装必要的组件才能使其正常工作。

【问题讨论】:

  • 返回并编辑您的问题以正确格式化该错误转储。正如发布的那样,它是不可读的。

标签: asp.net azure url-rewriting azure-web-app-service url-rewrite-module


【解决方案1】:

您不能在 Web 应用上安装某些东西,除非它被打包为扩展(请参阅:https://www.siteextensions.net/)。我认为这些提供程序没有被打包,因此您必须自己创建一个包或寻找替代解决方案。

话虽如此,您可以尝试将程序集打包到您部署的 Web 应用程序中,看看它是否按预期工作(这不是我在这种确切情况下尝试过的东西)。

【讨论】:

  • 不幸的是,将 DLL 正确放入项目中是行不通的。我相信 IIS 在管道的早期需要它们。
【解决方案2】:

这可能很麻烦,但您可以尝试将 DLL 及其依赖项拉入您的 BIN 文件夹并进行部署。你没有很好的 UI 来管理,但值得一试。

【讨论】:

  • 我确实尝试过,但没有成功。我相信 IIS 在管道的早期需要它们。
猜你喜欢
  • 1970-01-01
  • 2014-07-17
  • 2022-01-27
  • 1970-01-01
  • 2014-08-18
  • 2015-08-22
  • 2016-12-29
  • 1970-01-01
  • 2023-03-15
相关资源
最近更新 更多