【问题标题】:How do you set the root page in an AppHarbor ASP.NET MVC website?如何在 AppHarbor ASP.NET MVC 网站中设置根页面?
【发布时间】:2015-10-15 04:35:00
【问题描述】:

我正在发布一个 ASP.NET Web 应用程序(这是 VS2013 的默认应用程序),它发布得很好。但是,当我访问我的应用程序时

http://someapp.apphb.com

我得到“欢迎使用 nginx”页面。但是http://someapp.apphb.com/Home 有效。

我需要更改 AppHarbor 上的设置,还是需要更改我的 WebApp?

【问题讨论】:

  • 你试过在 RouteConfig 中更改默认页面吗?
  • RouteConfig 不是只能在 MVC 中使用吗?
  • 我刚刚尝试了一个 MVC 应用程序,它正在做同样的事情。并且本地只是应用程序 URL localhost:54110 正确路由到 Home 控制器。

标签: asp.net-mvc appharbor


【解决方案1】:

您可以在 Web 配置文件中设置默认文档

<configuration>
   <system.webServer>
    <defaultDocument>
        <files>
            <add value="index.html" />
        </files>
    </defaultDocument>
   </system.webServer>
</configuration>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2010-09-28
    • 2011-05-10
    • 2017-05-28
    • 1970-01-01
    • 2015-12-12
    • 2011-01-18
    • 1970-01-01
    相关资源
    最近更新 更多