595 questions
0
votes
2
answers
97
views
Is there a way to make AddUserSecrets take precedence over Configuration.AddAzureKeyVault?
For the life of me I cannot find much official information on the load order or precedence of configuration file load order.
I have a situation where I am provided configuration via AddAzureKeyVault ...
0
votes
0
answers
132
views
Remotely invoke User Policy Retrieval & Evaluation Cycle and other Configuration Manager Actions
I wrote a function that I use to invoke all of the Configuration Manager Actions on remote devices. I noticed that all of the configuration manager actions can be invoked in a similar manner except ...
0
votes
1
answer
401
views
Moving Applications in SCCM
new here but have been using the site a long time. I am trying to create a powershell script so i can automate the google chrome updates I do I am unable to get the application to create in the right ...
0
votes
1
answer
1k
views
How to setup and read appsettings when creating a project in Visual Code?
I started using Visual Code instead of VS- Unfortunately, I can't figure out how to setup appSettings.config and reference the key values using Configuration Manager.
This line throws a Nullreference ...
0
votes
0
answers
591
views
Automatic update of containers on ECS with configuration change
I am currently deploying some spring boot services to cloud on ECS containers. These containers use application.properties (some properties are common across services like cross cutting items).
When ...
0
votes
0
answers
51
views
How to configuring Reporting Server Database Configuration?
System.Data.SqlClient.SqlException (0x80131904): The file "C:\Program Files\Microsoft SQL Server\MSSQL16.MSSQLSERVER\MSSQL\DATA\ReportServer3.mdf" is compressed but does not reside in a read-...
-1
votes
1
answer
147
views
How to access ConfigurationManager during host program startup?
I'm setting up a Worker Service, and I need to pass a connection string to UseSqlServerStorage().
IHost host = Host.CreateDefaultBuilder(args)
.ConfigureServices(services =>
{
...
0
votes
1
answer
177
views
Using <cfgmgr32.h> in MFC - Error CR_ACCESS_DENIED
I am a really newbie programmer, and currently using <cfgmgr32.h>. I noticed several function I called keep on return CR_ACCESS_DENIED error back to me. I am unable to find the solution else ...
0
votes
0
answers
100
views
Custom SCCM / MECM / ConfigMgr PowerShell script issue
The objective of this PowerShell script is to accept a SCCM / ConfigMgr DP Group as input, & output into .csv file, the list of all unique package IDs distributed to it.
ISSUE: It returns empty ...
-1
votes
1
answer
1k
views
Use a const int with the config file in C#
I'm trying to make a variable in my app to be edited in the App.Config file. However I am getting a error saying: Cannot convert string to int.
Code snippet:
/* This is in the .cs file */
private ...
1
vote
4
answers
264
views
How do you get new configurations to stop on breakpoints in Visual Studio?
I am using VS 2019.
Debug and Release builds work as expected.
I've added 4 other configurations in order for developers on our team to quickly switch between all of our lower environments.
I am using ...
0
votes
0
answers
199
views
What is the best way to access configuration data in a .NET Core worker service/console app?
I have a series of .NET Core worker services (targeting .NET 6). I am accessing configuration data from appsettings.json through hostcontext and that works fine:
public static async Task Main(string[] ...
-2
votes
2
answers
2k
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
116
views
Is there a way to get whole section group in .Net 6.0 Configuration using IConfiguration interface
Is there a way to access the whole section Group in .Net 6.0 Configuration from custom json file?
There's a custom json injected into configuration on startup using AddJsonFile() method.
When ...
0
votes
0
answers
220
views
Weird Access is is denied error when change Platform in ConfigurationManager
I am working with Visual Studio 2019 in Windows 11.
I create a new Solution which only has 1 Console App (.NET Framework) Project. The Framework is .NET Framework 4.7.2.
So the Project's name is ...
4
votes
2
answers
2k
views
remove configuration providers for integration tests in .NET 6
I currently have a web app on .NET 6 with integration tests using WebApplicationFactory.
Here is a simplified version of my Program.cs file:
var builder = WebApplication.CreateBuilder(args);
var ...
-2
votes
1
answer
248
views
ConfigurationManager is not found
I use the ConfigurationManager in my class. I add the using System.Configuration. The using is grey and the ConfigurationManager unknown. Why my .NET Core 3.1 project don't know System.Configuration....
0
votes
1
answer
838
views
How to use JSON Object itself instead of file path in ConfigurationBuilder?
I am gettin the json file stored as ConfigMap in K8s cluster. So I do not have the path as required in ConfigurationBuilder class in C#. Is there a way to build configuration from JSON object itself ...
0
votes
1
answer
373
views
C# check if handler is present in Web.Config
In my Web.Config file I have the following:
<system.webServer>
<handlers>
<add name="HANDLERNAME" verb="*" path="PATH.axd" type="HANDLERTYPE&...
0
votes
0
answers
327
views
Free Ansible / Puppet / Chef alternative
This is a question about your opinion on a script I wrote.
At my workplace I wrote a bash-script to execute commands on Linux-Systems (redhat). Since we got Ansible and Puppet nobody was interessted ...
0
votes
1
answer
733
views
SCCM Powershell edit TaskSequence settings using Set-CMTaskSequence
Trying to change what OS my TS supports in order to hide/show it in Software Center.
Importing ConfigurationManager.psd1 module and according to documentation for Set-CMTaskSequence I should be able ...
3
votes
0
answers
1k
views
How to debug static classes in Visual Studio?
Edit: original question:
This piece of C# code is not working correctly:
using System.Configuration;
...
public string GetConfiguration(string key)
{
String value;
var ...
3
votes
2
answers
370
views
.NET 6 C# configuration section variation
I am building a console app using .NET 6.
To load the settings I am using the Options Pattern and I want to create json config file with a collection of objects that has variations in one of its ...
1
vote
1
answer
794
views
In Azure function V1, how can I retrieve settings.json Values using ConfigurationManager?
One of my clients wants to migrate an old .NET Framework 4.5.2 console app to an Azure function.
Sadly, this console app references a class library developed in .NET Framework 4.5.2 and they don't ...
3
votes
1
answer
2k
views
ASP.NET IConfiguration, how to iterate or enumerate Providers
I am trying to write a test to verify that X providers are loaded in a certain scenario.
I can resolve the IConfiguration object, how can I tell how many IConfigurationProviders are in it?
In my ...