【问题标题】:How do I make my http://localhost:1234/ have a page instead of having to go to http://localhost:1234/index?如何让我的 http://localhost:1234/ 有一个页面,而不必去 http://localhost:1234/index?
【发布时间】:2019-05-18 11:46:03
【问题描述】:

我无法找到关于如何将 localhost url 作为我的基本页面的答案。因此,要访问我的页面,它必须是 localhost:1234/index 或我想避免的其他页面。

【问题讨论】:

  • 无论您使用什么网络服务器,您都需要查看Default DocumentDefault Page - 不是编程问题,而是您的网络服务器的配置问题之一
  • 我已将我的 index.aspx 设置为起始页,但它仍将我带到了那个位置。
  • 起始页不是默认页。听起来您正在查看 Visual Studio 调试属性页,而不是 Web 服务器配置设置
  • 我认为我们需要知道的远不止这些。根据您的情况,您可以使用@page "/",但这显然只有在您使用支持此语法的东西时才有效。
  • 如果其 IIS 将默认文档设置为 index.aspx 。

标签: c# asp.net web-applications


【解决方案1】:

为了使您的网络服务器可以通过localhost127.0.0.1访问,您需要将网络服务器绑定到端口80

这里是如何在 IIS 中检查和设置端口绑定

https://knowledge.digicert.com/solution/SO9987.html

【讨论】:

    猜你喜欢
    • 2015-01-30
    • 2011-03-03
    • 2010-12-28
    • 1970-01-01
    • 1970-01-01
    • 2015-11-20
    • 1970-01-01
    • 1970-01-01
    • 2020-03-24
    相关资源
    最近更新 更多