Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

things to absolutely check when deploying an MVC 2 web application?

I am going to deploy my first MVC web application to the internet.

As is the first app with this framework for me, I was wondering if I can collect some advices regarding what should be done to prevent troubles.

I am generic on the question and this is xpressely done to collect the most various answers.

Thanks!

UPDATE:

Thanks everybody for your answers. The question does not just regards the "deploy" scope but even more these scopes:

  • Security
  • Public Hosting
  • Application Management & Operations

In short, all the issue that need to be addressed from the initial deploy on.

like image 901
Lorenzo Avatar asked Sep 30 '10 23:09

Lorenzo


2 Answers

If you are going to deploy within the hour:

  1. Make sure the reference to System.Web.Mvc is marked as Copy Local=True in your project. It tends to default to False, and so will not be copied to your bin folder, causing the app to fail when deployed. Review any additional assemblies you may have added to the project for Copy Local=True.

  2. Make sure stack traces aren't shown to end users when an exception occurs in your code. Use the <customErrors> in web.config to specify your own error page(s).

  3. In your web.config, make sure that the connection strings will work on the server you'll be deploying to.

  4. Is your application writing to disk for any reason? Logging perhaps? Some hosting services will not let your app write to disk -- worth checking ahead of time.

  5. Deploy to a local folder, and sanity-check that published app. Are scripts, stylesheets, images loaded without glitches?

If you have a little bit more time on your hands:

  1. Review the code for security, XSS considerations: are inputs sanitized? Is user input encoded correctly when rendered in views?

  2. Review the data schema. This may be your last opportunity to modify an empty database. Once you deploy, you can only hope to be gently updating live data, trying to avoid harming existing data and dependencies in application logic.

  3. If you haven't already, make sure to set up a google analytics account. You're going to be curious about how your site is being used, and this is one of the best free tools available. Goog analytics, as well as search engine registrations will require you to place files with funky names in the root 'folder' of your domain name. Verify that your app can serve files from the root folder, or set up a controller+routing to handle those requests.

like image 51
Oren Trutner Avatar answered Sep 18 '22 12:09

Oren Trutner


No. 0: make sure the patch for the padding oracle vulnerability is applied, of course this doesn't just applies to asp.net MVC but any asp.net application.

like image 43
eglasius Avatar answered Sep 18 '22 12:09

eglasius