Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Case Sensitive of elements in web.config and app.config files

Posted on 2014-02-14
3
Medium Priority
?
2,776 Views
Last Modified: 2014-02-21
Are elements of a web.config and app.config case sensitive?

If so, are they just case sensitive in a sense where the open tag and closing tag must match - case wise? They don't need to be upper or lower but just match in case sensitivity sense.


<element1>
</element1>
0
Comment
Question by:metro156
  • 2
3 Comments
 
LVL 21

Expert Comment

by:Craig Wagner
ID: 39859974
The general answer to your question is that XML is case sensitive.

For example, the <connectionStrings> element must contain <add>, <remove>, or <clear> elements. If you put in an <Add> element the application will throw an exception.

Finally, an opening tag of <element> will not match a closing tag of <ELEMENT>.
0
 

Author Comment

by:metro156
ID: 39860038
So are you saying in certain elements like <add>, <remove>, <clear> they have to be lower case no matter what?

However, elements outside of those elements must be matching in case. It doesn't matter if they are both lower or both upper as long as they match opening and closing tags.
0
 
LVL 21

Accepted Solution

by:
Craig Wagner earned 1500 total points
ID: 39860355
So are you saying in certain elements like <add>, <remove>, <clear> they have to be lower case no matter what?

I thought it was pretty clear that's what I said, but let me repeat, <add> good, <Add>, <aDd>, <adD>, <ADD> bad.

XML is case sensitive. web.config is XML. End of story.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question