Skip to main content
Filter by
Sorted by
Tagged with
3 votes
1 answer
107 views

I have to set a string array in the configuration when starting an ASP.NET Core web application. I get the string array from Azure Key Vault, and it works fine. It's only included in the code below ...
Anders Finn Jørgensen's user avatar
1 vote
1 answer
66 views

If I add an appsetting.{environment}.json to the project, normal it will automatically show up under the appsetting.json. For example I added one for environment "Test". But if I add one ...
JHJ's user avatar
  • 421
0 votes
1 answer
167 views

I'm working on an ASP.NET Core Web API project that used to work fine with IOptions<ApplicationSettings> to bind values from appsettings.json. But suddenly, appSettings.Value is returning null, ...
Kasturi's user avatar
  • 49
2 votes
1 answer
101 views

I have an int setting in appsettings.json that I read from C#: const int HardCodedDefault = 42; int settingValue = configuration.GetValue<int>("myKey", HardCodedDefault); ...
Medinoc's user avatar
  • 6,699
0 votes
0 answers
41 views

1. ObjectStorageFramework Extension: using ASobjectstorage.Interface; using ASobjectstorage.Models; using ASobjectstorage.Services; using Microsoft.Extensions.Configuration; using Microsoft.Extensions....
Jayachandran's user avatar
0 votes
1 answer
81 views

I used to hide my SQL database logs from Console/Debug by adding this line of code in the Program.cs: builder.Host.UseSerilog((builderContext, config) => { config.ReadFrom.Configuration(...
Mihai Socaciu's user avatar
0 votes
2 answers
179 views

I am in the process of migrating a large solution from .NET Framework 4.8 to .NET 9.0. I used .NET Upgrade Assistant to get started. I have a long way to go. All of the projects in the solution have ...
Trint's user avatar
  • 29
0 votes
2 answers
56 views

I have a command line app that uses .NET's dependency injection. It works fine when called in its directory, like C:\GitHub\MyProject\bin\Debug\net9.0>MyApp However, when I add it to the Path ...
Keith's user avatar
  • 157k
0 votes
1 answer
93 views

I have this configuration in an ASP.NET Core MVC app: "CustomSite": {     "Management": {         "Confined": {             "DefaultUILanguage": "en-GB&...
KeithViking's user avatar
0 votes
2 answers
136 views

I have this MagicSgtrings class that holds some constants which I'm using in my worker service. internal class MagicStrings { public const string HttpClientName = "X_HttpClient"; ... } ...
sTx's user avatar
  • 1,295
-1 votes
1 answer
79 views

i have a .net core application that uses event hub to consume & produce messages. it uses azure event hub & i configured sasl.username as "$ConnectionString" & sasl.password as &...
Prageeth Athulathmudali's user avatar
0 votes
3 answers
209 views

I have an Azure Function app that is configured with a "Information" logging filter for the MyCompany.IAM.AssetGovernance category: appsettings.json { "Logging": { "...
Shuzheng's user avatar
  • 14.6k
-1 votes
1 answer
350 views

I have an Azure Function app created locally using Python code, SQL Server change tracking that tracks any operation and triggers the SQL Server trigger for further process. app = func.FunctionApp() ...
sudip's user avatar
  • 1
0 votes
0 answers
74 views

Context: I have a .net 8 console app and I have a poco mapped to a section of the appsetting.json file. Code to deserialize the appsetting.json AppSettings section to the Poco: _settings = ...
boggy's user avatar
  • 4,077
0 votes
1 answer
72 views

I'm trying to load data from my appsettings file in an ASP.NET Core project. I've done it before, but now I can't get it to work. Furthermore, I'm trying to configure a section names Images and bind ...
SteinTech's user avatar
  • 4,144
0 votes
2 answers
598 views

I'm trying to get my Function App Servicebus Queue Trigger to be used with the parameters for queue name and connection string fetched from App configuration Service in Azure. My setup works for ...
H4p7ic's user avatar
  • 1,933
0 votes
0 answers
62 views

Is there a simple way to simulate Azure DevOps Replace Token task in GitLab CI/CD? I have the following secret (with many others) in appsettings.Testing.json that I need to replace in deploy stage: &...
Stefano Vacondio's user avatar
-1 votes
1 answer
137 views

I have a .NET 8 application that uses the Options pattern for configuration: https://learn.microsoft.com/en-us/aspnet/core/fundamentals/configuration/options?view=aspnetcore-8.0 In my appSettings file ...
g0np's user avatar
  • 349
0 votes
0 answers
20 views

I want to add a collection element to application configuration for certain environments like production or development, without overwriting already present collection elements added earlier through ...
DhyMik's user avatar
  • 393
0 votes
1 answer
62 views

I'm using .NET 6.0, my appsettings.json looks like this: { "Logging": { "LogLevel": { "Default": "Debug", "System":...
NeshaSerbia's user avatar
  • 2,562
2 votes
1 answer
66 views

I am building a .net minimal api with a lot of settings defined via appsettings.json. But how to use this setting classes in program.cs without the compiler generating the warning: ASP0000 Calling '...
user1911091's user avatar
  • 1,442
0 votes
1 answer
76 views

I'm using a FeatureManager to handle all my feature and some of them have a filter that will query my Db. It allows me to have something similar to Azure AppConfiguration but without spending anything....
Kaiwinta's user avatar
  • 309
0 votes
0 answers
66 views

I have appsettings storing different blob storage config. However, API occasionally will retrieve wrong blob storage config although it set to read the correct config. Here's my code - Startup.cs: ...
Chee Mun's user avatar
0 votes
1 answer
679 views

I understand what the default order of preference is for ASP.NET Core as mentioned here MS Docs | Default application configuration sources. However I would like to know if it is possible to change ...
Josh Wright's user avatar
0 votes
0 answers
105 views

I was tasked with upgrading the application version from .net core 2.0 to .net 8, since I'm doing it for the first time, I had to fix the code a bit. I noticed that in my company the connection string ...
Tomi's user avatar
  • 83
0 votes
1 answer
84 views

My appsettings.json file looks like this: { "sqlDatabase": { "name": "my-sql-db", "connectionString": "my-connection-string-for-my-sql-db&...
Sam's user avatar
  • 31k
0 votes
2 answers
84 views

In my .NET 6.0 / C# project, I have variable defined as { "Address": { "AddressLine1": "220 E. Yut Drive Suite 20", "AddressLine2": "...
Kavita Korgaonkar's user avatar
0 votes
1 answer
137 views

Program.cs of Blazor Client var builder = WebAssemblyHostBuilder.CreateDefault(args); builder.Configuration.AddJsonFile("appsettings.override.json", optional: false, reloadOnChange: false); ...
Sandip's user avatar
  • 384
-1 votes
1 answer
89 views

I have a bunch of different appsettings.json for a number of customers. However, the nLog-portion of these appsettings never changes, so I'd love to have one single json-File for the nLog-config. So I ...
RedSonja's user avatar
  • 340
0 votes
1 answer
380 views

I have two web apps deployed in a single Azure App Service instance: The first one has a home directory in "site\wwwroot". The second (api) has a home directory in "site\wwwroot\...
Mi1anovic's user avatar
  • 481
0 votes
1 answer
51 views

I have an ASP.NET Core 8 Web API project which contains the following setting files: appsettings.json appsettings.Local.json Following the instructions here, I also have a test project to run an in-...
osotorrio's user avatar
  • 1,242
0 votes
1 answer
82 views

I am working with Blazor Wasm on .NET 8. I am attempting to publish my app to the dev server and QA server for the first time. I am running into an issue where all my API calls are failing. Looking at ...
Jeremy D's user avatar
0 votes
0 answers
298 views

I've been using the default certificate from appSettings.json in a bunch of ASP.NET Core applications without any issues. "Kestrel": { "Certificates": { "Default": {...
Stephan Steiner's user avatar
1 vote
1 answer
2k views

I've been working in Java the past few years and starting back into .NET now. I'm struggling with getting my configs working as I'd like. I want to have this structure: appsettings.json: default ...
cobolstinks's user avatar
  • 7,201
0 votes
0 answers
158 views

I have a GitHub Actions workflow where I'm trying to substitute a connection string in the appsettings.json file before deploying to Kubernetes. However, the substitution step doesn't seem to be ...
PPB's user avatar
  • 121
0 votes
1 answer
267 views

I have tried numerous approaches, unsuccessfully, to get the connection string from appsettings.json. If this is not the best approach, what approach would work? Runtime error: System....
Jim's user avatar
  • 3
0 votes
1 answer
76 views

We have a DTAP (DEv, Test, Acc and Prod) environments, and when we do a release in the env's for node specific. (In Acc and PROD I have 3 nodes), while trying to create a release in Azure DevOps,the ...
Kitty's user avatar
  • 1
0 votes
1 answer
109 views

I have an ASP.NET Core app with following setting files: appsettings.json: ... "AzureOpenAI": { "EndPoint": "https://PRODUCTION.openai.azure.com/", "ApiKey&...
Imran Sh's user avatar
  • 1,806
0 votes
1 answer
489 views

I have my servicebustrigger connection string in the appsettings.json file. function app 8 version can't able to bind the value. Here is appsettings.json file approach 1: `{ "keyVault": &...
Meeran S's user avatar
0 votes
1 answer
62 views

I have a URL that I'd like to keep in appsettings.json : "MapLookupURL": "https://www.google.com/maps/search/?api=1&query=", I then retrieve this string via: window.open("...
McMurphy's user avatar
  • 1,483
0 votes
1 answer
45 views

I am trying to set up a logging system that adds log files to subfolders based on the year. However I've been unable to programmatically specify the year. I can hardcode it and it works fine, but I ...
L. Wallach's user avatar
0 votes
1 answer
83 views

I have basically followed two docs. This simple here just explains a very simple EF SqLite configuration where DbContext just hardcodes .UseSqlite with a local path to "local application data&...
rklec's user avatar
  • 349
0 votes
2 answers
485 views

I am adding some appsettings for a function app in YAML: steps: - download: current displayName: Download app artifact artifact: app - task: AzureAppServiceSettings@1 displayName: Azure App ...
James Blackburn's user avatar
0 votes
1 answer
274 views

I have a shared the library that needs some input from the config file, let's say a database helper class with IConfiguration injected in the constructor. I have an ASP.NET Core app that uses ...
Helic's user avatar
  • 949
0 votes
2 answers
286 views

I wanted to fetch a key from appsettings.json file to javascript code in .net 8 MVC project. i have added the key in appsetting.json in the below manner. appsettings.json { "RequestCountlimit&...
Madhu Patel's user avatar
2 votes
1 answer
494 views

I have a .net framework based Solution which is having Console Application as the Entry point along with multiple dependent Class Library projects. Console Application provides XML based configuration ...
Imran K's user avatar
  • 35
2 votes
1 answer
242 views

I have a function app, the app settings has several different PATs One of the function is an HTTP trigger, the request body will contain a specific name and that name should be used to retrieve the ...
nevermonday's user avatar
0 votes
1 answer
891 views

I am creating a Windows service in C# on .NET Core 8. This is my first attempt. The service works, but I now want to remove some hardcoded elements and move the settings into my appsettings.json file. ...
Mych's user avatar
  • 2,583
0 votes
1 answer
666 views

I have this local.settings.json in my local Azure function (Timer trigger) { "IsEncrypted": false, "Values": { "AzureWebJobsStorage": "", "...
María Casasola Calzadilla's user avatar
2 votes
1 answer
1k views

My question is about C# code reading secrets stored in KeyVault as configuration transparently. For example currently I have this appsettings.json: "AzureAd": { "Instance": &...
g.pickardou's user avatar
  • 36.5k

1
2 3 4 5
24