How do i deploy MVC3 website to server via ftp

2019-08-31 05:41发布

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

2条回答
不美不萌又怎样
2楼-- · 2019-08-31 06:00

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

查看更多
时光不老,我们不散
3楼-- · 2019-08-31 06:09

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.
查看更多
登录 后发表回答