2013-02-04 100 views
0

我能够将网站发布到本地计算机文件夹,在那里我有bin,内容,脚本,视图,web,全局和packages文件夹。 当我使用filezilla将这些文件夹添加到我的Web服务器的根目录时,该网站不起作用。服务器确实支持asp.net 4,ii7。 这些步骤到底是什么。我寻找一些答案谷歌搜索,但没有一个帮助。我真的很感激,如果你能帮我弄明白这一点,谢谢我如何通过ftp部署MVC3网站到服务器

UPDATE问题修正:我的项目使用.net 4.5而不是4.0 ...这是在我部署我的网站的服务器上导致问题

+0

其中是您的index.html/default.htmldefault.asp/default.aspx位于文件夹中吗? – Satya

+0

in views/home/index etc – user1801879

回答

2

有以2个步骤部署应用程序:

1. If ASP.NET MVC 3.0 is not installed on the server you should deploy the following set of assemblies in the bin folder of your web 
application: 

Microsoft.Web.Infrastructure.dll 
System.Web.Helpers.dll 
System.Web.Mvc.dll 
System.Web.Razor.dll 
System.Web.WebPages.Deployment.dll 
System.Web.WebPages.dll 
System.Web.WebPages.Razor.dll 
you can set copy local to true but this is not available for all listed dll's or you can use some interesting future: right click on the project and select Add Deployable Dependencies with ASP.NET checkbox checked.A special folder named _bin_deployableAssemblies will be created with all necessary assemblies copied into this folder. When the project will be compiled all this assemblies will be copied into bin folder. 

2. Publish the application: in a local folder and copy it to your deployment server or directly via FTP. 
+0

不在2012版中,所有需要的程序集在发布时都已部署,并且添加可部署的依赖程序功能已不再适用?谢谢 – user1801879

+0

我能解决这个问题,问题是我使用.net 4.5,而我部署的服务器只支持4.0。将我的项目属性重新设置为4.0可以解决问题 – user1801879

0

标记在属性窗口中复制到Bin目录下的引用将确保该DLL被复制到/ bin目录。

相关问题