app-config

<userSettings> in app.config Could not find schema information for the element 'userSettings'

Hello when I try to add parameters to the settings table I get multiple messages for each parameter I add. e.g.: Could not find schema information for the element 'userSettings' Could not find schema information for the element 'setting' Could not find schema information for the attribute 'serializeAs' In the app.config I get: <pr...

The intended purpose for <app name>.exe.config file in a VB.NET Forms app.

I am currently reading up on documentation for a possible assignment I might be put on. In a design document they talk about the .exe.config file. They state that its only purpose is to store constants: "Also note that this file is meant to store constants only, it is not meant to write configuration values to (and the .NET 1.1. frame...

WebHttpBinding in WCF: how to configure it the proper way?

Trying to follow this example to make it work: http://weblogs.asp.net/kiyoshi/archive/2008/10/08/wcf-using-webhttpbinding-for-rest-services.aspx Here is my App.config: <system.serviceModel> <services> <!-- The service for the TEST WEB client --> <service name="MyServer.AAServiceType" behaviorConfiguration="Default"...

C# modify app.config

i want to change application settings at runtime, here part of it: <applicationSettings> <OPCClient.Properties.Settings> <setting name="Client_Service" serializeAs="String"> <value>http://localhost/test/service.asmx&lt;/value&gt; </setting> </OPCClient.Properties.Settings> </applicationSettings> i w...

App.Config Redundancy Causing Runtime Problem

In my app.config in a C# 3.5 app, I have this section: <appSettings> <add key="deleteOldFiles" value="false"/> <! -- 25 other keys/values omitted --> <add key="deleteOldFiles" value="true"/> </appSettings> At initial app rollout, the system did not delete files because the first server engineer made the confi...

.NET WebServices Connectivity issue

I'm currently working on a piece of software designed in WPF that connects to a set of WebServices. The WebServices are defined in the app.config:endpoint of my application: <endpoint address="http://localhost:52870/WebServices/Service.svc" behaviorConfiguration="VanguardWebServiceBehavior" binding="wsHttpBinding" bindingConfigurat...

Multiple config files across libraries

My ASP.NET MVC 2 application uses Entity Framework 4.0 for the data model. Following the instructions on http://blogs.msdn.com/b/aspnetue/archive/2010/09/17/second_2d00_post.aspx I put the .edmx in its own assembly so my solution has two projects: MyApp.Core (ASP.NET MVC 2 Web Application Project, references MyApp.DataLayer) Models/ C...

Tag to exclude a part of a file when I do a commit ?

Hello, We are working with two different teams on the same project. In a configuration file App.config, we have two connections string with our connection settings to connect to our database and the second team has another database with a different connection string. I have to comment the second connection string and uncomment the first...

Can ConfigurationElementCollection object contain for its elements another ConfigurationElementCollection objects?

Can ConfigurationElementCollection object contain for its elements another ConfigurationElementCollection objects? I have this xml where testsection is section root: <testsection> <head> <metaData> <metaGroup id="general"> <meta name="Content-type" content="text/html; charset=utf-8" type="http-eq...

What is contained in the App.config generated with 'add service reference'?

when adding a service reference an app.config is generated. What I'd like to know is, do the bindings, endpoints and everything else reflect the service, that I created the reference to? Do they specifically define that services bindings, security type,..etc, or is it simply a generic app.config? There seem to be a lot of settings.. ...

Can someone explain, in plain English, the difference between ConfigurationSection and ConfigurationElement?

I'm reading through a fantastic article on the .NET Configuration namespace (found here) which talks about creating custom sections, elements, collections, widgets, and flying toasters. The only complaint I have is that the article is only technical and doesn't provide any conceptual context. MSDN doesn't appear to have much conceptual i...

How to set path in config file

Hi, I have a test which runs a script. It gets the path from the app.config file: <scriptsSectionGroup> <scriptsCollection> <scripts> <add name="TestScript" path="C:\My Projects\RestServicePublishing\UtilityFixture\testScript.bat"/> </scripts> </scriptsCollection> </scriptsSectionGroup> 'testScript.bat' i...

Encrypt a single key in the appsettings section of App.Config file

Is it possible to encrypt a single value or must you encrypt entire sections? I.e. Given the app.config below can how can I encrypt just the password. I've read articles on encrypting connection string sections and whole sections of app.config. <?xml version="1.0"?> <configuration> <appSettings> <add key="Interval" value="40000" /> <a...

Is there possibility to create *.config file from scratch programatically in .NET (C#) ?

For our approach we want to create one of the *.config files from scratch and populate it with some default/custom values at runtime. Is there possibility to do this programatically via ConfigurationManager or something like that? ...

RIA Services why does VS 2010 not generate an App.config when there is no EF model?

We always generate our RIA services as a "WCF RIA Services Class Library". When we generated one for POCO, without first adding an EF model, we noticed the App.config was not generated. After testing we found the settings are only added to App.config if the App.config file already exists in the project. Is this just a bug in VS 2010?...

How to make use of RIA Services App.config files (without copying settings to web.config)

Even though I link my web-app with my RIA Services.web library, the App.config setting files are never used and I always need to copy the module settings manually to my web.config. Am I doing something wrong? Should the App.config file be recognised and automatically loaded? ...

Need to validate configuration property - must be 20 digits number

Hi, The user of my .NET application must provide 20-digit account number in the application configuration file. I am derived class from ConfigurationSection to work with custom sections. [ConfigurationProperty("RECEIVED_ACCOUNT", IsRequired = true)] public string RECEIVED_ACCOUNT { get { return (string)this["RECEIVED_ACCOUNT"]; } ...

3rd Party .Net Assembly not working in WebService project

So I'm trying to use a .Net Assembly in my web services project. This assembly requires lots of settings in App.config. But my web service doesn't have an App.config, it has a web.config. It seems that it uses sections that an app.config would have that don't even exist for web projects. Is there any way I can make this assembly work...

Encypting Configuration Strings for specific Build Config

This is a follow up to the my previous post http://stackoverflow.com/questions/3684878/different-configuaration-string-for-specific-build-configuration on figuring out on how to create different configuarions for different build configurations in VS2010 (ex. "Debug", "Relese", "Myconfig") After doing so, I have 3 files, with a differenc...

How to prevent Visual Studio from prompting to update .settings file from app.config

We're using a .settings file to store our application settings, and use default values in there so that we don't need to configure every single setting. This has generally been fine. However, during development we'll frequently change values in app.config, which means that when we open the .settings file, we always get the prompt "Value...