One situation I’ve witnessed numerous times is the fact that C# and the .NET platform is case-sensitive. This seems to cause problems for older Windows develoeprs that migrated from Visual Basic. One particular problem I encountered recently with an ASP.NET application was located in the Web.config file. The following line caused a problem with the application and the developer couldn’t figure out why:
Now, this is not invalid XML but it does conform to the design of the ASP.NET appSettings element. The
Unrecognized configuration section ‘appsettings’
Now, it took me a few seconds to realize the problem but it illustrates the point that the .NET platform is largely case-sensitive unless you utlize VB.NET as your language (but the Web.config remains case-sensitive regardless of the language). The correct Web.config entry would be:
These issues exist in the C# and J# languages as well, but those can be caught during compilation.





March 25th, 2005 at 6:17 am
Whats the point of case sensitivity in a config file? Or am i just being naive?
March 25th, 2005 at 8:20 am
XML is case-sensitive, so when the framework starts navigating through your config file (which is an XML file), it’s looking for elements that match exactly.
“A” and “a” are actually two different entities so far as computers are concerned. They don’t differentiate between capital and lower-case unless it’s specified that there is an existing relationship between two characters (e.g. “A” and “a”).
Since XML is case-sensitive, when the file is traversed, “” and “ ” are two completely different things.
All of the above was an explanation of the simple answer to your question, Dangermouse: case-sensitivity in config files is not so much a necessity as much as it is a side effect of using XML for those files.
March 25th, 2005 at 8:20 am
Web.config must be case sensitive because of XML specification (which says that tag and attribute names are case sensitive).
March 25th, 2005 at 11:15 am
Sorry, I didn’t mean “don’t differentiate between”, I meant “don’t make a connection between”, as it does differentiate.
March 25th, 2005 at 5:33 pm
I guess I’m just used to this. I don’t even notice that I’m typing in camel case and typing to conform anymore, it just comes with repetition.
I have seen quite a few posts about it though, and it threw me for a loop when I was first starting with C#. Funny how long people could search for an error, whether it be as simple as a variable case not matching etc. Visual studio sure helps you figure out the problem before you get too far, which is nice.
April 13th, 2005 at 6:31 pm
What about spelling sensitivity? “develoeprs” :)
April 18th, 2005 at 1:38 pm
Funny but True (and sad) Story:
I recently took a colleagues advice to start coding .net apps in c# (this after years of coding in vb). Started my first c# app. What, the heck!? What happened to Intellisense? It isn’t doing the Ini Caps thing. Then it dawns on me (here in NE we say, “light dawns on Marblehead”). Stomp over to my buddy’s cube. “What kind of development tool is this?? It makes me actually use the shift key??”
September 25th, 2005 at 10:10 pm
i don’t understand how to enter a case-sensitive code
March 28th, 2006 at 6:57 am
tttt