Reputation: 55
I've an ASP.NET MVC-2 Website, which is running perfect at my development machine(IIS-7, Win7).
When I copied my full website to remote server(Windows Hosting with .net 4.0), it displays Error-404.
Can you pls assist me to deploy it in remote host machine.
Upvotes: 3
Views: 2054
Reputation: 8972
Your question is a bit broad, but for a start might I suggest not manually copying the files over to the new environment (acceptance, production, QA...etc.) as a "deployment mechanism".
Ideally you want to setup a continuous build system which allows you to automatically build your project(s), apply the correct configuration, package and deploy it.
Troy Hunt wrote an excellent 5-part series in which he explains how to create such a setup using TeamCity, Subversion, MSBuild, Web.Config Transformations and Web Deploy.
You can check out the series 'You're deploying it wrong! TeamCity, Subversion & Web Deploy' here:
Of course the same setup is achievable using other software packages (e.g.: Team Foundation Server instead of TeamCity...etc.).
After you've deployed your site using Web Deploy (to a primary server), you can also use the Web Farm Framework to synchronize all of the servers in the farm. You want to avoid manual actions during deployment. Sure you can get all the steps (copying files, adjusting configuration files, synchronizing servers...etc.) correct, but in the long run mistakes are unavoidable.
Upvotes: 6