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:
In short, all the issue that need to be addressed from the initial deploy on.
If you are going to deploy within the hour:
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.
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).
In your web.config, make sure that the connection strings will work on the server you'll be deploying to.
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.
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:
Review the code for security, XSS considerations: are inputs sanitized? Is user input encoded correctly when rendered in views?
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With