C
C#3y ago
danno8524

Get Environment Variables...

I am trying to get the connection string for my Azure Tables with the following code. TableServiceClient tableServiceClient = new TableServiceClient(Environment.GetEnvironmentVariable("StorageConnectionString")); This is returning a null value... My question is where should I be storing this connection string in a ASP.net core 6.0 app?
14 Replies
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
danno8524
danno8524OP3y ago
should my connection be in the service dependencies.json file? Here is what my solution layout looks like...
danno8524
danno8524OP3y ago
newbie... how do I access the console?
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
danno8524
danno8524OP3y ago
Where should my environment variables be placed?
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
danno8524
danno8524OP3y ago
I have them in serviceDependencies.local.json
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
danno8524
danno8524OP3y ago
found console... that command returns blank
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
danno8524
danno8524OP3y ago
sorry ...
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
danno8524
danno8524OP3y ago
Thanks for your time but I believe this is overkill. This is not a local machine issue.... I had this working fine in prior versions of .net....
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server