Hi,
I am trying to encrypt Configuration Information Using Protected Configuration in Visual Studio 2010.
I have the following info speicifed in the App.Config file:
<connectionStrings configProtectionProvider="TheProviderName">
<EncryptedData>
<CipherData>
<CipherValue>VALUE GOES HERE</CipherValue>
</CipherData>
</Encrypted...
I'm trying to store a user list in a config file. I've been looking at DictionarySectionHandler and NameValueSectionHandler. I'm not too sure what the difference between these two is, but anyway, neither of them do exactly what I'd like.
You can add a custom config section like so:
<configSections>
<section name="userAges" type="S...
I'm wondering how other developers are handling source code conflicts for config files when system admins modify them in production. For example, if a system admin updates a appsettings key on the production server and then my team publishes out a project, it will overwrite that key.
How do you handle config file updates in your organiz...
I had to migrate a .NET 3.5 to 4.0 but some dll's were not loading, after googling I found that creating an app.config would solve it:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0" />
</startup>
</configuration>
I would like to setup...
ASP.NET contains a simple method to encrypt sections of web.config files. It is simple to do this by code and it is simple to do this by command line with the aspnet_regiis tool for web.config files. And although the underlying API isn’t ASP.NET specific, there is no tool like aspnet_regiis for app.config files. I am aware of the workaro...
I have an app that works fine on 32-bit systems, but fails on XP 64 bit systems. I've tracked it down to the connection string defined in my app.config thus:
<connectionStrings>
<clear/>
<add name="IFDSConnectionString"
connectionString="Data Source=fdsdata;Initial Catalog=IFDS;
Trusted_Connection=true;Connec...
Hi Guys,
I have an assembly with few versions registered in the GAC. Now, I want one of my clients which uses this assembly (version 1.3) to point to the newest version (1.4) without opening the source and recompiling the client.
I saw an article demonstrating a technique for doing so using the application config file (winform applicatio...
I am developing a custom HttpHandler, to do so I write a C# Class Library and compile to DLL.
As part of this I have some directory locations which I want not hard coded in the app, so i'm trying to put it in the app.config which I've used before.
Before this has worked by just going building the app.config:
<?xml version="1.0" encodi...
Hi,
I have multiple DLLs that are used to read/write data into my database.
There is a presentation layer DLL and a data access layer DLL. I want these DLLs to share a set of the connection strings.
My idea is to store the connection string in a seperate DLL in the external configuration file. I'm not sure whether it's a good idea an...
Hi,
I have added a customConfig.xml to my project.
I'm struggling to read the file into xElement because I need a file path.
Any help is greatly appreciated.
Thank you
...
Each time I try to add a very basic section into app.config I get the following error:
Configuration system failed to initialize.
I have looked at the variety of articles but none of those has helped so far.
Any ideas what is going wrong?
Edit:
<configSections>
<section name="Test" type="TestType"/>
</configSections>
<Tes...
The reason I asked this question is that I wanted to create a helper class for Remoting instantiation, and wanted to pass the appropriate app.exe.config (or web.config) file path to the RemotingConfiguration.Configure method, depending on the caller.
Is there a way I could get the name of the config file for both Win and Web apps withou...
I am working on a website with a scheduled dataloader exe. The website lives on the web server and the dataloader lives on the DB server. One of the steps in the process is for the dataloader to access the WEB server (to copy/paste a maintenance page file..e.g.\192.168.1.101\c$\maintenance.htm).
I am, not surprisingly, running into ...
Hey guys,
i want to log some traces in my service. When i set initializeData to a location in the d: partition, i can write with no problems. When i set the initializeData to c:\, it doesn't write at all. Now i was wondering 2 things :
1) Does my service not have the rights to write to c:\ partition?
2) if i don't specify the parti...
Hi,
I have two DLLs: one with a web.config, another one with app.config
I moved the connection strings from web.config to app.config so that it can be used by other DLLs.
Now, when I call ConfigurationManager.GetSection("SomeSection") , the application looks for a web.config, when it should be looking for the app.config. It doesn't ...
Hi,
Is it possible for a configSource to point to another DLL?
For example configSource = "SomeOtherDllName.connectionStrings.config"
Thank you
...
Similar but not the same:
How to securely store database connection details
Securely connecting to database within a application
Hi all, I have a C# WinForms application connecting to a database server. The database connection string, including a generic user/pass, is placed in a NHibernate configuration file, which lies in the same ...
Hey guys,
There's a lot of post saying how to change info in the app.config and there are posts that say you shouldn't edit info in the app.config but store info in user folders. I understand these topics. But what i want is a combination of both.
I have a wcf setup for my client in an app.config, which contains the endpoint address to ...
I have a class that needs to get some settings from the application configuration file and that is used in a console based app and a web app.
Other than catching an exception how can I determine whether to use:
ServiceModelSectionGroup serviceModelSectionGroup = ServiceModelSectionGroup.GetSectionGroup(ConfigurationManager.OpenExeConfi...
hi,
I want to implement Craig Andera's custom XML configuration handler in a slightly different scenario. What I want to be able to do is to read in a list of arbitrary length of custom objects defined as:
public class TextFileInfo
{
public string Name { get; set; }
public string TextFilePath { get; set; }
public string Xml...