locked
asp.net core 3.1 production checklist RRS feed

  • Question

  • User1874493748 posted

    Hi,

    What are some best practices / configuration checklists for deploying an asp.net core application to production? 

    Are there any things that should be disabled (that are not by default) in asp.net core projects for example?

    Friday, November 20, 2020 9:41 PM

Answers

All replies

  • User-821857111 posted

    You use the environment tag helper and some extension methods on the IApplicationBuilder (app.IsDevelopment() etc ) to optionally enable/disable features depending on the environment that the application is running in, so you should not have to do any further configuration when you publish and deploy.

    https://www.learnrazorpages.com/razor-pages/tag-helpers/environment-tag-helper

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, November 21, 2020 8:28 AM
  • User1874493748 posted

    Hi Thanks - it was more what are those items that should be enabled / disabled in production? Or any things i should check to prevent vulnerabilities.

    I know for example on .net framework it is recommended to remove the powered by headers, set x-content-type-options to nosniff etc. 

    I'm relatively new to development and have a side project mobile app with asp.net WebApi backend in .net framework + ms sql (currently running on IIS shared hosting)

    I'm now in the process of migrating that Api to .net core and then eventually to deploy to linux VPS.

    If there are any books / resources that could be recommended i'd be grateful as well

    Saturday, November 21, 2020 9:27 AM
  • User711641945 posted

    Hi SunnySSS,

    If there are any books / resources that could be recommended i'd be grateful as well

    For how to deploy to Linux,I think you need to read the following official docs to learn more:

    https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/linux-nginx?view=aspnetcore-5.0

    https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/linux-apache?view=aspnetcore-5.0

     Best Regards,

    Rena

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, November 25, 2020 6:15 AM