|
|||||||
New to SitePoint Forums? Register here for free!
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
SitePoint Articles
Join Date: Apr 2001
Posts: 0
|
Article Discussion
This is an article discussion thread for discussing the SitePoint article, "The ASP.NET Web.config File Demystified"
|
|
|
|
|
|
#2 |
|
SitePoint Wizard
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Nov 2000
Location: Chico, Ca
Posts: 1,128
|
Great article. Simple, yet it covers the important topics.
|
|
|
|
|
|
#3 |
|
SitePoint Enthusiast
![]() Join Date: Dec 2004
Location: Ravenstein, Netherlands
Posts: 30
|
Too simplistic for me. Very brief overview. Could be useful for beginners but many IDE's have templates for web.config with comments for most items, so I'd rather wanted a more detailed article. Sorry vriend :)
|
|
|
|
|
|
#4 |
|
SitePoint Zealot
![]() ![]() Join Date: Jan 2005
Location: Oklahoma
Posts: 157
|
yes brief, but a good starter for the completely frightened programmer...
many times new programmers are afraid of any type of config files, so they avoid them like the plague, it is good for a brief intro... but yes, I would like to see a follow up article with more indepth info... |
|
|
|
|
|
#5 |
|
SitePoint Community Guest
Posts: n/a
|
I don't know what is happening, but i want to go on msn so i can talk to my friends! please let me on!! Thanks.
|
|
|
|
#6 |
|
SitePoint Zealot
![]() ![]() Join Date: Jan 2005
Location: Oklahoma
Posts: 157
|
Just a quick note for C# Developers:
the following reference from above: ConfigurationSettings.AppSettings("sqlConn") will not work in C#, in C# this denotes a method, but you are looking for a property. so you use this syntax, which is almost the same... ConfigurationSettings.AppSettings["sqlConn"] just replace the () with [] and you are set... :) |
|
|
|
|
|
#7 |
|
SitePoint Community Guest
Posts: n/a
|
<!-- Web.Config Configuration File -->
<configuration> <system.web> <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/> </system.web> </configuration> |
|
|
|
#8 |
|
SitePoint Community Guest
Posts: n/a
|
I am having the same problem, does anyone know how to fix it?
|
|
|
|
#9 |
|
SitePoint Community Guest
Posts: n/a
|
Nice article; simple, but very helpful and easy to follow/understand.
|
|
|
|
#10 |
|
SitePoint Zealot
![]() ![]() Join Date: Feb 2004
Posts: 162
|
Great article, perfect for the beginner.
|
|
|
|
|
|
#11 |
|
SitePoint Community Guest
Posts: n/a
|
<add key="myKey" value="myValue" />
How can I access myKey from other sections of the config file? i.e. <listeners> <add name="myListener" type="ATraceListener" initializeData=[here use myKey] /> </listeners> Is this possible? thanks |
|
|
|
#12 |
|
SitePoint Community Guest
Posts: n/a
|
To acess configuration settings from other sections use "ConfigurationSettings.GetConfig" method. Check it out at MSDN library.
|
|
|
|
#13 |
|
SitePoint Community Guest
Posts: n/a
|
ConfigurationSettings.AppSettings("sqlConn")
maybe a typo ConfigurationSettings.AppSettings["sqlConn"] |
|
|
|
#14 |
|
SitePoint Community Guest
Posts: n/a
|
what exactly the difference between
runtime data updation by xml and sql |
|
|
|
#15 |
|
SitePoint Community Guest
Posts: n/a
|
This article covers the features beautifully in a simple language.
|
|
|
|
#16 |
|
SitePoint Community Guest
Posts: n/a
|
Not a great article. Just setting the custom errors to remote only is not sufficient. Out of the thousands, only a handful have actually implemented proper projects before they write.
|
|
|
|
#17 |
|
SitePoint Community Guest
Posts: n/a
|
For completeness, please be aware that whilst IIS does not need to restart after a modification to a web.config file, the application will restart.
All existing in process session information will be lost. Nice article though! |
|
|
|
#18 |
|
SitePoint Community Guest
Posts: n/a
|
This is a good, clear article. I wish the Microsoft books were written this well. It only covers the basics, but it's helpful for beginners like me.
Just one criticism: there's no language specified for the example line 'ConfigurationSettings.AppSettings("sqlConn")'. This is a collection, so in C# it needs square brackets. Round brackets in VB. There is also a method for this task, e.g. AppSettingsReader.GetValue("sqlConn"), so it could cause some confusion. |
|
|
|
#19 |
|
SitePoint Community Guest
Posts: n/a
|
For configuration of the user sections I use IDM.Net Config Manager located on:
http://idmnetcontrols.com whitout problems. |
|
|
|
#20 |
|
SitePoint Community Guest
Posts: n/a
|
This article was exactly what I needed - thanks.
For those of us (me) who need everything qualified with it's namespace: System.Configuration.ConfigurationSettings.AppSettings["sqlConn"] |
|
|
|
#21 |
|
SitePoint Community Guest
Posts: n/a
|
this is great..............
|
|
|
|
#22 |
|
SitePoint Community Guest
Posts: n/a
|
This Article IS Excellent.
|
|
|
|
#23 |
|
SitePoint Community Guest
Posts: n/a
|
Thanks for your information sharing!
|
|
|
|
#24 |
|
SitePoint Community Guest
Posts: n/a
|
Hello sir,
This is my error while accessing webform1.aspx please solve Server Error in '/' Application. -------------------------------------------------------------------------------- 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 could, however, be viewed by browsers running on the local server machine. Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off". <!-- Web.Config Configuration File --> <configuration> <system.web> <customErrors mode="Off"/> </system.web> </configuration> Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL. <!-- Web.Config Configuration File --> <configuration> <system.web> <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/> </system.web> </configuration> |
|
|
|
#25 |
|
SitePoint Community Guest
Posts: n/a
|
WE CAN LEARN SOMETHING EXTRA WITH THE HELP OF THIS ARTICLE.
|
|
![]() |
| Bookmarks |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
|
All times are GMT -7. The time now is 09:21.









Linear Mode
