部署MVC3应用 [英] Deploying MVC3 application

查看:249
本文介绍了部署MVC3应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用VS2010,我部署我的MVC3应用程序,以我的网络服务器。我去项目 - >发布设置,并增加我的数据库连接,这就是它。我右键点击我的应用程序,并点击生成部署包,它生成的压缩文件。我把它复制到我的服务器并导入应用到IIS没有任何错误。但是,当我尝试加载它在浏览器中,我得到了可怕的:

I'm using VS2010 and I'm deploying my MVC3 app to my webserver. I went to Project->Publish settings and added my database connection and thats it. I right clicked on my application and clicked "Build deployment package" which generated a zip file. I copied it to my server and imported the application into IIS with no errors. But when I try to load it in a browser I get the dreaded :

无法加载文件或程序集System.Web.Helpers,版本= 1.0.0.0,文化=中性公钥= 31bf3856ad364e35或它的某一个依赖

Could not load file or assembly 'System.Web.Helpers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies

我把该行从web.config中的,然后我得到了:

I took that line out of web.config, then i got:

无法加载文件或程序集System.Web.WebPages,版本= 1.0.0.0,文化=中性公钥= 31bf3856ad364e35或它的某一个依赖

Could not load file or assembly 'System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies

我把该行从web.config中的,然后我得到了:

I took that line out of web.config, then i got:

无法加载文件或程序集Microsoft.Web.Infrastructure,版本= 1.0.0.0,文化=中性公钥= 31bf3856ad364e35或它的某一个依赖

Could not load file or assembly 'Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies

需要我继续吗?我究竟做错了,当我部署或建立我的应用程序加载到IIS因此所有依赖是缴费?

Need i continue? What am i doing wrong when I deploy or build my application to load it into IIS so all dependencies are avaiable?

.NET 4.0是IIS默认的应用程序池。

.NET 4.0 is the default app pool in IIS.

推荐答案

您可以通过右键单击项目中添加可部署的依赖关系,并选择添加部署的依赖关系。

You could add deployable dependencies by right-clicking project and selecting "Add Deployable Dependencies".

http://msdn.microsoft.com/en-us/library/ gg286946.aspx

请注意,它需要的Visual Studio 2010 Service Pack 1或更高版本的Visual Studio。

Note that it requires Visual Studio 2010 Service Pack 1 or later versions of Visual Studio.

这篇关于部署MVC3应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆