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...
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...
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...
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...
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?
...
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...
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...
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...
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 ...
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 ...
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...
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...