All Questions
Tagged with web-config app-config
269
questions
0
votes
0
answers
21
views
How to use different connection strings and code depending on development or production branch in .NET framework?
The projects in question are built with .NET framework and use TFVC for version control.
I have two branches for each project, production and development. Every time something like an entity model or ...
2
votes
0
answers
221
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
1k
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 ...
0
votes
0
answers
368
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 ...
1
vote
1
answer
736
views
How to filter UrlReferrer from a whitelist in ASP.NET?
I need to create a single page that is going to be a part of an existing ASP.NET MVC website that is only open or accessible if came from allowed websites (Referrer). Our partners are planning
to load ...
2
votes
0
answers
2k
views
Transform App.Config and App.Release.Config Files In .net core
I am trying to port an old dotnet framekwork 4.8 web application to dotnet core 3.1. This project is one of four project in my solution:
dotnet core 3.1 (currently porting from dotnet framework 4.8 ...
0
votes
1
answer
36
views
Problem calling a second .config for keys in C#
I need a second .config to manage alot of keys. I tried using
<configSections>
<section name="apiConnection" type="CustomConfig.apiConnectionSection, CustomConfig&...
0
votes
1
answer
550
views
How do I implement WS-security in WCF client service (timestamp, usernametoken, signature)
I need to implement a WCF request with WS-Security. The header must to have this tags (Signature, UsernameToken and Timestamp) as shown below:
<soapenv:Header>
<wsse:Security>
<...
-1
votes
1
answer
957
views
Dynamically creating the config file by using tokenized file
In our developmet proccess we are using CI/CD tools of TFS.
To create config files for different machines we're using tools: XDT Transform and Replace Tokens
So by using those tools we transform ...
1
vote
0
answers
46
views
Read a connection string for web.config, app.config, & .NET Core json
We have a library we provide to customers in a variety of uses on a variety of platforms. We are porting it to .NET Core 3.
One of our methods allows them to pass in the name of a ConnectionString in ...
0
votes
0
answers
44
views
How does everyone manage developer environment config files?
We already use web.config/app.config xml transforms to for our .NET projects and are also using multiple appsettings.js files based on an environment variable for .NET CORE projects.
What I'm looking ...
0
votes
0
answers
3k
views
NLog config inside web.config or app.config ignored in version 4.5.11
Recently, we've updated some web and console application, to use a newer version of NLog, the latest 4.5.11.
Before, we've used a 4.4 version.
With this 4.4 version, we were able to set the NLog ...
1
vote
2
answers
4k
views
Using external config file for connection strings in multiple projects
I want to know if there is a better way to use connection strings in external files in my solution, since my solution has 8 separate projects, all using the same connection strings. According to this:
...
0
votes
1
answer
2k
views
App.config readability for large string values
I have various keys in appSettings, and each of them have a long string which contains values like these:
<add key="rightsTable" value="{LibraryNames='xxx',Folders='xxx',UserNames='xxx',...
0
votes
1
answer
267
views
C#/ASP.Net: app.settings instead of web.config
I have next scenario:
One Class Library (For example called Utilities) using one app.config
One General Site Web application using web.config and applications with web.config each one.
I need to ...