【问题标题】:Display a custom html page when publishing to IIS in MVC在 MVC 中发布到 IIS 时显示自定义 html 页面
【发布时间】:2015-12-11 09:21:38
【问题描述】:

我有一个 MVC5 应用程序,我想在将应用程序发布到 IIS 服务器时显示一个 html(或 htm)页面。所以,我尝试了不同的方法,如ASP.NET Web Deployment using Visual Studio: Deploying a Code Update 所示,使用 app_offline.htm。但是它们都不能在 MVC 中正常工作。有没有更好的方法来做到这一点?

【问题讨论】:

  • 请解释清楚,默认页面要使用routconfig吗?
  • 我不知道很抱歉,我只是想在将应用程序发布到 IIS 服务器时显示一个自定义页面,即“建设中”页面。
  • @Zaki 谢谢,我在创建此问题之前查看了该页面。但我正在寻找一种更好的方法,将智能集成到项目中。有什么想法吗?

标签: asp.net asp.net-mvc iis web-deployment app-offline.htm


【解决方案1】:

似乎还不支持 app_offline.html 自定义。见https://github.com/aspnet/Tooling/issues/530。 另外,还有类似的问题Custom app_offline.htm file during publish

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-05-02
    • 2021-02-02
    • 1970-01-01
    • 2017-03-20
    相关资源
    最近更新 更多