【问题标题】:Hosting an asp.net mvc site托管一个 asp.net mvc 站点
【发布时间】:2013-06-22 10:07:51
【问题描述】:

我有一个 asp,net MVC 4 项目。我选择了一家托管公司 www.somee.com 进行快速测试。我所做的是上传一个 zip 文件并将其解压缩。 当我打开网址时,我得到了错误。

   IIS 8.0 Detailed error

   HTTP Error 403.14 - Forbidden
   The Web server is configured to not list the contents of this directory.
   Most likely causes:

   A default document is not configured for the requested URL, and directory browsing is not enabled on the server.

   Things you can try:

   If you do not want to enable directory browsing, ensure that a default document is configured and that the file exists.
   Enable directory browsing using IIS Manager.
    Open IIS Manager.
    In the Features view, double-click Directory Browsing.
    On the Directory Browsing page, in the Actions pane, click Enable.
    Verify that the configuration/system.webServer/directoryBrowse@enabled attribute is set to true in the site or application configuration file.

    Detailed Error Information:
    Module     DirectoryListingModule
    Notification       ExecuteRequestHandler
    Handler    StaticFile
    Error Code     0x00000000
    Requested URL      http://xxxx.somee.com:80/
    Physical Path      d:\DZHosts\LocalUser\username\www.xxxx.somee.com
    Logon Method       Anonymous
    Logon User     Anonymous

这是否意味着我应该尝试本地 IIS 或服务器 IIS?但我无法控制服务器端。

【问题讨论】:

    标签: iis asp.net-mvc-4 hosting


    【解决方案1】:

    这是我要开始的地方

    1. 确认 MVC 是您的主机甚至提供的功能。您的网站 否则将无法正常工作,并且您可能会收到类似路由的错误 会失败
    2. 联系您的主机支持。我过去使用过的任何主机都有 对此类问题非常有帮助,他们有更多的访问权限 找出问题所在

    以下是一些信息,以防您需要 bin 部署:

    Can I bin deploy and MVC4 for .NET 4 where I have an MVC3 app running?

    http://haacked.com/archive/2011/05/25/bin-deploying-asp-net-mvc-3.aspx

    祝你好运

    【讨论】:

    • MVC 旨在支持 bin-deploy,因此不必安装在服务器上。
    • 您当然是正确的,如果主机不支持 MVC,那么希望您正在部署必要的 MVC dll。
    • 您对@CodeCaster 的回复是否意味着即使主机不直接支持MVC 也可以工作?谢谢。
    • 如果主机不支持 MVC,那么您必须在部署包中包含必要的 MVC dll。它仍然可以工作,但您必须特别确保包含必要的文件。我已经更新了我的答案,以包含一些可能对此有所帮助的链接。
    【解决方案2】:

    您是否在 IIS 中创建了网站?

    尝试按照此处的步骤操作:

    http://somee.com/DOKA/DoHelpTopics.aspx?docode=false&thnid=50

    【讨论】:

      猜你喜欢
      • 2019-11-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-01-04
      • 1970-01-01
      • 2016-10-31
      相关资源
      最近更新 更多