473,695 Members | 1,896 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Machine Config

Hello All

I need to ask about the configuration file in .NET,
There are Two config File
1. Web Config
2. Machine config
I understand the the usage of Web config , but not able to understand
the usage of Machine config.
I read in the article that you can also write your database connection
string in Machine Config
if this is true then why the people using web config , we can write the
whole configurartion
setting in machine.

Can any explain me why .net frame work requires two configuration file
if we write the same content (config setting) in both the files ????
With regards
Tarun Sinha

May 10 '06 #1
11 3440
> Hello All

I need to ask about the configuration file in .NET,
There are Two config File
1. Web Config
2. Machine config
I understand the the usage of Web config , but not able to understand
the usage of Machine config.
I read in the article that you can also write your database connection
string in Machine Config
if this is true then why the people using web config , we can write the
whole configurartion
setting in machine.

Can any explain me why .net frame work requires two configuration file
if we write the same content (config setting) in both the files ????

With regards
Tarun Sinha


machine.config is a single file that holds configuration for the entire
machine,
web.config is web-application specific. You might have multiple copies.

Example: we have multiple sites on our server, that need separate
connection strings!
Hans Kesting
May 10 '06 #2
You can use any number of XXX.Config. The Machine.Config provides
configuration settings for the ENTIRE web server. Each Web.Config
provides configuration settings to its OWN directory, and all sub
directories below it. Configuration files in child directories can
supply configuration information in addition to that inherited from
parent directories, and the child directory configuration settings can
OVERRIDE or modify settings defined in parent directories.

-Rick

May 10 '06 #3
Thank's for repl me so soon, but,
if we have an multiple site then we have also an mutiple web config ..
then why we require for
machine config, we can get the info about configuration setting from
web config instead of machine config

with regards
tarun sinha

May 10 '06 #4
Tarun,

you may want to have machine-wide settings regardless of application-specific settings.

The machine-wide settings are written in machine.config,
and the application-wide settings are written into any of a number of web.configs.

Also, in a web-hosting situation, you might want to disable certain features,
or assign certain security features per machine, and not only per application.

An example, would be the ability to assign security permissions for the whole machine.

You certainly don't want individual users ( which could be many )
to be able to change security settings for the whole machine.


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
=============== =============== =====
"TARUN" <ta*********@gm ail.com> wrote in message
news:11******** **************@ g10g2000cwb.goo glegroups.com.. .
Thank's for repl me so soon, but,
if we have an multiple site then we have also an mutiple web config ..
then why we require for
machine config, we can get the info about configuration setting from
web config instead of machine config

with regards
tarun sinha

May 10 '06 #5
Big misconception here.

read this carefully.
Microsoft named "machine.config " incorrectly. Microsoft should have called
it "framework.conf ig"
machine.config is not for the entire machine but for the entire machine that
is using a specific framework
Because you can have Framework 1.0, 1.1, 2.0 and xx.x all at the same time
on one machine then you can have multiple machine.config files. One for
each framework.

This is a trick question on an interview.

Also machine.config "framework.conf ig" has allot of configurations that
are common and then you can specialize your configurations in your
web.config for each web application you have on your server.

SA
"TARUN" <ta*********@gm ail.com> wrote in message
news:11******** **************@ y43g2000cwc.goo glegroups.com.. .
Hello All

I need to ask about the configuration file in .NET,
There are Two config File
1. Web Config
2. Machine config
I understand the the usage of Web config , but not able to understand
the usage of Machine config.
I read in the article that you can also write your database connection
string in Machine Config
if this is true then why the people using web config , we can write the
whole configurartion
setting in machine.

Can any explain me why .net frame work requires two configuration file
if we write the same content (config setting) in both the files ????
With regards
Tarun Sinha

May 10 '06 #6
re:
Microsoft named "machine.config " incorrectly. Microsoft should have called it
"framework.conf ig"
Let's not get hung up on semantics here.

It *is* machine.config. ..for the framework version
installed in the directory where that machine.config is found.

i.e., that "machine.config " has machine-wide scope for that framework version.

Machine.config is aptly named.

It's OK to have more machine.config files in other framework installation directories.
There's no difference in naming the file "machine.config " or "framework.conf ig".

Something else to keep in mind, in regard to the OP's question, is that some of the configuration
parameters in machine.config refer to desktop and console apps, and don't necessarily refer to
*web* apps...so a "machine.config " file can have other purposes than configuring web apps.


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
=============== =============== =====
"MSDN" <sq**********@h otmail.com> wrote in message news:uV******** ******@TK2MSFTN GP02.phx.gbl... Big misconception here.

read this carefully.
Microsoft named "machine.config " incorrectly. Microsoft should have called it
"framework.conf ig"
machine.config is not for the entire machine but for the entire machine that is using a specific
framework
Because you can have Framework 1.0, 1.1, 2.0 and xx.x all at the same time on one machine then
you can have multiple machine.config files. One for each framework.

This is a trick question on an interview.

Also machine.config "framework.conf ig" has allot of configurations that are common and then you
can specialize your configurations in your web.config for each web application you have on your
server.

SA
"TARUN" <ta*********@gm ail.com> wrote in message
news:11******** **************@ y43g2000cwc.goo glegroups.com.. .
Hello All

I need to ask about the configuration file in .NET,
There are Two config File
1. Web Config
2. Machine config
I understand the the usage of Web config , but not able to understand
the usage of Machine config.
I read in the article that you can also write your database connection
string in Machine Config
if this is true then why the people using web config , we can write the
whole configurartion
setting in machine.

Can any explain me why .net frame work requires two configuration file
if we write the same content (config setting) in both the files ????
With regards
Tarun Sinha


May 10 '06 #7
I disagree, We are not hung up here we need better names when possible.

Why companies correct, modify things then? Why not keep everything the
same?
machine.config is deceiving.
framework.confi g would have been better. Over the years many companies
including Microsoft have named things in a way that can be better. Thanks
to Microsoft things are changing for the best because Microsoft is listening
to people like us. Good example is local.live.com, New Hotmail Beta, etc.
etc. etc..

If we get stuck in the past we never improve the future. If we don't look
for improvements we never get better.

Thanks for your thoughts.

SA
you are right machine.config is not only for web.
"Juan T. Llibre" <no***********@ nowhere.com> wrote in message
news:%2******** ********@TK2MSF TNGP03.phx.gbl. ..
re:
Microsoft named "machine.config " incorrectly. Microsoft should have
called it "framework.conf ig"


Let's not get hung up on semantics here.

It *is* machine.config. ..for the framework version
installed in the directory where that machine.config is found.

i.e., that "machine.config " has machine-wide scope for that framework
version.

Machine.config is aptly named.

It's OK to have more machine.config files in other framework installation
directories.
There's no difference in naming the file "machine.config " or
"framework.conf ig".

Something else to keep in mind, in regard to the OP's question, is that
some of the configuration
parameters in machine.config refer to desktop and console apps, and don't
necessarily refer to
*web* apps...so a "machine.config " file can have other purposes than
configuring web apps.


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
=============== =============== =====
"MSDN" <sq**********@h otmail.com> wrote in message
news:uV******** ******@TK2MSFTN GP02.phx.gbl...
Big misconception here.

read this carefully.
Microsoft named "machine.config " incorrectly. Microsoft should have
called it "framework.conf ig"
machine.config is not for the entire machine but for the entire machine
that is using a specific framework
Because you can have Framework 1.0, 1.1, 2.0 and xx.x all at the same
time on one machine then you can have multiple machine.config files. One
for each framework.

This is a trick question on an interview.

Also machine.config "framework.conf ig" has allot of configurations that
are common and then you can specialize your configurations in your
web.config for each web application you have on your server.

SA
"TARUN" <ta*********@gm ail.com> wrote in message
news:11******** **************@ y43g2000cwc.goo glegroups.com.. .
Hello All

I need to ask about the configuration file in .NET,
There are Two config File
1. Web Config
2. Machine config
I understand the the usage of Web config , but not able to understand
the usage of Machine config.
I read in the article that you can also write your database connection
string in Machine Config
if this is true then why the people using web config , we can write the
whole configurartion
setting in machine.

Can any explain me why .net frame work requires two configuration file
if we write the same content (config setting) in both the files ????
With regards
Tarun Sinha



May 10 '06 #8
re:
Thanks for your thoughts.
Thanks for yours.

I still think that it's a semantic thing...and that machine.config is aptly named.


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
=============== =============== =====
"MSDN" <sq**********@h otmail.com> wrote in message news:uI******** ******@TK2MSFTN GP05.phx.gbl...I disagree, We are not hung up here we need better names when possible.

Why companies correct, modify things then? Why not keep everything the same?
machine.config is deceiving.
framework.confi g would have been better. Over the years many companies including Microsoft have
named things in a way that can be better. Thanks to Microsoft things are changing for the best
because Microsoft is listening to people like us. Good example is local.live.com, New Hotmail
Beta, etc. etc. etc..

If we get stuck in the past we never improve the future. If we don't look for improvements we
never get better.

Thanks for your thoughts.

SA
you are right machine.config is not only for web.
"Juan T. Llibre" <no***********@ nowhere.com> wrote in message
news:%2******** ********@TK2MSF TNGP03.phx.gbl. ..
re:
Microsoft named "machine.config " incorrectly. Microsoft should have called it
"framework.conf ig"


Let's not get hung up on semantics here.

It *is* machine.config. ..for the framework version
installed in the directory where that machine.config is found.

i.e., that "machine.config " has machine-wide scope for that framework version.

Machine.config is aptly named.

It's OK to have more machine.config files in other framework installation directories.
There's no difference in naming the file "machine.config " or "framework.conf ig".

Something else to keep in mind, in regard to the OP's question, is that some of the configuration
parameters in machine.config refer to desktop and console apps, and don't necessarily refer to
*web* apps...so a "machine.config " file can have other purposes than configuring web apps.


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
=============== =============== =====
"MSDN" <sq**********@h otmail.com> wrote in message news:uV******** ******@TK2MSFTN GP02.phx.gbl...
Big misconception here.

read this carefully.
Microsoft named "machine.config " incorrectly. Microsoft should have called it
"framework.conf ig"
machine.config is not for the entire machine but for the entire machine that is using a specific
framework
Because you can have Framework 1.0, 1.1, 2.0 and xx.x all at the same time on one machine then
you can have multiple machine.config files. One for each framework.

This is a trick question on an interview.

Also machine.config "framework.conf ig" has allot of configurations that are common and then
you can specialize your configurations in your web.config for each web application you have on
your server.

SA
"TARUN" <ta*********@gm ail.com> wrote in message
news:11******** **************@ y43g2000cwc.goo glegroups.com.. .
Hello All

I need to ask about the configuration file in .NET,
There are Two config File
1. Web Config
2. Machine config
I understand the the usage of Web config , but not able to understand
the usage of Machine config.
I read in the article that you can also write your database connection
string in Machine Config
if this is true then why the people using web config , we can write the
whole configurartion
setting in machine.

Can any explain me why .net frame work requires two configuration file
if we write the same content (config setting) in both the files ????
With regards
Tarun Sinha



May 10 '06 #9
Juan,

The name framework.confi g - or equivalent has lots of implicit meta data in
it.
How many users ( including myself in the past ) got confused about
machine.config vs. every framework has a machine.config for the entire
machine?
At times that saves time when things are precisely named.

God Bless and thank you again.

SA
"Juan T. Llibre" <no***********@ nowhere.com> wrote in message
news:Ou******** ******@TK2MSFTN GP04.phx.gbl...
re:
Thanks for your thoughts.


Thanks for yours.

I still think that it's a semantic thing...and that machine.config is
aptly named.


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
=============== =============== =====
"MSDN" <sq**********@h otmail.com> wrote in message
news:uI******** ******@TK2MSFTN GP05.phx.gbl...
I disagree, We are not hung up here we need better names when possible.

Why companies correct, modify things then? Why not keep everything the
same?
machine.config is deceiving.
framework.confi g would have been better. Over the years many companies
including Microsoft have named things in a way that can be better.
Thanks to Microsoft things are changing for the best because Microsoft is
listening to people like us. Good example is local.live.com, New Hotmail
Beta, etc. etc. etc..

If we get stuck in the past we never improve the future. If we don't look
for improvements we never get better.

Thanks for your thoughts.

SA
you are right machine.config is not only for web.
"Juan T. Llibre" <no***********@ nowhere.com> wrote in message
news:%2******** ********@TK2MSF TNGP03.phx.gbl. ..
re:
Microsoft named "machine.config " incorrectly. Microsoft should have
called it "framework.conf ig"

Let's not get hung up on semantics here.

It *is* machine.config. ..for the framework version
installed in the directory where that machine.config is found.

i.e., that "machine.config " has machine-wide scope for that framework
version.

Machine.config is aptly named.

It's OK to have more machine.config files in other framework
installation directories.
There's no difference in naming the file "machine.config " or
"framework.conf ig".

Something else to keep in mind, in regard to the OP's question, is that
some of the configuration
parameters in machine.config refer to desktop and console apps, and
don't necessarily refer to
*web* apps...so a "machine.config " file can have other purposes than
configuring web apps.


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
=============== =============== =====
"MSDN" <sq**********@h otmail.com> wrote in message
news:uV******** ******@TK2MSFTN GP02.phx.gbl...
Big misconception here.

read this carefully.
Microsoft named "machine.config " incorrectly. Microsoft should have
called it "framework.conf ig"
machine.config is not for the entire machine but for the entire machine
that is using a specific framework
Because you can have Framework 1.0, 1.1, 2.0 and xx.x all at the same
time on one machine then you can have multiple machine.config files.
One for each framework.

This is a trick question on an interview.

Also machine.config "framework.conf ig" has allot of configurations
that are common and then you can specialize your configurations in your
web.config for each web application you have on your server.

SA
"TARUN" <ta*********@gm ail.com> wrote in message
news:11******** **************@ y43g2000cwc.goo glegroups.com.. .
> Hello All
>
> I need to ask about the configuration file in .NET,
> There are Two config File
> 1. Web Config
> 2. Machine config
> I understand the the usage of Web config , but not able to understand
> the usage of Machine config.
> I read in the article that you can also write your database connection
> string in Machine Config
> if this is true then why the people using web config , we can write
> the
> whole configurartion
> setting in machine.
>
> Can any explain me why .net frame work requires two configuration file
> if we write the same content (config setting) in both the files ????
>
>
> With regards
> Tarun Sinha
>



May 10 '06 #10

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

Similar topics

1
4381
by: Chris | last post by:
I have seen the posts on various places on the internet about .NET framework mismatch issues and I don't think that is my problem. ; ) When I execute the following C++.NET code: String *ipAddress = S""; IDictionary *server_config = dynamic_cast<IDictionary*>(ConfigurationSettings::GetConfig("ServerAddress") ); ipAddress = dynamic_cast<String*>(server_config->get_Item(S"IP"));
0
1715
by: some guy with a computer | last post by:
I can not get a custom httpHandler to fire using machine.config and an assembly in the GAC. It will not work if I move the assembly to the GAC, even though I have it referenced correctly and add the assembly to the <compile> tag (all my other controls I can call from the GAC this way). It will not work if I have the handler specified where the rest are (*.cs, *.aspx.....etc, in machine.config)
0
1499
by: Roy Chastain | last post by:
I have a simple page or two and a simple global.asax file that loads some configuration from the web.config file. I developed this on a Windows XP box with framework version 1.1 installed. I run it on a 2003 box with both version 1.0 and 1.1 installed. This appears to work. When move the page and code to my clients hosting service (Earthlink) which only supports version 1.0 of the framework, I get the error below. I know that my...
6
2471
by: Mikey_Doc | last post by:
Hi We are running cms 2002, Framework 1.0 with Visual studio 2002. We have just upgraded to Framework 1.1 and visual studio 2003. All of our database connection strings are stored within the machine config, this was necessary as our web site has 4 environments and the database server has a different name in each. Since the upgrade the applications can't read the strings in the
2
2155
by: kramer.newsreader | last post by:
I am develoing a C# web application on a remote server. I have publish access to this server, but not permission to change configuration setting. When I try to load my page, I get the following message: Runtime Error 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
2
3500
by: Max Metral | last post by:
I'm trying to set the default behavior of customErrors in the machine.config. The documentation seems to suggest this should work, but it doesn't seem to work for me. On my development machine, I want customErrors off, and on my production machine I want them to go to a friendly error page (so on with a defaultRedirect). No matter what I do, I only get "customErrors off" with setting in machine.config and not web.config. Any thoughts?...
2
6656
by: Ian | last post by:
Hi, I am trying to use machine.config to store database settings for a connection wrapper class I am using as part of the data layer of an n-tier system. Have added the following section to my machine.config file <appSettings> <add key ="iSpexDatabaseType" value ="SQL"/>
2
1781
by: rKrishna2k6 | last post by:
We used to run our application on framework 1.1 and upgraded to 3.5 recently(I understood 2.0 and 3.5 are same except for the few add In s) Our Prod environment is on Win 2003 & IIS 6.0 and server(s) is built with 4 CPUs & 4GB RAM. Based on Microsoft thread pool recommendations we have the following Machine.config entries..
5
2855
by: =?Utf-8?B?SmVycnkgQw==?= | last post by:
I have a app that uses several membership/role providers. I can list these Providers with the code: Dim rootWebConfig1 As Configuration rootWebConfig1 = WebConfigurationManager.OpenWebConfiguration(Request.ApplicationPath) Dim section As New MembershipSection section = rootWebConfig1.GetSection("system.web/membership")
0
8586
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,...
0
9140
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8864
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
8838
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...
0
7685
agi2029
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...
1
6510
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
4351
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...
2
2290
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1987
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.