Adding a SQL Server connection string

Now that the SQL Server Database has been set up, we need to tell our application to use it instead of localDb while in production. We can easily do that by leveraging the ASP.NET Core default pattern for configuring application behavior across multiple environments.

To implement it within our project, we need to perform the following steps:

  1. Copy the existing connection string from the appsettings.json file to the appsettings.Development.json file so that we'll still be able to connect to the localDb instance when we run the project in debug/development mode. Then, replace the appsettings.json connection string with a new one, pointing to the new SQL Server instance so that the web app will connect there when deployed into production.
  2. Add the production domain URL to the External Providers management panels, so that they'll be able to authorize it for external logins using the OAuth2 protocol.
  3. Update the launchSettings.json file to ensure that the Production environment will be set whenever we publish our project.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.117.11.247