Click here to Skip to main content
15,888,610 members
Articles / Web Development / ASP.NET

Access Web.Config application settings from a console or Windows application

Rate me:
Please Sign up or sign in to vote.
4.04/5 (8 votes)
30 Jun 2004 113.3K   820   23  
Example of how to read web.config settings into a console or Windows application.
Microsoft Visual Studio Solution File, Format Version 8.00
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WindowsWrapper", "WindowsApplication1\WindowsWrapper.csproj", "{7FAAE66D-3A01-43C0-A291-188B8EE37974}"
	ProjectSection(ProjectDependencies) = postProject
	EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UK.ORG.Webman", "ConfigurationSettings\UK.ORG.Webman.csproj", "{36934171-E969-4086-94BA-D745B3467057}"
	ProjectSection(ProjectDependencies) = postProject
	EndProjectSection
EndProject
Global
	GlobalSection(SolutionConfiguration) = preSolution
		Debug = Debug
		Release = Release
	EndGlobalSection
	GlobalSection(ProjectConfiguration) = postSolution
		{7FAAE66D-3A01-43C0-A291-188B8EE37974}.Debug.ActiveCfg = Debug|.NET
		{7FAAE66D-3A01-43C0-A291-188B8EE37974}.Debug.Build.0 = Debug|.NET
		{7FAAE66D-3A01-43C0-A291-188B8EE37974}.Release.ActiveCfg = Release|.NET
		{7FAAE66D-3A01-43C0-A291-188B8EE37974}.Release.Build.0 = Release|.NET
		{36934171-E969-4086-94BA-D745B3467057}.Debug.ActiveCfg = Debug|.NET
		{36934171-E969-4086-94BA-D745B3467057}.Debug.Build.0 = Debug|.NET
		{36934171-E969-4086-94BA-D745B3467057}.Release.ActiveCfg = Release|.NET
		{36934171-E969-4086-94BA-D745B3467057}.Release.Build.0 = Release|.NET
	EndGlobalSection
	GlobalSection(ExtensibilityGlobals) = postSolution
	EndGlobalSection
	GlobalSection(ExtensibilityAddIns) = postSolution
	EndGlobalSection
EndGlobal

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Software Developer (Senior)
United Kingdom United Kingdom
A .net devotee specialising in Object Orientated web development for financial institutions in Europe. When not working can normally be found at a bar within walking distance of the office.

Comments and Discussions