How do i deploy MVC3 website to server via ftp

£可爱£侵袭症+ 提交于 2019-12-12 03:55:35

问题


i was able to publish the website to local machine folder, where i've the bin, content, scripts, views, web, global, and packages folder. AFter i add these folders to the root of my web server using filezilla, the website does not work. server does support asp.net 4, ii7. What exactly are the steps. i looked for some answers googling, but none of it helped. I'd realy appreciate if you can help me figure this out, thanks

UPDATE Issue Fixed: My project was using .net 4.5 instead of 4.0...which was causing the issue on the server where I was deploying my website


回答1:


There are 2 steps in order to deploy your application:

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.



回答2:


Marking references as Copy to Bin Directory in the properties window will make sure that the DLL is copied to the /bin directory.



来源:https://stackoverflow.com/questions/14682477/how-do-i-deploy-mvc3-website-to-server-via-ftp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!