472,342 Members | 1,293 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,342 software developers and data experts.

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 3298
> 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*********@gmail.com> wrote in message
news:11**********************@g10g2000cwb.googlegr oups.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.config"
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.config" 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*********@gmail.com> wrote in message
news:11**********************@y43g2000cwc.googlegr oups.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.config"
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.config".

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**********@hotmail.com> wrote in message news:uV**************@TK2MSFTNGP02.phx.gbl... Big misconception here.

read this carefully.
Microsoft named "machine.config" incorrectly. Microsoft should have called it
"framework.config"
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.config" 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*********@gmail.com> wrote in message
news:11**********************@y43g2000cwc.googlegr oups.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.config 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****************@TK2MSFTNGP03.phx.gbl...
re:
Microsoft named "machine.config" incorrectly. Microsoft should have
called it "framework.config"


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.config".

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**********@hotmail.com> wrote in message
news:uV**************@TK2MSFTNGP02.phx.gbl...
Big misconception here.

read this carefully.
Microsoft named "machine.config" incorrectly. Microsoft should have
called it "framework.config"
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.config" 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*********@gmail.com> wrote in message
news:11**********************@y43g2000cwc.googlegr oups.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**********@hotmail.com> wrote in message news:uI**************@TK2MSFTNGP05.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.config 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****************@TK2MSFTNGP03.phx.gbl...
re:
Microsoft named "machine.config" incorrectly. Microsoft should have called it
"framework.config"


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.config".

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**********@hotmail.com> wrote in message news:uV**************@TK2MSFTNGP02.phx.gbl...
Big misconception here.

read this carefully.
Microsoft named "machine.config" incorrectly. Microsoft should have called it
"framework.config"
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.config" 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*********@gmail.com> wrote in message
news:11**********************@y43g2000cwc.googlegr oups.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.config - 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**************@TK2MSFTNGP04.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**********@hotmail.com> wrote in message
news:uI**************@TK2MSFTNGP05.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.config 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****************@TK2MSFTNGP03.phx.gbl...
re:
Microsoft named "machine.config" incorrectly. Microsoft should have
called it "framework.config"

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.config".

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**********@hotmail.com> wrote in message
news:uV**************@TK2MSFTNGP02.phx.gbl...
Big misconception here.

read this carefully.
Microsoft named "machine.config" incorrectly. Microsoft should have
called it "framework.config"
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.config" 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*********@gmail.com> wrote in message
news:11**********************@y43g2000cwc.googlegr oups.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
re:
How many users ( including myself in the past ) got confused about machine.config vs. every
framework has a machine.config for the entire machine?
heh, heh...

So far you're the only one I've encountered...but don't let that stop you.

:-)

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**********@hotmail.com> wrote in message news:%2****************@TK2MSFTNGP04.phx.gbl... Juan,

The name framework.config - 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**************@TK2MSFTNGP04.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**********@hotmail.com> wrote in message news:uI**************@TK2MSFTNGP05.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.config 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****************@TK2MSFTNGP03.phx.gbl...
re:
> Microsoft named "machine.config" incorrectly. Microsoft should have called it
> "framework.config"

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.config".

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**********@hotmail.com> wrote in message
news:uV**************@TK2MSFTNGP02.phx.gbl...
> Big misconception here.
>
> read this carefully.
> Microsoft named "machine.config" incorrectly. Microsoft should have called it
> "framework.config"
> 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.config" 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*********@gmail.com> wrote in message
> news:11**********************@y43g2000cwc.googlegr oups.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 #11
Thank alot for explaining me the concept so well.Now I got it

Tarun Sinha

May 11 '06 #12

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

Similar topics

1
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...
0
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,...
0
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...
6
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...
2
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....
2
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...
2
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...
2
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...
5
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...
0
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
0
better678
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
0
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...

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.