appsettings Questions

6

Solved

ASP.NET For each appSetting I use, I want to specify a value that will be returned if the specified key isn't found in the appSettings. I was about to create a class to manage this, but I'm thinki...

2

Solved

I have the following JSON in appsettings file , it has a connection string. { "Logging": { "LogLevel": { "Default": "Warning" } }, "ApplicationIn...
Latinalatinate asked 16/3, 2021 at 7:35

2

Solved

I am using IHttpClientFactory for sending requests and receiving HTTP responses from two external APIs using Net Core 2.2. I am looking for a good strategy to get a new access token using a refres...

6

Solved

i'm creating a console application using .NET Core 3.1 and i would like to have an appsettings json to load all environment, paths, variables,... at the beginning of the execution, and then get val...
Stain asked 2/12, 2020 at 14:54

3

Solved

Some I do quite a lot of is read integers from AppSettings. What's the best way to do this? Rather than do this every time: int page_size; if (int.TryParse( ConfigurationManager.AppSettings["PAG...
Jube asked 10/9, 2010 at 18:20

3

Solved

I am trying JetBrains Rider for my existing .NET Core project. In the project I have several appsettings.json overrides: appsettings.Development.json - for development appsettings.Test.json - for...
Shiprigged asked 8/8, 2017 at 11:59

7

Solved

I have created an mvc site and I'm posting a large amount of json form data (Content-Type:application/x-www-form-urlencoded) back to the mvc controller. When I do this, I receive a 500 response tha...
Intercellular asked 13/7, 2016 at 16:28

3

Solved

Attempting to retrieve secrets from KeyVault in a C# App Service. Local machine: Visual Studio > Tools > Options > Azure Service Authentication - authenticated Azure account Likely use a...
Triumvirate asked 2/7, 2021 at 10:57

1

Solved

I have a docker-compose with environment variables for the ConnectionString : services: nameservice: ... environment: ConnectionStrings__mysqlDatabase: "Server=db;Uid=root;Pwd=password;&qu...
Athos asked 7/2, 2022 at 15:11

3

I created a .net core worker service, had IConfiguration injected into it so I can read a property from appsettings.json but everytime I run the file the property comes up as null. However if I for...
Espadrille asked 9/1, 2022 at 12:21

3

Solved

I want my .Net Core 5 console application to select settings from the appropriate appsettings file based on the DOTNET_ENVIRONMENT environment variable. I'm testing this by running it in the Visual...
Antibaryon asked 11/11, 2021 at 15:38

1

Solved

I have .net core 5.0 application and try to get DateTime from appsettings.json appsettings.json: "TimeModel": { "RestartDuration": "27.10.2021 12:30:00" } Code: ser...
Biforked asked 27/10, 2021 at 10:16

2

Solved

In my ASP.NET Core MVC app, I have a class that inherits from AuthorizeAttribute and implements IAuthorizationFilter. namespace MyProject.Attributes { [AttributeUsage(AttributeTargets.Class | Att...

0

Pretty simple problem, I am not sure what I am missing. I have an environment secret: In this case, the "production" environment is available to all branches. I am simply trying to acces...
Xerophthalmia asked 31/8, 2021 at 21:28

2

Solved

Currently in Startup, I have my sql server string looking like this: public void ConfigureServices(IServiceCollection services) { var connection = @"Server=servername;Database=database;Trusted_Co...
Catalonia asked 28/11, 2016 at 23:6

1

In an aspnetcore 2.0 project I'm trying to setup a single, shared appsettings.json file throughout my web application and several of my xunit test projects. First off, everything works fine when ...
Splashy asked 17/4, 2018 at 21:55

4

Solved

In my Azure Function, I have specified an Environment Variable/App Setting for a database connection string. I can use the Environment Variable when I run the Function locally on my Azure Data Scie...

2

Solved

I have the following in Startup (asp.net core 2.2 proj): public Startup(IConfiguration configuration, IHostingEnvironment environment) { Configuration = configuration; Environment = environmen...
Hays asked 12/12, 2019 at 20:45

1

Solved

For user secret management, I use user secrets for the development stage and I want to use Azure key vault for release and staging. I have this configuration "ConnectionStrings": { &quot...

1

I have this application that uses the appsettings.json to store some configurations like API addresses, tokens, paths to save files, etc. We don't have DevOps, so for each change we do in the apps...

3

Solved

Here's the question first: Is this possible? I'm taking my inspiration from Joe Wrobel's work (a redux of the forgotten Codeplex project). Here, you do your work on creating your profile for the p...
Zuzana asked 18/10, 2009 at 0:56

3

Solved

I'm currently making the switch from .NET Framework to .NET Core. In the past, all of my application settings were in the Web.config file. When I added a new publish profile, I could right click an...

1

Solved

I have a Worker Service in Net Core 3.1 that reads Production settings from the appsettings.json file and, during development (using the "Debug" build configuration), overwrites appsettings.json se...
Aviation asked 18/6, 2020 at 15:15

3

Solved

I have a C# console program that prints an App.config value. Can I override this value from an environment variable? Example App.config: <appSettings> <add key="TestKey" value=...
Lammond asked 19/9, 2018 at 11:13

1

Solved

I'm new to using click once when publishing my applications, I've managed to get my application published. However, when I launch the application as a user I'm finding that the app settings file ha...
Daviddavida asked 15/1, 2021 at 14:25

© 2022 - 2024 — McMap. All rights reserved.