【问题标题】:ActionMailer.Net caused Azure to fail to initializeActionMailer.Net 导致 Azure 无法初始化
【发布时间】:2013-09-13 11:20:29
【问题描述】:

我有一个使用 ActionMailer.Net 的 MVC4 应用程序

此 Web 应用托管在 Azure 云服务中。在本地机器上的 Azure 模拟器中运行时一切正常。一旦我发布到 Azure,我的角色就​​无法初始化。

如果我查看该实例的 Intellitrace 错误,我可以看到它尝试加载 System.Web.MVC 并失败。进一步调查,它似乎可能正在尝试加载 MVC 3 库并且由于找不到该版本而失败。

有没有人遇到过这个问题并找到了解决方案?

【问题讨论】:

  • 看看你是否设置了System.Web.Mvc dll的“Copy Local true”。
  • 已配置为复制,MVC 站点的其余部分工作正常。

标签: c#-4.0 asp.net-mvc-4 azure azure-web-roles actionmailer.net


【解决方案1】:

您是否在 web.config 中将旧的 MVC 引用重定向到 4.0?

  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>

【讨论】:

【解决方案2】:

在 bitbucket 的 ActionMailer.Net 论坛上找到了解决方案:

https://bitbucket.org/swaj/actionmailer.net/issue/40/mvc3-dependancy

【讨论】:

    猜你喜欢
    • 2012-05-05
    • 2016-01-11
    • 2017-04-21
    • 2020-12-29
    • 2021-10-08
    • 2021-12-31
    • 1970-01-01
    • 1970-01-01
    • 2016-02-03
    相关资源
    最近更新 更多