Quantcast
Channel: Reading settings from app.config or web.config in .NET - Stack Overflow
Browsing all 29 articles
Browse latest View live

Answer by Jason for Reading settings from app.config or web.config in .NET

I have been trying to find a fix for this same issue for a couple of days now. I was able to resolve this by adding a key within the appsettings tag in the web.config file. This should override the...

View Article


Answer by Custodio for Reading settings from app.config or web.config in .NET

I strongly recommend you to create a wrapper for this call. Something like a ConfigurationReaderService and use dependency injection to get this class. This way you will be able to isolate this...

View Article

Answer by Ram for Reading settings from app.config or web.config in .NET

For a sample app.config file like below:<?xml version="1.0" encoding="utf-8" ?><configuration><appSettings><add key="countoffiles" value="7" /><add key="logfilelocation"...

View Article

Answer by Wavare Santosh for Reading settings from app.config or web.config...

web.config is used with web applications. web.config by default has several configurations required for the web application. You can have a web.config for each folder under your web...

View Article

Answer by Pagey for Reading settings from app.config or web.config in .NET

I'm using this, and it works well for me:textBox1.Text = ConfigurationManager.AppSettings["Name"];

View Article


Answer by Shiva for Reading settings from app.config or web.config in .NET

Right click on your class library, and choose the "Add References" option from the Menu.And from the .NET tab, select System.Configuration. This would include the System.Configuration DLL file into...

View Article

Answer by Otávio Décio for Reading settings from app.config or web.config in...

You must add a reference to the System.Configuration assembly to the project.

View Article

Answer by womp for Reading settings from app.config or web.config in .NET

You'll need to add a reference to System.Configuration in your project's references folder. You should definitely be using the ConfigurationManager over the obsolete ConfigurationSettings.

View Article


Reading settings from app.config or web.config in .NET

I'm working on a C# class library that needs to be able to read settings from the web.config or app.config file (depending on whether the DLL is referenced from an ASP.NET web application or a Windows...

View Article

Browsing all 29 articles
Browse latest View live




<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>