app-config

Can I have a WCF call that hits the DB use the creds of the caller?

I have read a lot about impersonation, and I have tried a ton of tags in my config file. I have tried [OperationBehavior(Impersonation = ImpersonationOption.Required)] on my method that hits the database. None of it works. I get a wide variety of error messages depending on how my config is setup. Can anyone lay out for me what C# an...

What is the best way to get a configuration variable in PHP

Each server (Dev, QA, Prod) has a different IP address and URL. I would like to write code so that it can pull that information (the URL for the particular server I am running the code on) from a configuration file and store it in a variable. Preferably I would like to avoid having to read the information from a file on subsequent reque...

How To Implement a ConfigurationSection With a ConfigurationElementCollection

I am trying to implement a custom configuration section in a project and I keep running up against exceptions that I do not understand. I am hoping someone can fill in the blanks here. I have an XML config that looks like this: <?xml version="1.0" encoding="utf-8" ?> <configuration> <configSections> <section name="Service...

using external config file for a .NET windows service

Hi, I have an app.config file for a windows service which includes database connection strings and appsettings. when I install the windows service, it gets installed in "C:\program files\" folder and the settings are copied to a file called ".exe.config" in the same folder, which makes it difficult to change the settings after it is depl...

Dynamic webservice url in app.config not working

When I deploy my c# console application (with the .config.exe), everything in the console app (like database connection string) is seemingly working fine. However, when it makes a call to a webservice, it's using the url we use in development and not the production url in the app.config .. The service is set to dynamic.. Any ideas? ...

Config file content management for .net applications

I am looking for a proven approach for management of configuration file (app.config and web.config) and its contents for .NET applications. The objectives are: Keep the file's content encrypted to eliminate unwanted change by unauthorised way. Have a user interface to change tags, values for particular sections Manage which sections ar...

How can i use connection strings from class lib's App.config?

Hi there, I have a class library and my other projects are using it. And also i have some connection strings. i want to use them from just class lib's App.config file. But when i use ConfigurationManager in my class lib for reading connection strings, program looks my current project's App.config or Web.config files. How can i use con...

Can we change the settings of the Windows applications app.config?

Hi everyone, I have two app.config's in my application where i have written two connectionstrings in one config file and another two in other config file .Now in .cs file i have written this string Connect = ConfigurationManager.ConnectionStrings["con1"].ConnectionString.ToString(); string Connect = ConfigurationManager.ConnectionStrin...

Using constant objects in objective-c

I have a piece of code similar to this: //Foo.h OBJC_EXPORT MyObject *const myObj; // Foo.m MyObject *const myObj; @implementation Foo +(void) initialize { if (self = [Graph class]) { myObj = [Config get:@"Foo"]; // <--- ERROR! assignment of read-only variable 'Foo' // .... } } // .... @end This ...

Settings.settings and <legacyUnhandledExceptionPolicy enabled="1"/>

Hi, I have a C#/.NET Winforms application which has some settings stored using A '.settings' file. So the configuration is edited by right-clicking the project in "Solution Explorer" and selecting "Properties->Settings". However, I also need to be able to catch exceptions thrown by a SerialPort object inside the application. I found a ...

Editing a DLL's App.Config File from an EXE

I have a DLL project in VB.Net which has an App.Config file for settings but I also need to be able to open an EXE from the Start Menu in order to edit the same settings. If I create a project from the EXE, how can I bind the app.config to the DLL project? I've tried a number of things, including putting the EXE in the same solution as...

wcf client configuration

Hi, I have wcf client. It uses .NET 3.5. When I compile the client I get two files: client.exe and client.exe.config. The second file contains configuration for the wcf client. In my case I need to prevent the user sitting on the computer to see the urls and change some other parameters from the config file. So the requirements are...