Hi guys,
I'm interested in displaying in a Windows Forms app a list of N radio buttons for the user to choose a target database server. I would like to add the SQL Server connection strings in the app.config file, so they are read by the app at runtime and rendered in the windows form as radio buttons.
At first I thought of using a de...
I'm not a WinForms developer, but have been doing ASP.NET for quite some time.
I have to write something in VB.NET that just pushes some simple data to a database.
So I created the VB.NET WinForms app (Visual Studio 2005).
When I run the app it works fine for using:
Dim conMyData As SqlConnection
Dim cmdInsert As SqlCommand
...
Hi,
I'm currently trying to create the app.config at runtime. The basic idea is that I'm deploying several config files and based on an environment variable the application itself decides which one to use.
Currently I'm copying the config file I'd like to use to myapp.exe.config, and refresh all the sections.
The problem I'm facing is,...
Right now when I release a new build of my .NET app, the UserAppDataPath path points to a new folder that includes the build number.
Documents and
Settings\UserName\Application
Data\Company\AssemblyName\1.0.0.0
I use this path as a convenient storage place for extended user UI setting files. Every time I release the user looses...
The Scenario
I have an ASP.NET web project. I want to be able to define all of the links for the site inside my web.config file so that they can be changed easily if needs be. Currently I have an "" section in my web.config file.
The Question
How do I bind this key value pair to an '' tag in my .aspx file?!
The App Settings in My Web...
Not sure if this is a duplicate or not, im sure if it is it will be closed anyway!
I hear a lot of folk mentioning things like "you shouldn't clog your app.config file with custom settings"....I was under the illusion that this was what the purpose of the file was for!
So, is it just indeed a preference thing, or are there any real ben...
In a Windows Service project, with a Project Installer I tried the following:
[RunInstaller(true)]
public partial class ProjectInstaller : Installer
{
public ProjectInstaller()
{
InitializeComponent();
}
protected override void OnBeforeInstall(System.Collections.IDictionary savedState)
{
base.OnBefor...
Hi,
I want to store some setting in web.config file of the sharepoint web application or in app.config of the workflow itself. But i don't know how to access neither of these files and i don't know how to handle the data inside them. Please, give some advise, how to do this or where to read about doing this.
Any information is helpful....
If I have a project with an App.Config, and when I compile it I get a file next to my DLL called [myproject].dll.config which contains the contents of the projects App.Config.
If I want to reference [myproject].dll from another project, do I need to copy the .config file as well? Can the App.Config file be compiled into the DLL so all t...
My understanding is, that .NET doesn't really 'do' config files for DLLs - only the main Executable or Web App gets a config file, and all DLLs referenced by the Executable/Web App read from that.
But in VS2008, if you add a Web Reference to a Class Library (DLL) project, it adds a Settings.Settings file and an app.config file to the pr...
While converting a project that used SlimDX, and therefore has unmanaged code, to .NET 4.0 I ran into the following error:
Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information.
Googling around gave me the solution, which is to a...
Hi Foks.
I am new to WCF and am working on a project
where I am building a WCF library that is called
by a Web project (ASP.NET 2.03.5 / C#).
I have a few things going on here.
1) I have provided a compliment contract (IJSON) for my
SOAP contracts (ISOAP) for my JSON web methods.
2) I have one contract, IFileTransferService, that ...
How is the app.config binding in .Net?
Let's say if I have an application project referencing a class library project. The code ConfigurationManager.AppSettings["MySetting"] in the class library project will read the value from app.config from the application project. Is my understanding correct?
So how about if we have 2 class libra...
I have a .NET assembly (.dll) that gets loaded as a COM server into an existing process. How can I get a .config file applied to it such that ConfigurationManager.GetSection will return the section out of the applied .config file?
...
Hello,
I have a .net solution having a reference hierarchy like this
MyWinApp->ServerCore->DataAccess
where the last two are class libraries and myWinApp is a windows app.
Now, each time I want to run this project on different servers I need to rebuild the project since I couldn't manage to separate the configuration file(app.config)...
Hello there,
I have two Services called TemplateService, TemplateReportService (both defined in one WCF Service Library) to be exposed to the client application.
And, I am trying to host these services under Windows Service.
Can anyone please guide me if App.config in Windows Service will be same as the one in WCF Library?
Here is m...
Let's say I have a class called AppConfig:
public static class AppConfig
{
private static XDocument config =
public static AppConfig()
{
}
}
How do I XDocument.Load the ~App.Config file? Isn't it something like Server.SOMETHING? What namespaces do I need to include>
...
I would like to create simple objects at runtime (textbox, label, etc) and add them to a Grid in my WPF application. My problem is that I need to define these in the app.config file. I am reading in the config data by using the “ConfigurationManager.GetSection” method. Shown below is an example of the XML that defines two textboxes. The ...
In my C#-WinForms-application (.Net 3.5, VS2008) I read the App.Config using:
Configuration myConfig =
ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
App.config contains two connection strings in the connectionStrings-Section:
<connectionStrings>
<add name="db1" connectionString="connection1"
prov...
I'm working on this ComVisible class library that uses a third party component.This component needs some settings to be added to the config file.Since the application that uses my dll is a VB 6 application I don't know where should I put the config file? is there anyway that we can load a config file at runtime?
...