Skip to main content
Filter by
Sorted by
Tagged with
3 votes
1 answer
106 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
0 votes
1 answer
2k views

I implemented custom configuration provider and it works fine in a web app. But I also need to use it inside azure functions. And it seems like it's impossible at the moment. IFunctionsHostBuilder ...
Roman Koliada's user avatar
0 votes
1 answer
556 views

I deployed an ASP.NET Core 7 application to Linux Web Application in Azure. When I access the URL I get an Application Error and the Logs shows: System.IO.FileNotFoundException: The configuration ...
Miguel Moura's user avatar
3 votes
2 answers
1k views

I have an ASP.NET Core web application and writing integration test to run the server in-memory using WebApplicationFactory (ie. https://learn.microsoft.com/en-us/aspnet/core/test/integration-tests) ...
balazska's user avatar
  • 1,001
1 vote
2 answers
4k views

I have an ASP.NET Core API that reads in config from a appsettings.json file. This is ran as a Windows service and can be installed/uninstalled. This means that updating will overwrite the appsettings....
woutervanrobays's user avatar
0 votes
0 answers
210 views

To use a Razor Class Library in a client project, one adds a <ProjectReference>. That references the library's pages and static assets, and automatically registers them - I don't need to ...
lonix's user avatar
  • 22.4k
0 votes
0 answers
123 views

I need to read a configuration value early in the CreateHostBuilder(string[] args) method as shown in code below. But my problem is, I couldn't figure out how to get to the Configuration object in ...
Alexu's user avatar
  • 1,215
-3 votes
1 answer
269 views

I want to create something like an installation page for a web application. For example, a page where the user can choose which database to use (Microsoft SQL Server, Postgres, etc.) in order to ...
alexsey bobrovitch's user avatar
6 votes
1 answer
8k views

I have the following in my asp.net core (5) application: var config = new ConfigurationBuilder() .AddJsonFile("appsettings.json") .Build(); Log.Logger = new LoggerConfiguration() ...
serge's user avatar
  • 15.4k
2 votes
2 answers
1k views

I have an Entity describing an organization, including its postal address. The Address is stored in a property (PostalAddress) and all properties of Organization is stored and flattened in the same ...
Lindstrøm's user avatar
0 votes
1 answer
119 views

We are just getting started to convert our ASP.Net based application to .Net CORE. One decision we need to make now is what configuration file format we should use. In our current ASP.Net based app, ...
Alexu's user avatar
  • 1,215
4 votes
2 answers
7k views

In my asp.net core 3.1 project I have setup a custom sql provider which is working great. In my Startup I want to load only the values from the SQLConfigurationProvider into a separate dictionary for ...
OjM's user avatar
  • 1,131
0 votes
2 answers
2k views

My website sessions timeout every ten seconds in the hosting environment, but works fine in my local development environment. I have been unable to change the timeout. services.AddSession(options =&...
Sai Aravind's user avatar
8 votes
3 answers
11k views

In my Azure I have ENVIRONMENT = Development, but my settings don't load. public static IConfiguration Configuration { get; } = new ConfigurationBuilder() .SetBasePath(Directory....
Jack Smithier's user avatar
0 votes
1 answer
1k views

How do I get the current domain in the Startup.cs ConfigureServices? Basically I need to change some settings depending on the domain. All settings are stored in appsettings.json appsettings.json { ...
Wreeecks's user avatar
  • 2,304
3 votes
2 answers
3k views

I am trying to load my app settings with ASP.NET Core Options pattern. The appsettings.json contains: { "TEst": "hello", "TEST_ABC": "2" } POCO class: public class AppSetting { public ...
Jerry Bian's user avatar
  • 4,278
1 vote
1 answer
5k views

"AppSettings": {"AzureAd": { "Instance": "https://login.microsoftonline.com/", "Domain": "abc.com", "TenantId": "90836560-70ab-4caa-9e10-7e80b43d8d5a" } } How to get the value of a "Instance" value ...
krity's user avatar
  • 59
3 votes
1 answer
1k views

I've read a bit of documentation regarding setting up environments for deployment of ASP.Net Core applications. These articles usually reference Development. Staging and Production by name, but never ...
RLH's user avatar
  • 15.8k
17 votes
2 answers
5k views

In my .NET Core project, I have below settings in Configure method: public void ConfigureServices(IServiceCollection services) { services .AddMvc() .SetCompatibilityVersion(...
harishr's user avatar
  • 18.1k
0 votes
1 answer
1k views

I would like to ask if there is a way to tell ASP.NET Core 2 to choose different connection strings. It is quite annoying to keep changing the connection string in the appsettings.json file every ...
AliAzra's user avatar
  • 939
39 votes
1 answer
48k views

Does ASP.NET Core implement IConfiguration access to config values? Most likely my question arose because I don't understand what exactly ASP.NET Core is. Well, I know it's a web framework, Not sure, ...
Vsevolod's user avatar
  • 687
5 votes
1 answer
6k views

I cannot get my Configuration.GetSection to return data in .Value. I think I implemented all the suggestions from this question, but still can't get it to work. appsettings.json { "...
Danielle Friend's user avatar
1 vote
2 answers
3k views

In my repository class, I have my Config object and looks like my connection string is under: Config > Providers > Microsoft.Configuration.Json.JsonConfigurationProvider > Data > ...
Sam's user avatar
  • 31k
0 votes
1 answer
886 views

I try to set up the "dev" and "prod" environments for my ASP.NET Core 2.0 application, but it does not work... Here is my config: The appsettings.json content (exactly the same as appsettings....
serge's user avatar
  • 15.4k
43 votes
5 answers
39k views

I´m writing my own extension method for ServiceCollection to registered the types of my module and I need to access the IConfiguration instance from the collection to register my Options. Extension ...
Jehof's user avatar
  • 35.7k