asp.net-mvc 有没有办法可以在 godaddy.com 共享虚拟主机上运行 ASP.NET MVC 项目?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/266205/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-07 22:50:20  来源:igfitidea点击:

Is there a way that I can run a ASP.NET MVC Project on godaddy.com shared web hosting?

asp.net-mvc

提问by mr mo

Is there a way that I can run a ASP.NET MVC Project on godaddy.com shared web hosting?

有没有办法可以在 godaddy.com 共享虚拟主机上运行 ASP.NET MVC 项目?

回答by Dan Esparza

As a developer who has deployed an MVC project on GoDaddy's ASP.NET shared hosting, I can tell you with certainty that you can do this, and it's quite easy.

作为在 GoDaddy 的 ASP.NET 共享托管上部署了 MVC 项目的开发人员,我可以肯定地告诉您,您可以做到这一点,而且非常容易。

  1. First, make sure that you've gotten a GoDaddy windows hosting plan (they sell both Linux and Windows plans).
  2. Next, make sure that you've set the hosting account to use ASP 2.0/3.0/3.5(this is enabled by default AFAIK -- but you need to make sure it's set to this if you've changed it in the past). You set this by clicking 'Manage Account' / Content / IIS Settings.
  3. Next, make sure your MVC project is set to copy the MVC .dll's to your bin directory. ASP.NET MVC (as of the beta) now puts these assemblies in the GAC by default. You'll need to change this for your project. Information on how to do this is on Phil Haack's website, here.
  4. Last, just publish your site and upload.
  1. 首先,确保您已获得 GoDaddy Windows 托管计划(他们销售 Linux 和 Windows 计划)。
  2. 接下来,确保您已将主机帐户设置为使用 ASP 2.0/3.0/3.5(AFAIK 默认启用此功能 - 但如果您过去更改过它,则需要确保将其设置为此)。您可以通过单击“管理帐户”/内容/IIS 设置来进行设置。
  3. 接下来,确保您的 MVC 项目设置为将 MVC .dll 复制到您的 bin 目录。 ASP.NET MVC(从测试版开始)现在默认将这些程序集放在 GAC 中。您需要为您的项目更改此设置。 有关如何执行此操作的信息,请访问 Phil Haack 的网站,请点击此处
  4. 最后,只需发布​​您的网站并上传即可。

It really should be that easy. Please leave a comment if you have any issues.

真的应该那么容易。如果您有任何问题,请发表评论。