Azure / Commercial-Marketplace-SaaS-Accelerator

A reference example with sample code for developers interested publishing transactable, Software as a-Service offers in the Microsoft commercial marketplace.
MIT License
206 stars 304 forks source link

What are values used for "environment" in appsetting.json file? #757

Open marteltran opened 3 months ago

marteltran commented 3 months ago

Describe the bug Local env Configuration question: "What are values used for "environment" in appsetting.json file?"

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

Additional context Add any other context about the problem here.

santhoshb-msft commented 1 month ago

@marteltran when you do the deployment through our installation, the Appsetting files will be as is, however the appservice env variables will be set and used in the application.

marteltran commented 1 month ago

Hi Santos, The application works fine in Azure space with original Appsetting files. However, when we try to setup local development env, we need to config the "appsetting.Development.json" in which it has the "defaultconnection" property. We logged into Azure Keyvault to get this value, but surprise that it contains a string, such as "abcefghekxxxx", instead of "jdbc:sqlserver://xxxxx". That causes the application can not connect to the AOMSaaSDB database when run from local labtop.

The question is how we setup "defaultconnection" property in :appsetting.Development.json" to run the Accelerator from local laptop?

Thanks

On Thu, Oct 3, 2024 at 1:48 PM SANTHOSH B @.***> wrote:

@marteltran https://github.com/marteltran when you do the deployment through our installation, the Appsetting files will be as is, however the appservice env variables will be set and used in the application.

— Reply to this email directly, view it on GitHub https://github.com/Azure/Commercial-Marketplace-SaaS-Accelerator/issues/757#issuecomment-2392305453, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHBTHZQWEIZRJCR6HGJ5LDZZWUR5AVCNFSM6AAAAABNGVIDJWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOJSGMYDKNBVGM . You are receiving this because you were mentioned.Message ID: <Azure/Commercial-Marketplace-SaaS-Accelerator/issues/757/2392305453@ github.com>

fthorntonai commented 1 month ago

@marteltran Here's the reference for finding and connecting to the db.

https://learn.microsoft.com/en-us/azure/azure-sql/database/azure-sql-dotnet-quickstart?view=azuresql&tabs=visual-studio%2Cpasswordless%2Cservice-connector%2Cportal

Screenshot 2024-10-08 at 8 01 14 AM