app-config

Encrypting sections and-or settings in an App.config file that will be redistributed

Hi. I'm creating a regular windows application that will be distributed to several users on my department. I'll need to include some connectivity passwords on the App.config file, and I obviously don't want end-users to just fire up notepad and look at the passwords. Several articles point on how to encrypt/decrypt configuration sectio...

Application Configuration File Not Being Read When Application Called via ShellExecute

Hi, I have a .NET application that is launched via a Delphi program using ShellExecute. Unfortunately when launched in this manner, the application does not seem to be reading its app.config file correctly, as if the file did not exist. I have tried testing the application in other scenarios, e.g. calling from a shortcut with the the w...

.Net Configuration files confusion

We've got a somewhat complex project that the original developers split into multiple projects for organization purposes. What this means to me is that I've got an ASP.Net site that has a web.config and contains all sorts of good settings, and another project that compiles to a DLL that has it's own .config file, app.config. In the DLL...

Is there a better way to store a list of strings in an applications config file than using a StringCollection?

I have a list of filenames I need to store in my applications config file. The only collection that comes up in the initial combo box on the settings page is System.Collections.Specialized.StringCollection. Now initially I didn't query this as I converted this to a List<string> straight away. There was one piece of code I wasn't happy w...

Consume webservice from a .NET DLL - app.config problem

Hi, I'm building a DLL, let's call it mydll.dll, and in it I sometimes need to call methods from webservice, myservice. mydll.dll is built using C# and .NET 3.5. To consume myservice from mydll I've Added A Service in Visual Studio 2008, which is more or less the same as using svcutil.exe. Doing so creates a class I can create, and add...

Why is the EntLib Caching Application Block using the wrong configuration file

When I try and use code that makes use of the Enterprise Library Caching Block I get the following error: The "cachingConfiguration" section is not available in the supplied configuration source. The section is in my app.config file for that particular assembly though. If I copy the file into the unit test assembly that makes use of th...

Can I use / access the app.config from .net code, when called via COM

I have an existing set of .net libraries that I wish to call from Excel VBA (that part is working fine). These libraries rely on settings in the app.config. I know I can enter these settings in a excel.exe.config file (placed in the same directory as the excel.exe), but this doesn't really seem like a very manageable solution to me, as I...

ILMerge: How to configure the corresponding app.config

I'm just trying ILMerge to merge my application and the needed libraries into one executable. I'm using the command line just to do some testing. I took a sample project: ilmerge /out:ProgramMerged.exe Program.exe Lib1.dll Lib2.dll This seems to work as intended. But what if I had a Program.exe.config? Is it still applicable? Does a...

multiple app.config files

Ok I have two projects in my solution, one is a email facility that has an app.config file which states the SMTP Host and error email address etc... The other is a project that uses the email project, this also has its own app.cofig. I want to be able to edit both config files after the msi has installed but only the second config file a...

Web Reference Endpoint URL and configuration question (Asp.Net)?

I have a project ("The Project") that references an external web service. I am then referencing that project in an ASP.Net web application ("The Web Application"). When I reference "The Project" in "The Web Application" the app.config is not copied over, which isn't a problem. Does "The Project" take care of know what endpoint to use? Ca...

App.config only for my developer machine.

Can I create app.config or web.config file that applies only to my developer machine, as opposed to using the default configuration files that are checked into source control? ...

How to set relative paths in app.config file?

Hi, I am working on a project in which I have many text and xml files. I read those from my program at runtime. I have kept paths to those files in app.config file, but all the paths are absolute paths like "C:\my_project\help_files\rejectList.txt" . If I keep only "\help_files\rejectList.txt" path, program throws filenotfound excep...

Set app.config value to Environment.UserName

I have an Exception Handler that email our Help Desk software whenever there is an error. All properties for the Mailer are handled in app.config. One of which looks like this --> <add key="from" value="[email protected]"/> Is there a way to have the value set to Environment.Username + '@ourcompany.org. As a side note this ...

which one is primary config file for an application that written by WPF?

We write an application with WPF. When we build this project, 3 files is generate for us in addition to : > OurApplication.exe > OurApplication.exe.config their names are: > OurApplication.vshost.exe > OurApplication.vshost.exe.config > OurApplication.vshost.exe.manifest first, what are these files? secondly, which one of this conf...

Assemblies, Web.config and App.Config -- Building failover logic

How do I engineer failover logic properly if an Assembly (.dll) cannot find a web.config file? Background: I've got our website code nicely modularized into two different .dlls. For simplicity's sake, let's call them: website.dll commonengine.dll The website code and .aspx / .ascx files calls upon the commonengine library for all ...

WCF Different authentication method for each endpoint

I have a WCF service. My service has 2 endpoints each of which has a different contact. The service uses custom user name authentication (defined in the customUserNamePasswordValidatorType attribute of under ) The problem is that both endpoins will use the same anthentication method. Is there anyway I can define different anthenticatio...

securing connectionstring

What's the best method for securing connectionstring information in an app.config file for deployed winforms applications? reference ...

Setting Log file path in app.config

Hi, I have one requirement that i have to place the log file in the same directory of solution. That is my solution is placed in [drive]\work\Project1\solution file. But i have to create my log file to [drive]\work\Project1\Log\log.log. How it can be set in app.config file. please help me. thanks in advance... ...

Holding ConnectionString in app.config or properties.Resources of a C# project?

hi I've saved my project connection string in app.config file and use it without any problem. But some one told me that she has put it in Properties.Resources of her project. Now, my question is is there any preference between these two ways? or what else do you offer? Thank you ...

C#: Need for help on encrypting connection string in app.config and save it there and decrypting it and use ?

hi I need for help on encrypting connection string in app.config and save it there and decrypting it and use . Thank you ...