I developed an asp.net core API that saves images to the Azure blob storage account and inserts blob URI in cosmos DB.
In my local, it is working as expected. (I am reading storage account and cosmos Db connection strings from appsetting.json in my local).
I deployed my service in the Azure web app and this time I want to read those connections from the azure web app configuration(Settings --> Configuration Tab) instead of reading from appsettings.json. So I provided the configuration in azureweb app itself as mentioned in the screenshot.
But when I call my endpoint it is showing the following error (Saying my connection string is null)
System.ArgumentNullException: Value cannot be null. (Parameter 'connectionString')
at Azure.Storage.StorageConnectionString.Parse(String connectionString)
at Azure.Storage.Blobs.BlobServiceClient..ctor(String connectionString, BlobClientOptions options)
at Azure.Storage.Blobs.BlobServiceClient..ctor(String connectionString)
at BikesIsland.API.Startup.<>c__DisplayClass4_0.<ConfigureServices>b__0(IServiceProvider factory) in D:\a\BikesIsland\BikesIsland\BikesIsland.API\Startup.cs:line 64
Here is my appsetting.json structure
{
"AllowedHosts": "*",
"Serilog": {
"MinimumLevel": {
"Default": "Information",
"Override": {
"Microsoft": "Warning",
"System": "Warning"
}
}
},
"ApplicationInsights": {
"InstrumentationKey": ""
},
"CosmosDbSettings": {
"ConnectionString": "",
"DatabaseName": "bikes-island",
"BikeContainerName": "Bikes",
"EnquiryContainerName": "Enquiry",
"BikeReservationContainerName": "bike-reservation",
"BikePartitionKeyPath": "/id",
"EnquiryPartitionKeyPath": "/id",
"BikeReservationPartitionKeyPath": "/bikeId"
},
"BlobStorageSettings": {
"ConnectionString": "",
"ContainerName": "bikesimages"
},
"ServiceBusSettings": {
"ConnectionString": "",
"QueueName": "reservation"
}
}
Please help me to resolve the above error. As I am completely new to the azure web app.
Thanks in advance

