I will deploy my first MVC web application to the net.

Out of the box the very first application with this particular framework for me personally, I'm wondering basically can collect some advices regarding what ought to be done to avoid troubles.

I'm generic about the question which is xpressely completed to collect probably the most various solutions.



Thanks everyone for the solutions. The question doesn't just regards the "deploy" scope but much more these scopes:

  • Security
  • Public Hosting
  • Application Management &lifier Procedures

In a nutshell, all of the problem that should be addressed in the initial deploy on.

If you are planning to deploy inside the hour:

  1. Make certain the mention of the System.Web.Mvc is marked as Copy Local=True inside your project. It has a tendency to default to False, and thus won't be replicated for your bin folder, leading to the application to fail when used. Review any extra devices you might have put into the task for Copy Local=True.

  2. Make certain stack traces aren't proven to clients when the best happens inside your code. Make use of the <customErrors> in web.config to specify your personal error page(s).

  3. Inside your web.config, make certain the connection strings works about the server you will be implementing to.

  4. Is the application conntacting disk unconditionally? Logging possibly? Some hosting services won't let your application email disk -- worth checking in advance.

  5. Deploy to some local folder, and sanity-make sure that released application. Are scripts, stylesheets, images loaded without glitches?

For those who have a bit more time to deal with:

  1. Evaluate the code for security, XSS factors: are inputs disinfected? Is user input encoded properly when made in sights?

  2. Evaluate the data schema. This might be your last chance to change a clear database. When you deploy, you only hope to become lightly upgrading live data, attempting to avoid doing harm to existing data and dependencies in application logic.

  3. Should you haven't already, make certain to setup a google statistics account. You are likely to be interested in how your internet site is getting used, which is among the best free tools available. Goog statistics, in addition to internet search engine sign ups will need you to place files with funky names within the root 'folder' of the domain title. Verify that the application can serve files in the root folder, or setup a controller+routing to take care of individuals demands.

No. : make certain the patch for that padding oracle vulnerability is applied, obviously this does not just is applicable to asp.internet MVC but any asp.internet application.

If you're implementing your MVC site in your server with IIS 5.1 or 6:

  1. Make certain to include mapping for extension .* with executable road to aspnet_isapi.dll and verbs GET,Mind,Publish,DEBUG not essential in IIS 7.
  2. If you're adding your MVC application in root website, do one in the main website e.g. Default Site if on the Virtual Directory do one in Virtual Directory.
  3. Make certain all scripts and css includes finds the right path when used.

If you're implementing your MVC site inside a hosting that is shared, where you do not have an use of the IIS configurations.

  1. Make certain you've added the best httpHandlers inside your web.config to the url rewritting can map properly right pages.
  2. One other way would be to add custom Routing inside your MapRoutes. e.g. then add extension (.aspx) inside your Default maproute. (.aspx//). But I don't advice this.

Palermo, Bogard etc. 's book ASP.Internet MVC 2 for action, from Manning is loaded with info on using MVC, and it has an instalment devoted to Deployment Techniques readily available for free at: http://github.com/jeffreypalermo/mvc2inaction/tree/master/manuscript/Chapter17/

I believe this can most likely have all you need.