473,748 Members | 10,649 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Where to stor config file?

Dear all,

I am building a set of libraries working in a n tiers architecture
Some of those libraries use common configuration settings like the database
connection string and some others.

I can imgaine that I can get one config file per buisness library.
What is teh best way and where to store configuration files ?

Should I get only one with everything in and located in a particular common
folder ?
Should I get many and all store in a kind of config folder ?

I do not want to configure for instance data access layer from the client
application app config file for security reason somehow.

Thanks for your comments and help
regards
serge
May 31 '07 #1
8 1654
>
Should I get only one with everything in and located in a particular
common
folder ?
One XML Config file for each N-Tier layer that is needed with the file
physically being at each N-Tier level with the library or executable.

That's why a config file is an XML type file with tags/elements so that you
can locate a particular tag/element within the XML config file and read the
data belonging to the tag/element.

Jun 1 '07 #2
So if I have properly understood, I need to merge all my library settings in
a single XML config file using section group that each library will refer to
get it own settings.
Then I copy this single config file at every place I need it .

IS that correct ?

regards
serge

"Mr. Arnold" wrote:
>

Should I get only one with everything in and located in a particular
common
folder ?

One XML Config file for each N-Tier layer that is needed with the file
physically being at each N-Tier level with the library or executable.

That's why a config file is an XML type file with tags/elements so that you
can locate a particular tag/element within the XML config file and read the
data belonging to the tag/element.

Jun 1 '07 #3
On 31 May, 15:38, calderara <calder...@disc ussions.microso ft.com>
wrote:
Dear all,

I am building a set of libraries working in a n tiers architecture
Some of those libraries use common configuration settings like the database
connection string and some others.

I can imgaine that I can get one config file per buisness library.
What is teh best way and where to store configuration files ?

Should I get only one with everything in and located in a particular common
folder ?
Should I get many and all store in a kind of config folder ?

I do not want to configure for instance data access layer from the client
application app config file for security reason somehow.

Thanks for your comments and help
regards
serge
Well, I belive .net doesn't sets any standard on how to configure your
data.

In my opnion if you got any data which are application specific then
put in app.config file of the client. By doing this you can access the
configuration setting from within any classes in the project.

Now regarding the database connection type of setting create the xml
file within the class project and then mark that file as "Copy to
Output Direcotry" . But in this case your data access class need to
read this file seperatly.

I hope this helps

Jun 1 '07 #4

"calderara" <ca*******@disc ussions.microso ft.comwrote in message
news:2A******** *************** ***********@mic rosoft.com...
So if I have properly understood, I need to merge all my library settings
in
a single XML config file using section group that each library will refer
to
get it own settings.
Then I copy this single config file at every place I need it .

IS that correct ?
No, that is not what I am saying.

In the N-tier solution I have seen, there was a dedicated config file for
each tier.

One for the UI that at best had configurations that pointed to the business
tier.

The business tier had configurations pointing to the UI and Data Access
Layer tiers.

The DALC or Data Access Layer Component tier had a config with
configurations pointing to the Business tier with multiple connection
strings for SQL Server, based on which application needed the connection to
SQL Server.

This was one giant N-tier solution that many applications were using the
same config files at the tiers, with *section groups* for each application.

I can't say that's the only way it should be done, but that is what I have
seen implemented.
Jun 1 '07 #5
Hoo ok sounds more logic then.
It is effectively logic and better organise to get a config file for each
tiers.

Now based on those tiers that you have seen, how there were organised
physically ?

I mean, if we talk about the buisness tiers which propose different
services, how those different services are split ? are they all in a same
assembly named Buisness with different class per service, or were they one
assembly per buisness servcie ?

How did tehy know then to which tiers the assembly or set of assembly belongs?
Was it by specifying specific name space ?

thnask for coment

"Mr. Arnold" wrote:
>
"calderara" <ca*******@disc ussions.microso ft.comwrote in message
news:2A******** *************** ***********@mic rosoft.com...
So if I have properly understood, I need to merge all my library settings
in
a single XML config file using section group that each library will refer
to
get it own settings.
Then I copy this single config file at every place I need it .

IS that correct ?

No, that is not what I am saying.

In the N-tier solution I have seen, there was a dedicated config file for
each tier.

One for the UI that at best had configurations that pointed to the business
tier.

The business tier had configurations pointing to the UI and Data Access
Layer tiers.

The DALC or Data Access Layer Component tier had a config with
configurations pointing to the Business tier with multiple connection
strings for SQL Server, based on which application needed the connection to
SQL Server.

This was one giant N-tier solution that many applications were using the
same config files at the tiers, with *section groups* for each application.

I can't say that's the only way it should be done, but that is what I have
seen implemented.
Jun 1 '07 #6
I>n my opnion if you got any data which are application specific then
put in app.config file of the client. By doing this you can access the
configuration setting from within any classes in the project
No reaaly practicle if your work a a distributed environement especially for
Buisness and data layer.
Now regarding the database connection type of setting create the xml
file within the class project and then mark that file as "Copy to
Output Direcotry" . But in this case your data access class need to
read this file seperatly.
This is actually what I am doing
"-pb-" wrote:
On 31 May, 15:38, calderara <calder...@disc ussions.microso ft.com>
wrote:
Dear all,

I am building a set of libraries working in a n tiers architecture
Some of those libraries use common configuration settings like the database
connection string and some others.

I can imgaine that I can get one config file per buisness library.
What is teh best way and where to store configuration files ?

Should I get only one with everything in and located in a particular common
folder ?
Should I get many and all store in a kind of config folder ?

I do not want to configure for instance data access layer from the client
application app config file for security reason somehow.

Thanks for your comments and help
regards
serge

Well, I belive .net doesn't sets any standard on how to configure your
data.

In my opnion if you got any data which are application specific then
put in app.config file of the client. By doing this you can access the
configuration setting from within any classes in the project.

Now regarding the database connection type of setting create the xml
file within the class project and then mark that file as "Copy to
Output Direcotry" . But in this case your data access class need to
read this file seperatly.

I hope this helps

Jun 1 '07 #7

"calderara" <ca*******@disc ussions.microso ft.comwrote in message
news:63******** *************** ***********@mic rosoft.com...
Hoo ok sounds more logic then.
It is effectively logic and better organise to get a config file for each
tiers.

Now based on those tiers that you have seen, how there were organised
physically ?

I mean, if we talk about the buisness tiers which propose different
services, how those different services are split ? are they all in a same
assembly named Buisness with different class per service, or were they one
assembly per buisness servcie ?
They were based off a Common Base Business Framework that kept things common
and consistant. Each appliaction's Business Entities were derived from the
base framework. So, each application had its own Bussiness Entity library
which was derived from the Common Base Business Framework.
>
How did tehy know then to which tiers the assembly or set of assembly
belongs?
Was it by specifying specific name space ?
There was a Common UI Base for Web Forms, User Controls , etc, etc. For the
Web Form development, all Web Forms had to be derived from the Common UI
Base Form library, which was then used by the various business applications
that derived their own specific forms library.

Yes, there was a Common DALC Base Framework that all applications derived
from as well for data access.

So it made it easy to determine what application the library belonged too as
well on what tier the library was functioning on, a classic Windows DNA
setup.

Think Company Frameworks geared towards a company's needs.

http://whitepapers.techrepublic.com....x?docid=116195
http://www.microsoft.com/presspass/f...02-23dna2.mspx

Since you seem to be in this area, here is a good book to read ISBN
0-321-26820-2.

If you really what know about frameworks, n-tier design and business
objects, then you might want to look at CSLA, read the book, download the
framework, put it together, download the project put it together and run it,
to see the power and the concepts in use.

http://www.lhotka.net/Article.aspx?i...b-e0059cc82ee7

Jun 2 '07 #8
On 2 Jun, 04:37, "Mr. Arnold" <MR. Arn...@Arnold.c omwrote:
"calderara" <calder...@disc ussions.microso ft.comwrote in message

news:63******** *************** ***********@mic rosoft.com...
Hoo ok sounds more logic then.
It is effectively logic and better organise to get a config file for each
tiers.
Now based on those tiers that you have seen, how there were organised
physically ?
I mean, if we talk about the buisness tiers which propose different
services, how those different services are split ? are they all in a same
assembly named Buisness with different class per service, or were they one
assembly per buisness servcie ?

They were based off a Common Base Business Framework that kept things common
and consistant. Each appliaction's Business Entities were derived from the
base framework. So, each application had its own Bussiness Entity library
which was derived from the Common Base Business Framework.
How did tehy know then to which tiers the assembly or set of assembly
belongs?
Was it by specifying specific name space ?

There was a Common UI Base for Web Forms, User Controls , etc, etc. For the
Web Form development, all Web Forms had to be derived from the Common UI
Base Form library, which was then used by the various business applications
that derived their own specific forms library.

Yes, there was a Common DALC Base Framework that all applications derived
from as well for data access.

So it made it easy to determine what application the library belonged too as
well on what tier the library was functioning on, a classic Windows DNA
setup.

Think Company Frameworks geared towards a company's needs.

http://whitepapers.techrepublic.com....02-23dna2.mspx

Since you seem to be in this area, here is a good book to read ISBN
0-321-26820-2.

If you really what know about frameworks, n-tier design and business
objects, then you might want to look at CSLA, read the book, download the
framework, put it together, download the project put it together and run it,
to see the power and the concepts in use.

http://www.lhotka.net/Article.aspx?i...a-bacb-e0059cc...
There is one more very efficient application framwork provided by
Microsoft for distibuted architechture. Its called "Enterprise
Development Reference Architecture". There is another document which
shows how to implement this architechture and its called "Enterprise
Development Reference Implementation"

You can find it on MSDN site of microsoft or www.gotdonnet.com web
site. If you can't then let em know and I will forward you this
document.

I found it very useful.

Jun 4 '07 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
6568
by: Geoff Pennington | last post by:
It is really pathetic that I don't know this, but here it is. I have been writing ASP.Net apps for a while, and all configuration information, such as the database connection string, goes in a text file called Web.config. There, it is accessible to the entire app and can be changed without recompiling anything. Now I am writing a Windows app (using VB.Net). This type of project does not have a Web.config file (of course) so where do I...
4
2810
by: Ed_P. | last post by:
Hello, I have the following scenario: I have a solution with 4 projects Project1 = MainWindow (Windows EXE) Project2 = PresentationLayer (DLL) Project3 = BusinessLayer (DLL) Project4 = DataLayer (DLL) I have referenced all of the other projects in the first project so that I could use the objects I've created in them. However, I am running in
4
2431
by: harvie wang | last post by:
In .Net,Through System.Configuration.ConfigurationSettings Get Application's Settings I can't find the Configuration Value from Register Where the ConfigurationSettings saved? How to Read it except System.Configuration? Thanks! Harvie
7
2860
by: Yongsub Eric Shin | last post by:
Hi. I'm just a beginner in ASP.Net. I started writing codes and I keep on getting this Runtime Error page, where it says "Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
5
3384
by: feng | last post by:
Hi, We just converted our VB.Net Windows exe project from VS.Net 2002 to VS.Net 2003 and ran into a problem. the MyApp.exe.config file that we use for our customized configuration settings is removed when the conversion is done. It won't work even if I menully copy the file back. The settings are not get recogenized. What's going on? Thanks
3
3820
by: Richard Lewis Haggard | last post by:
I have a test application that is calling an assembly that reads some strings out of a config file. Normally, this assembly supports a web application and the information can be read just fine. Then I created a C# test application and ran the function. The function fails because the configuration read is failing to find a key. I created an application config and copied the keys over to the app config file but the app is still failing to...
4
1758
by: WT | last post by:
My web site is using a library created in a separate project. VS 2005 has created for it an App.config file. The library is included as a refernce in my web site. When I copied my web site to it's destination the app.config has not been copied by vs 2005. The library itself is in the bin directory. Should I copy it manually and where to install it: in root file project or in bin ? Thanks for help CS
6
1441
by: charles_gero | last post by:
All: Quick question regarding reentrancy and C99 signals. If we have a C statement such as: variable = 123456; And the resulting compiled machine code for a particular fake platform is to load the constant into a register, and then use **TWO** STORE machine instructions to store the variable back to memory, so that it
4
2033
by: Rob | last post by:
The app.config in VB 2005 appears to be riddled with bugs.... From solution explorer I right click on the Project | Properties... then I use the grid to add the app settings... AND they are saved in the app.config.xml as well, however, the program uses the value that were originally stored in the settings. I have run the Build and Saved the file, I even exited and re-opened the program as well as rebooted the machine.
0
8830
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,...
1
9321
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9247
tracyyun
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...
1
6796
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4602
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...
0
4874
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3312
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
2
2782
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2215
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.