3,108 questions
0
votes
1
answer
75
views
How to use App.Config codebase tag with .NET assembly relative path?
My solution has the following structure:
TypeLoadApp
|_TypeLoadApp.sln
|_ClassLibrary1.dll (is copied via xcopy post-build event of ClassLibrary1.csproj)
|
|_ClassLibrary1 (netstandard2.0 class ...
0
votes
1
answer
121
views
How to match app.config version numbers to packages.config
I've had this several times now with different packages (Latest was System.ValueTuple) installed using the nuget package manager in Visual Studio.
After doing some upgrading of various packages I find ...
0
votes
0
answers
27
views
CreateDomain not probing for assemblies in ApplicationBase/PrivateBinPath as I would have expected
At some point in an AssemblyResolve handler I have tried to load assemblies coming with complex app.config scheme in a separate domain to let this domain dynamically solve assemblyBinding found in the ...
0
votes
1
answer
46
views
Received error Salaros.Configuration.ConfigParserException: 'This key value pair is orphan, ....."
I'm trying to make a program the saves value to ini file. Already imported Salaros.configparser, declare path with string and try to save some value after some dropdowm value with yes and no.
I follow ...
0
votes
1
answer
58
views
Debug target doesn't switch when changing configuration
I have a .NET Framework WPF project (Tested on both 4.6.1 and 4.8) with two configurations, that have the AssemblyName property assigned
<PropertyGroup Condition=" '$(Configuration)|$(...
0
votes
0
answers
60
views
Setting app config as a string variable instead of a config file
For my console app I have stored app.config in custom path for now
AppDomain.CurrentDomain.SetData("APP_CONFIG_FILE", "c:\path to config file");
ConfigurationManager.RefreshSection(...
-1
votes
1
answer
262
views
What would be the best approach for encrypting connection strings in app.config file? [closed]
My aim is to create a WPF application that will be used on different PCs and would have an app.config file with a skeleton of connection strings like this:
<connectionStrings>
<add name=&...
0
votes
0
answers
48
views
How to change custom nested configuration App.Config from code?
I used solution from this topic How to have custom nested configuration App.Config nodes and section. But I need a possibility to change values in custom section's properties from code. Now I have &...
1
vote
0
answers
253
views
Set & use variable name in app service configuration that doesn't exist in web.config
Using a .NET Framework 4.8 as an API application for a website.
//web config
<add key="id" value="123" />
//code inside main project solution, this works
var Id = ...
0
votes
0
answers
230
views
GetLatest Value from AppConfig using terrafrom
My pipeline use few values with tf script and recently I moved all these values to Aws App Config But still few places have references within tf for monitoring purposes. How can I read this value from ...
0
votes
0
answers
38
views
Custom Config Section Property C#
I would like to configure custom in my app.config. How do i achieve this? This is C# console applications.
can you help on this ?
<Configurations>
<ApiSettings>
<BaseUrl>...
0
votes
1
answer
2k
views
Nlog configuration for .net 4.8 Console application to write to DB - No logs written
I have a C#.Net 4.8 Console Application where I am trying to use NLog for logging to a MSSQL database.
My application has the following:
private static Logger nLogger = LogManager.GetLogger("...
0
votes
1
answer
201
views
GetConnectionString using IHostBuilder
(using .NET 6.0)
I used these commands to set a connection string:
dotnet user-secrets init
dotnet user-secrets set ConnectionStrings:AppConfig "{myconnectionstring}"
but I can't figure ...
4
votes
1
answer
4k
views
Azure Function App AzureWebJobsStorage vs WEBSITE_CONTENTAZUREFILECONNECTIONSTRING
The Azure function app official documentation lists two app settings which seem identical to me.
AzureWebJobsStorage
The Azure Functions runtime uses this storage account connection string for normal ...
0
votes
0
answers
2k
views
Could not load file or assembly 'System.Memory, Version=4.0.1.1?
How to fix this error?
System.TypeInitializationException: The type initializer for 'ServiceStack.Text.JsConfig' threw an
exception. ---> System.IO.FileNotFoundException: Could ...
1
vote
0
answers
404
views
How to retrieve identifiers dynamically in AWS appConfig start configuration session?
Previously, I was able to retrieve data from appConfig by using the variables that were hardcoded in config.ts.
Here is part of the config.ts:
//Used for appConfig
export const APP_CONFIG_APP_NAME = '...
2
votes
0
answers
412
views
ConfigurationErrorsException: Unrecognized configuration section system.windows.forms.applicationconfigurationsection
I am trying to leverage the new High DPI support using .net 4.8 in a WinForms app and adding in the section below to the app.config causes a number of things to fail. AppSettings, new SQLConnection, ...
0
votes
0
answers
635
views
Encrypt credentials in App.config in Visual Studio 2019 using aspnet_regiis
encrypt credentials in App.config in Visual Studio 2019
I need to Encrypt API credentials in my App.config in c# console application. I'm using .Net framework 4.7.2. I'm using aspnet_regiis.exe ...
0
votes
1
answer
118
views
EnterpriseLibrary.Logging severity level setting in app.config
I'm maintaining a windows service that is written a long time ago and the first author has left the company way before I joint.
I want to reduce the eventlog records by leveling up the severity from ...
1
vote
2
answers
1k
views
How to add a list of specific object in a configuration file for a WorkerService
As far as what I understand:
WorkerService is the new way to define a Windows Service (app that run as as service).
By default, using the contextual menu on the project, the type of configuration ...
0
votes
1
answer
607
views
Reason to hardcode username and password in config files
Going through legacy apps written in multiple .NET framework languages (ASP.NET, VB, C#), I always find in their app.config or web.config connection strings with hardcoded and working username and ...
0
votes
1
answer
66
views
.NET Core multi-tier app: Where to store config json file and access it from different projects?
I have a .NET Core solution with 3 projects: MVC app, data access layer (class library that contains Entity Framework context and models) and business layer (class library). In the MVC project, there ...
0
votes
1
answer
41
views
MDriven: Method not found: Eco.Persistence.SyncVersion
We have a legacy solution that started at ECO times 10+ years ago. It contains one model project and one ecospace project, and also one WinForms project and one ASP.NET project.
We now need to make a ...
0
votes
1
answer
1k
views
System.Configuration.ConfigurationErrorsException thrown after I updated my project from standard2.0 to .net6.0
As said in title I have updated my project with "dotnet tool install -g upgrade-assistant". Now when I try to run the code i get an [exception](
(https://i.sstatic.net/rnOoA.png)
Here is ...
0
votes
0
answers
1k
views
.net App.config file: How to have a local development version?
So, I have a .net project with an App.config file that's supposed to be filled, amongst other things, with an API key.
As an example:
<?xml version="1.0" encoding="utf-8" ?>
&...