I have created a web application using ASP.NET MVC3 in Visual studio (no SQL Server). Now I want to deploy it and am looking for suggestions for the easiest possible way.
As of Now what i did is(rule 1-10) http://msdn.microsoft.com/en-us/library/dd410407(v=vs.90).aspx

- 5,020
- 9
- 53
- 71
-
[Could be that MVC2 is missing][1] [1]: http://stackoverflow.com/questions/2633504/is-asp-net-mvc2-included-in-net-4-0-framework – Feb 18 '12 at 05:58
5 Answers
1- bin folder in project's folder
2- Content folder
3- Scripts folder
4- Views folder
5- Global.asax
6- Web.config
7- copy from C:\Program Files\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\Assemblies directory
You should copy these files in "bin" directory before deploy website
Microsoft.CSharp.dll - reference
Microsoft.Web.Infrastructure.dll and .xml - copy
System.Web.Helpers.dll and .xml - reference
System.Web.Razor.dll and .xml - copy
System.Web.Routing.dll - reference
System.Web.WebPages.Deployment.dll and .xml - copy
System.Web.WebPages.dll - reference
System.Web.WebPages.Razor.dll and .xml - copy

- 1,737
- 2
- 26
- 37

- 558
- 2
- 12
- 30
When you run application in Visual Studio 2010 with .net framework 4 and MVC 3 installed on your machine the following folders are automatically created:
C:\Program Files\Microsoft ASP.NET\ASP.NET MVC 3
C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages.
These folders also contain an “Assemblies” folder.
ASP.NET MVC references following additional assemblies:
System.Web.Mvc
Microsoft.Web.Infrastructure
System.Web.Razor
System.Web.WebPages
System.Web.WebPages.Razor
To deploy your application on shared server with no support from your hosting company you can simply copy these DLL files and paste them to your BIN folder.
Make DLLs local while publishing:
If you don’t want to copy these files manually or don’t have permissions to copy and paste these files you can use this method.
The DLL files mentioned in the manual method can be included in the Bin folder when you publish your project to a production.
To include them to the Bin folder, go to your MVC application project and expand the ‘References’ node in project tree. Select above assemblies then right click and select ‘Properties’ and change ‘Local Copy’ to True as it is False by default. If Local Copy attribute is set to TRUE then selected DLL will be included in ‘Bin’ folder when you publish your project.

- 132
- 3
-
I worked with Last step (suggested by you) i.e To include them to the Bin folder, g........ folder when you publish your project.But what to do now after doing this?? – RollerCosta Jan 03 '12 at 04:57
In addition to all these answers about copying the mvc dll's manually. Visual Studio 2010 (with SP1) has the abiltity to do this for you.
- Rightclick your mvc web project
- Click on Add Deployable dependencies
- Choose one or more of the three options (asp.net mvc, asp.net webpages with razor syntax, sql server compact)
- Publish your application.
Visual studio will now auto deploy the correct references in your bin folder.

- 5,401
- 3
- 32
- 42
-
There is no option like Add Deployable dependencies when i right click on my app.(build deployment package is relevant ??) – RollerCosta Jan 03 '12 at 08:50
-
-
Let's not over-complicate things. The OP has no idea about deploying at all. If he will eventually have a problem with references, ok, but right now he hasn't got to that point. – John Saunders Jan 03 '12 at 09:01
-
christiaan I created a file by following some rule mentioned at http://msdn.microsoft.com/en-us/library/dd410407(v=vs.90).aspx – RollerCosta Jan 03 '12 at 09:17
-
@John i ma ready with my application(asp.net mvc3) and Now i need good web deployment strategy. – RollerCosta Jan 03 '12 at 09:20
Right click the project and choose "Publish".

- 160,644
- 26
- 247
- 397
-
1I published it with target(ftp) :: C:\Users\name\Documents\Visual Studio 2010\Projects. NOW what next??? – RollerCosta Jan 03 '12 at 05:03
-
Is that where you wanted to deploy it? I have the feeling you don't know anything about web servers. Is that correct? – John Saunders Jan 03 '12 at 05:05
very easy steps-
- Put your application in
C:\inetpub\wwwroot
(for that first configure IIS on your system). - Now,click on windows, and write run.
- A Textbox will appear, write 'inetmgr' inside it and click OK.
- Expand 'Administrator' on left side of screen by clicking on its arrow.
- Expand Sites and then Expand 'Default Web Site'.
- Right click your application and choose 'Add to Web Application'.
That's it. Icon next to your application will turn to a blue globe.

- 3,093
- 5
- 35
- 42

- 21
- 1