.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> C# >> Post New QuestionBookmark and Share Subscribe to Forum

Application config file in C#.net

Posted By: Narayanan     Posted Date: December 24, 2011    Points:5   Category :C#
How to use Application configuration file in the C#.net Application?

Responses
Author: Syed Shakeer Hussain             
Posted Date: December 24, 2011     Points: 20   

Hi,
Configuration files are used to control and manage the behavior of a web application.
1. Machine.config
2. Web.config

Machine.Config

One Machine.config file is shared for all ASP.NET's Application. It is only one on the machine for each version of .NET Framework. If you apply anything in machine.config file then it is applied on all ASP.NET applications. Machine.config file is universal on the machine. It can be located in the %runtime install path%\Config directory.

1. This is automatically installed when you install .NET Framework or Visual Studio. Net.
2. This is also called machine level configuration file.
3. Only one machine.config file exists on a server/computer.
4. This file is at the highest level in the configuration hierarchy

Web.Config
Web.config file is only for particular ASP.NET application. each ASP.NET application has different file. One ASP.NET application can have more than one web.config file. But only one in one folder.

1. This is automatically created when you create an ASP.Net web application project.
2. This is also called application level configuration file or folder level configuration file.
3. This file inherits setting from the machine.config. If same setting key is defined in both Machine.Config and Web.config, the Web.Config setting is used.

Difference Between Machine.config and Web.config

Machine.config is automatically installed when you install .NET Framework or Visual Studio. Net.

Web.config is automatically created when you create an ASP.Net web application project.

Machine.config is called machine level configuration file. Only one machine.config file exists on a server.

Web.config is called application level configuration file.

Machine.config file is at the highest level in the configuration hierarchy.

Web.Config file inherits setting from the machine.config


Author: kamlesh             
Posted Date: December 28, 2011     Points: 20   

hi. check below link

http://msdn.microsoft.com/en-us/library/ms184658%28v=vs.80%29.aspx
http://stackoverflow.com/questions/2999847/how-to-use-application-config-file-in-c
http://codesamplez.com/development/application-settings-c-sharp

Thanks And Regards.
Kamlesh Nikam
Author: Narayanan             
Posted Date: January 03, 2012     Points: 20   

Hi,
Thanks for your Information.


Regards, Lakshmi Naraayanan.S
http://dotnettechrocks.blogspot.in/


Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend