user1618825
user1618825

Reputation:

Steps Involved in Publishing Site to Production Environment

I just got this question triggered in interview. What are the neccessary steps involved to publish asp.net mvc4 application to production environment?

I just told this

  1. Changed to release mode and publish the site.
  2. look for connection variables in web.config
  3. look for application settings
  4. Then create an application in IIS
  5. create application cycle for it
  6. Then map source path to the application in IIS

But they are expecting a lot. Any ideas?

Upvotes: 0

Views: 399

Answers (1)

Chamila Chulatunga
Chamila Chulatunga

Reputation: 4914

Ideally before deploying to production, the site/application has been tested in a test environment (ideally a prod-like environment), so it should just be a case of promoting the deployment package from Prod-Like to Prod and applying the relevant config transforms/token substitutions for things like connection strings, service endpoints and credentials.

More holistically, some of the things I would look for:

  • Have the binaries been compiled with optimisations turned on, and PDB set to either 'none' or 'pdbonly' (i.e. not 'full')
  • Are all referenced assemblies and their full transitive tree going to be resolvable in the target server - i.e. anything not in the 'bin' directory of the deployment package must be resolvable through the GAC or dropped in separately into the 'bin' directory
  • The web.config should be set up with the appropriate values for the production environment, this includes things such as:
    • Correct prod connection strings
    • Debug set to 'false'
    • Correct prod WCF endpoints and configuration (bindings, certs, etc)
    • Any non-prod/dubug handlers and modules are removed
  • SSL certs correctly set up if https is being used
  • Application is created in IIS, with an appropriate app pool (Integrated pipeline, ASP.Net version 4) associated (ideally an app pool specific to the app, i.e. not shared with other apps/sites)
  • Ensure ASP.Net 4 has been correctly registered with IIS on the target server
  • Ensure the prod config has runAllManagedModulesForAllRequests set to 'true'
  • Ensure 'HTTP Redirection' is installed on the target server
  • Anything else depending on errors that come up

But really, all of this stuff should be getting flushed out in a pre-prod environment that mimics the prod set up, with anything missing being applied to both environments (prod and pre-prod) and then further testing carried out on the pre-prod environment, before finally rolling out to prod.

Upvotes: 1

Related Questions