Questions tagged [app-config]
.NET application configuration files contain settings specific to an application.
3,096
questions
0
votes
1
answer
21
views
Update user settings from outside the application
I have a C# application (a VSTO office addin) running on clients' machines, and I need to make a setup project or any other EXE that can overwrite and update the user settings in the user.config files ...
0
votes
0
answers
18
views
AWS - AppConfig - Feature flags - CDK V1 - AppConfig Feature Flags Helper: Malformed 'Content' provided
I am trying to create an AWS AppConfig app, configuration profile, environment, hosted configuration, deployment strategy and the deployment constructs from CDK V1 (Node.js).
I am following @aws-...
0
votes
0
answers
32
views
How to fetch config file details for specific environment
I have a appSetting.json file which contains data segregatted by different test environments. I want to fetch data only of specific environment. I the below code I am getting null value in envConfig.
...
0
votes
0
answers
25
views
App.config file not getting read from non-startup project
In my solution I have two projects, one which is set to the startup project, the other not. I have added an App.config file to the start-up project.
The App.config file works in the project which is ...
0
votes
0
answers
55
views
How can I replace entire content of an element in a xml file using ansible?
I am trying to replace the entire content of a specific element in xml file using a playbook in windows machine. I'm able to add new content but the old contents in the file is not getting replaced.
...
0
votes
0
answers
17
views
AzurePageable breaks operation c#
I am having difficulties working with azure pageable.
I have these dificulties in several places.......
What happens is, if i interact with an AzurePageable and something goes wrong, the thread just ...
0
votes
0
answers
13
views
.NET: Add .dll app.config settings to parent's web.config?
I have a class library project "A" with some web references that are added to its app.config as following:
<?xml version="1.0" encoding="utf-8" ?>
<configuration&...
0
votes
0
answers
9
views
AssemblyBinding Redirect in app.config with linkedConfiguration-Element
I have several .net-ConsoleApplications with a lot of app.config-Files.
In each app.config I have the following section:
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-...
1
vote
1
answer
65
views
Nlog config escape colon
I have a NLog.config file with the following variable
<variables>
<variable name="LogsFilePath" value="${appsetting:item=LogsFolderPath:default=C:\Company\Logs}" >
&...
0
votes
1
answer
31
views
Does anyone know what should i use for validator in AWS AppConfig?
I am currentluy working on the AppConfig but don't know whether I should use a JSON schema validator or a lambda function as a validator. What is diffrenet between JSON schema and Lambda function? ...
1
vote
0
answers
26
views
Save the user input parameters in perl config file from xaml file
I have a application which was developed using perl and its UI is designed by xaml and c# files in visual studio. So now I had created a confilg file in perl where the source code files uses this ...
-2
votes
0
answers
17
views
Error while running ------>from flask import db (enter) -------> db.create_all() (enter) [duplicate]
Iwas attending an online tutorial and the my tutor guided me through the steps but I am unable to figure out what is the problem with the error
from flask import Flask, render_template
from ...
0
votes
0
answers
12
views
Configure target framework for an exe
Is it possible to configure the .NET target framework in a .exe.config?
Scenario: I want to migrate a .NET 3.5 exe to .NET 4.8 without recompiling it. I can just configure the supportedRuntime and the ...
-1
votes
1
answer
52
views
how to set Environment.GetFolderPath(Environment.SpecialFolder.Desktop) in settings visual studio in vb.net
I tried to create desktop settings path in Visual Studio but it doesn't work
is there any other solution?
Environment.GetFolderPath(Environment.SpecialFolder.Desktop) & \Google Drive
0
votes
0
answers
25
views
Get Rid of Basic App.config File In .Net 4.8 Application [duplicate]
I have the following basic .Net 4.8 application:
using System;
using System.Windows;
namespace BlackScreen
{
public partial class App : Application
{
[STAThread]
public static void Main()
...
0
votes
0
answers
29
views
How to autogenerate binding redirect for two C# EXE projects
Here's my simplified situation. I have a solution with two independent EXE projects, .NET 4.8.
ProjectA references a NuGet package PackageA which depends on PackageC version >=2.0.
ProjectB ...
1
vote
1
answer
31
views
Is it possible to make connection string dynamically change whenever a C# application is installed in another computer?
I just deployed the project I created and when I shared the setup file and ran the application in another computer the database did not work. I think I know what the problem is, but I do not have the ...
0
votes
0
answers
91
views
.NET Core service/daemon appsettings.json location (user folder or ProgramData)
I have a Windows service that runs as a specific user (agent installed on desktop machines) - I had originally stored/updated appsettings.json in Program Files alongside the binary, but this causes ...
0
votes
1
answer
63
views
.NET 5 C# App.config Section names beginning with config are reserved
I have application in .NET 5.0 and App.config and wanted to add custom config. In previous version of .NET that worked but in .NET 5.0 doesn't work. This is App.config:
<?xml version="1.0"...
0
votes
0
answers
23
views
WinForms, App.Config, ConnectionString, LocalDB, mdf file, |DataDirectory| results in "Invalid value for key 'attachdbfilename'"
I am working on a WinForms desktop app using c#, Dapper and the MyDB.mdf database file. On my machine the LocalDB server is installed. I am trying to access the database data but I always fail ...
0
votes
0
answers
43
views
Parsing error: babel.loadPartialConfigSync is not a function
Getting this error in React js. Tried to update the babel and change the babel.config file but didn't solved.
I am trying to run my react js application using npm start and getting this error.
0
votes
0
answers
35
views
DevExpress DLL's License Exception in visual studio windows application due to CAS Policy
Exception occurred creating type 'DevExpress.XtraEditors.CheckEdit, DevExpress.XtraEditors.v8.2, Version=8.2.8.0, Culture=neutral, PublicKeyToken=9b171c9fd64da1d1' System.TypeInitializationException: ...
0
votes
0
answers
101
views
What is the difference in App.config in standard .NET and .NET Core?
I was working on the "TraceSource Class" example provided by Microsoft at
https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.tracesource?view=net-6.0
When I create a standard ....
-3
votes
2
answers
269
views
Creating classical Properties.Settings in .Net 6.0 (Core) "Class Library" projects
Created a new "WPF Application" .NET 6.0 project
There creating classical Application Settings was easy in project->properties->Settings->"Create or open application settings&...
0
votes
1
answer
30
views
Connection Issues in Class Project
Im writing a class project in C# and I am having an issue with the connection string in the app.config file. (SQL Server Database)
using a unit test my connection string does not work in the following ...
0
votes
1
answer
38
views
In A Solution With Many Projects And App.config Files, Which Does ConfigurationManager.AppSettings Read?
The full question is in the title really. But here is a little background. I have a solution with a dozen projects in. Up until now, there were only two App.config files and I could read from each ...
-1
votes
1
answer
29
views
Read Settings From .NET Core V6 File C#
I used Settings.settings interface in VS2022 to add some user settings and a connection string. But I am unable to read the App Settings.
Reading the connection string works using
string sDBConn = ...
0
votes
1
answer
49
views
How can I access my command line args from all my class?
How can I pass a command line option to another class?
I have a program.cs that have arguments
static void Main(string[] args)
{
// One of args element is an output folder path
}
I'...
0
votes
0
answers
33
views
Root config for .NET framework apps
Like we have the root web.config for IIS deployed web apps, do we have a root app.config for console applications in .NET framework?
0
votes
0
answers
65
views
How to update an existing AWS AppConfig profile data?
Lets say I have a Hosted configuration version in my app config:
{
"configs": [
{
"A": 1,
"B": 2
},
{
"C": 3,
"D"...
0
votes
0
answers
36
views
How to customize my console application App.config?
I´m trying to customize my console application App.config with these informations:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
&...
0
votes
0
answers
29
views
App.config not integrated with Configuration class
I'm trying to get value from App.config file thought Configuration class
Crated new App.Config:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<appSettings&...
0
votes
1
answer
70
views
How to have custom nested configuration App.Config nodes and section
Here is my code and App.config.
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="ExchangeSetting" ...
0
votes
1
answer
54
views
Retrieving variables from one file to another
I am working with backstage to deploy an application. I have app configuration file, app-config.yaml, that has a variable version that I want to pass onto a typescript file, Root.tsc.
app:
title: ...
0
votes
0
answers
53
views
encrypt webconfig passwords - rule of thumb?
Quick question regarding encrypting passwords in web.config file.
So i've encrypted 3 passwords in web.config (thanks to)
How to decrypt a connectionString in a web.config using regiis_asp.net?
with ...
0
votes
0
answers
9
views
app.cofig file path post installing C# developed Application
I have build a Windows Application using C#, I have published the package and installed on some other system, I want to make some one time changes in app.config, where do I find the config file?
0
votes
1
answer
300
views
AWS AppConfig onboarding doubts
I need to change configuration values without requiring deployment of code changes. I had the following doubts related to using AWS AppConfig to confirm it is applicable for my use case.
What ...
0
votes
0
answers
13
views
Modern ways to Port hardcoded selection logic to configuration data
I have a Windows service which is serving for http request. The service is having hardcoded switch case which should choose different case based on the input passed to it. Now I need to enhance the ...
0
votes
0
answers
39
views
MSOLEDBSQL Error "Unable to find the requested .Net Framework Data Provider. It may not be installed." With DbProviderFactories
We are using c# .netFramework 4.5.1. MSOLEDBSQL is already installed.
Our data access lib. is using following statement.
var m_DbProviderFactory = DbProviderFactories.GetFactory("MSOLEDBSQL&...
0
votes
1
answer
22
views
multiple entries in app.config or how to resolve dependency version conflict
I am wondering is it possible to have multiple entries in app.config file?
I think I have 2 different libraries that each one is bringing in a different version of "Microsoft.Azure.Management....
0
votes
0
answers
43
views
Visual Studio cannot recognize that I added a new setting to app.config
I added a new setting called SQLServerNames to my app.config file that I will use for a combo box in my application but when I go to my code-behind to try to access it with Properties.Settings.Default,...
0
votes
1
answer
183
views
C# - Save app.config file to subfolder when building
I am trying to clean up the base directory of my WinForms app's build folder (built in .NET 6 using Visual Studio 2022). I have already moved the log4net config file to a Config subfolder and changed ...
0
votes
0
answers
125
views
C# App.Config with array of lists or arrays
Im trying to loading data from app.config:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="dataKeys" ...
0
votes
0
answers
118
views
Exception : System.InvalidOperationException: An unexpected error occurred in 'ClientConfigurationHost::Init'
I am trying to read the custom-defined configuration file from the library project that I have created in c#.
To read the configuration file, There is a ConfigManager i have created as below,
static ...
0
votes
0
answers
31
views
Winforms app shows this error when running: Root element is missing
I have a Winforms application developed in C# that works in a PC but it does not in other. In the other, the error "root element is missing" is shown according to this call stack:
I check ...
2
votes
1
answer
726
views
Unrecognized configuration section system.net (.NET 6/.NET Core)
I am trying to use the system.net section in app.config in .Net 6, but it fails:
System.Configuration.ConfigurationErrorsException: 'Configuration system failed to initialize'
Inner exception:
...
-3
votes
1
answer
39
views
Why doesn't my System.Configuration read values in user defined section
So I'm trying to pass connection strings into my WPF application, and with every How-To I check its a simple process. Go to App.config and input the respective elements.
But after doing that I try to ...
0
votes
0
answers
93
views
read a subsection and section values from app.config file
How to properly read values from section and subsecation, was looking here for similar approeaches but didn't found any, so here what I've
<configSections>
<sectionGroup name="...
0
votes
1
answer
90
views
C# app needs both SQL db and oracle db connection in one app.config file
My C# app already connects to a SQL db and have the below provider in app.config file
provider invariantName="System.Data.SqlClient"
type="System.Data.Entity.SqlServer....
0
votes
1
answer
31
views
Why Does An App.config For A Console App Contains {}
<!-- Server Parameters-->
<add key="DatabaseServerName" value="MySqlServer"/>
<!-- Data Access Parameters-->
<add key="DataAccessConnectionString" ...