Hi
I need to be able to supply some relatively complex configuration to an
application. The application will either run in a web context (with a
web.config file, or as a application with an app.config).
The only configuration reading I have used before is AppSettings["name"]
and I have also used Spring Framework. It is more the type of
configuration that Spring uses I am looking at now.
Basically I am looking for some pointers on where to start learning how
to do this - and/or some example code. I think I have to implement a
"configurat ion reader" but I am not sure...
An example of the type of configuration I need to read:
<configuratio n>
<configSections >
<sectionGroup name="alpha">
<section name="serviceFa ctories" type="??, ??" />
</sectionGroup>
</configSections>
<alpha>
<serviceFactori es>
<serviceFacto ry name="wcfSearch ServiceFactory"
factorytype="Al pha.ServiceFact ory.WcfServiceF actory`1,
Alpha.Wcf.Servi ceFactory"
contract="alpha .poc.search.wcf .contract.ISear ch">
<property name="wcfDefini tion"
value="SearchSe rvice" />
</serviceFactory>
<serviceFacto ry name="localSear chServiceFactor y"
factorytype="Al pha.ServiceFact ory.SimpleLocal ServiceFactory` 1,
Alpha.Wcf.Servi ceFactory"
contract="alpha .poc.search.wcf .contract.ISear ch">
<property name="serviceTy pe"
value="alpha.po c.search.wcf.se rvice.Search,
alpha.poc.searc h.wcf.service" />
</serviceFactory>
</serviceFactorie s>
</alpha>
Thanks,
Peter 3 3860
On Dec 14, 10:49 am, Peter K <xdz...@hotmail .comwrote:
I need to be able to supply some relatively complex configuration to an
application. The application will either run in a web context (with a
web.config file, or as a application with an app.config).
The only configuration reading I have used before is AppSettings["name"]
and I have also used Spring Framework. It is more the type of
configuration that Spring uses I am looking at now.
Basically I am looking for some pointers on where to start learning how
to do this - and/or some example code. I think I have to implement a
"configurat ion reader" but I am not sure...
Why implement a configuration reader when Spring has done it all for
you? Can you not
use Spring for some reason?
Jon
"Jon Skeet [C# MVP]" <sk***@pobox.co mwrote in news:df33733a-94d7-40ec- 92************* **@i12g2000prf. googlegroups.co m:
On Dec 14, 10:49 am, Peter K <xdz...@hotmail .comwrote:
>I need to be able to supply some relatively complex configuration to an application. The application will either run in a web context (with a web.config file, or as a application with an app.config).
The only configuration reading I have used before is AppSettings["name"] and I have also used Spring Framework. It is more the type of configuratio n that Spring uses I am looking at now.
Basically I am looking for some pointers on where to start learning how to do this - and/or some example code. I think I have to implement a "configurati on reader" but I am not sure...
Why implement a configuration reader when Spring has done it all for
you? Can you not
use Spring for some reason?
Unfortunately no !!!
The customer I am working for at the moment does not like open source.
Don't ask.
I have used Spring (both java and .net) very successfully over the course
of several years, and not stumbled across any significant problems. To tell
the truth I trust Spring's configuration management (and dependency
injection) a helluva lot more than my "roll your own" version, but there
you go...
But I have found some information regarding ConfigurationSe ction, and I
think that is the way to go. http://msdn2.microsoft.com/en-us/library/2tw134k3.aspx
/Peter
On Dec 14, 11:10 am, Peter K <xdz...@hotmail .comwrote:
Why implement a configuration reader when Spring has done it all for
you? Can you not
use Spring for some reason?
Unfortunately no !!!
The customer I am working for at the moment does not like open source.
Don't ask.
Blech. The world is completely mad. :(
I have used Spring (both java and .net) very successfully over the course
of several years, and not stumbled across any significant problems. To tell
the truth I trust Spring's configuration management (and dependency
injection) a helluva lot more than my "roll your own" version, but there
you go...
:)
But I have found some information regarding ConfigurationSe ction, and I
think that is the way to go.http://msdn2.microsoft.com/en-us/library/2tw134k3.aspx
It's certainly *a* way to go, yes :)
Jon This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: mjcsfo |
last post by:
I can't seem to find a reference nor any helpful threads on this
topic.
I've gotten the following error in two circumstances:
1. A complex type has nested within it another complex type, in the
"Russian doll" style of schema design, where the nested type is
local
and anonymous (not a separate global type).
2. A complex type has nested within it a simple type which is derived
through restriction with at least one facet, again nested,...
|
by: Paul Fi |
last post by:
I have this problem with .NET remoting:
my remote class is called RemoteHandler which implements an interface
called IEazyRemoting which has only one method to be implemented which
is my server configuration file looks like this:
<configuration>
<system.runtime.remoting>
<application>
<service>
|
by: Martin Eyles |
last post by:
Hi,
I have a configuration file I made in xml which I am using to name a
database server. (this way I can deploy my web page on various servers, and
just change this file to make it work). Unfortunately, I can't figure out
how to read this from the server side code behind file (either vb or c#).
Can anyone
post some sample code for this.
Thanks,
Martin
|
by: Ganesh Muthuvelu |
last post by:
Hi STAN,
Stan: Thanks for your response to my previous post on reading a XSD file
using your article in
"https://blogs.msdn.com/stan_kitsis/archive/2005/08/06/448572.aspx".
it works quite well but I have one problem.. I am not able to read a Complex
Content.. Here is a portion of the XSD that contains the complex content. I
need to read the elements under it and could not get an handle to it..
Could you please help?
|
by: Umut Tezduyar |
last post by:
ExeConfigurationFileMap fileMap = new ExeConfigurationFileMap();
fileMap.ExeConfigFilename = "FactorySettings.config";
Configuration config =
System.Configuration.ConfigurationManager.OpenMappedExeConfiguration(fileMap,
ConfigurationUserLevel.None);
CustomConfiguartionSection section =
(CustomConfigurationSection)config.GetSection (sectionName);
| |
by: cyberstrike |
last post by:
In the system.configuration namespace, is there any way to save a Dataset or
any other custom structure in a section? I know how to make a class and
derive it from the section class; however, any properties I want to save
within that class have to be basic types. Right now if I try to use a complex
type, then I get an error that it could not find the converter.
In the configuration application block I could write datasets and any kind
of...
|
by: Ivan Berg |
last post by:
Hey everyone, hopefully this will have a simple answer. Using VS2005/.NET
2.0 Application settings.
I have simple settings working fine, but I am trying to store more complex
types now.
For example a collection of city/state/country's
e.g.
|
by: Ryan |
last post by:
I've created a custom configuration section that inherits (naturally) from
System.Configuration.ConfigurationSection. The configuration section is
working 99% fine, however I keep coming across a ConfigurationErrorException
whenever I do the following:
1. Modify and save the section in code using the
System.Configuration.Configuration.Save().
2. Refresh teh section using ConfigurationManager.RefreshSection
3. Encrypt the section,...
|
by: Lucky |
last post by:
Hi guys,
I've got a problem under reading settlings from App.config file.
I've used System.Configuration to reach to the "User Settings" and
"Application Settings" sections.
the problem is now I'm not able read the property defined under this
section. those are like this
User Settings -Testing
Application Settings -Test
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |