XML-Based Configuration Files

for RuBoard

First, the chapter will review the basics regarding .NET configuration files. It's like the old saying goes, "In order to break the rules, you have to know the rules." This section will provide an overview of what is essential to using the config file type to manage your applications that run under IIS, and how to control certain aspects of behavior that typically have been managed by IIS. It is important to remember that all of these files are not only case sensitive, but use what's called camel casing . Camel casing specifies that the first letter of the first word of each section must be lowercase and the first letter of any concatenated words must be uppercase. For example, if we were going to define a section called "My Configuration Section" the correct syntax would be <myConfigurationSection/> . The only exceptions to this rule are the reserved words true and false ”they must always be lowercase. Additionally, any attribute values must carry what's referred to as Pascal case. Pascal case specifies that not only is the first letter of a word used to define an attribute uppercase, so is the first letter of any word concatenated to that name . Based on our previous example, the correct syntax would look like <MyConfigurationSectionAttribute/> .

NOTE

It is important to note up front that what is established within a configuration file, such as web.config , as far as file access, is only applicable to files that are processed by the aspnet_isapi.dll filter (such as aspx and asmx ). What this means is should you attempt to use web.config to secure a directory of .jpg files and have directory browsing turned on, all users will still be able to see them. This is where IIS security comes in to play. This is discussed later in this chapter in the "IIS Security Settings ”A Refresher" section.


for RuBoard


. NET Framework Security
.NET Framework Security
ISBN: 067232184X
EAN: 2147483647
Year: 2000
Pages: 235

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net