الأحد، 26 أكتوبر 2008

How to Read Configuration Schema 2

Element Schema

Every element is defined in a corresponding <element> XML element in the schema. Elements can be nested. An element is simply a container for other attributes, or sub-elements. It must have a name and it may serve as a container of default values for collection elements (for example, siteDefaults holds the default values for sites in the <sites> collection).
<ELEMENT>
name="" [String, Required] [XML name of the element]
isCollectionDefault="false" [bool] [Indicates if default values are held for other elements in this collection]
/>

Collection Schema

Every collection is defined in a corresponding <collection> XML element in the schema. Collections contain multiple elements, which can be added and removed from it individually. Typically the collection directive names are "add", "remove" and "clear", but some collections use different names for clarity (for example, the collection is using "site" instead of "add"). This is done by specifying values for addElement, removeElement and clearElement in the collection schema. If a collection directive is missing from the schema, the collection will not support it. The collection schema may specify the name of a default element, that will be used as a container of default values for collection elements (this complements isCollectionDefault in the element schema).

For example, the collection is using siteDefaults as the default element. Most collections append elements as they merge configuration files down the namespace, but some may specify mergeAppend="false" in the schema to have a prepend behavior. For example, consider two levels of configuration: applicationHost.config and web.config in a site.

<myCollection>
<add value="1"/>
</myCollection>
In web.config:
<myCollection>
<add value="2"/>
</myCollection>

If the collection appends, its merged (effective) configuration at the site level will be:

<myCollection>
<add value="1"/>
<add value="2"/>
</myCollection>
However, if it prepends, it will be:
<myCollection>
<add value="2"/>
<add value="1"/>
</myCollection>

Some collections may allow duplicate entries by specifying allowDuplicates="true" in their schema. This is mostly done to support legacy collections in the .NET framework (in machine.config).

Some collections may allow additional attributes in them, beyond those specified in the schema. This is done by specifying allowUnrecognizedAttributes="true" in their schema. It is mostly done to support provider-based collections in the .NET framework.

How to Read Configuration Schema

Configuration schema file for IIS settings: %windir%\system32\inetsrv\config\schema\IIS_Schema.xml.

The schema for each configuration section is defined in an XML element. There is no schema definition for section groups. The following format is used here to explain how to read the schema:

<attribute-name>="<default-value>" [<metadata>] [<description>]

<attribute-name> is the name of the configuration attribute, as it appears in XML. Every attribute must have a name.

<default-value> is the value used by default, if no other value is specified in the XML for the attribute. Not all attributes have default values (for example, site name). In this case, the syntax will be "".

<metadata> contains several items:

  • The runtime type of the attribute. This is one of "bool", "enum", "flags", "int", "int64", "String", "timeSpan". Every attribute must have a type.
  • "bool" is "true" or "false".
  • "enum" is a set of possible values, where only one of them can be set for the attribute. Every such value has a numerical value and a friendly name. The syntax is using the character "|" as a delimiter between the friendly names: value1|value2|…|valueN.
  • "flags" is similar to "enum", except that combinations of values are allowed. Therefore the numerical values should be in multiples of 2, so they can be ORed together to form combinations. The syntax is identical to "enum": value1|value2|…|valueN.
  • "int" is a 32 bit integer.
  • "int64" is a 64 bit integer.
  • "String" is a character string.
  • "timeSpan" is a representation of a time unit, similar to the managed-code type TimeSpan. It can be persisted as a number (representing seconds, or minutes); or as a formatted string in the form of "[dd:]hh:mm:ss". The "[dd:]" element represents an optional number of days. The other elements represent numbers of hours, minutes and seconds, respectively. The "timeSpanFormat" attribute specifies which format should be used: number of seconds, number of minutes, or a formatted string.
  • Required attributes are marked "Required". It means that a value for them must be set in the XML. For example, site name is a required attribute (every site must have a name in IIS 7.0).
<description> is a short description of the attribute.

Section Schema

The <sectionSchema> XML element is the base unit of schema information. All other schema information is specified within it. It has one attribute directly in it ("name"), and then the rest of the schema is in sub-elements within it.

Attribute Schema

Every attribute is defined in a corresponding <attribute> XML element in the schema. The <attribute> element may be in the <sectionSchema> element directly (if the attribute is in the section scope); or in the element (if the attribute is in a sub-element within the section); or in the <collection> element (if the attribute is in a collection within the section).
An attribute schema must specify a name and a runtime type for the attribute. It may mark the attribute as required. It may mark the attribute as the unique key (if inside a collection), or as part of a collection key (together with other attributes). It may specify a default value for the attribute. It may mark the attribute for automatic encryption on-disk. It may specify if the word "Infinite" is allowed as a value for the attribute (only for numeric types such as int and in64, and for timeSpan). It may specify the timespan format (seconds, minutes or formatted string) for timespan attributes. It may specify validation rules for the attributes (see Attribute Validation section below in this document).
 <ATTRIBUTE
name="" [String, Required] [XML name of the attribute] type="" [bool|enum|flags|int|int64|string|timeSpan, Required][Runtime type]
required="false" [bool] [Indicates if must be set]
isUniqueKey="false" [bool] [Serves as the collection key]
isCombinedKey="false" [bool] [Part of a multi-attribute key]
defaultValue="" [String] [Default value or comma-delimited flags]
encrypted="false" [bool] [Indicates if value persisted is encrypted]
allowInfinite="false" [bool] [Indicates if "Infinite" can be set]
timeSpanFormat="string" [string|seconds|minutes] [hh:mm:ss or number]
validationType="" [See validation below]
validationParameter="" [See validation below]

/>

How to backup / restore IIS7 configuration

Backup/Restore via the command line
Backing up IIS7 configuration is as simple as copying the \windows\system32\inetsrv\config directory (and subdirectories) into a backup directory, so you don't need anything special to do it. Just include this directory in whatever your OS/content back-up plan is, or write a custom script to do it.
To help make managing backups easy, we've added a simple cmd-line option to AppCmd.exe that makes management of backup/restore sets easy. For example, to backup configuration, run the follow command:
> %windir%\system32\inetsrv\appcmd.exe add backup "My Backup Name"
to restore that backup, run this command:
> %windir%\system32\inetsrv\appcmd.exe restore backup "My Backup Name"
to delete a backup, run this command:
> %windir%\system32\inetsrv\appcmd.exe delete backup "My Backup Name"

Pretty easy, eh? Except for the dirty little secret everyone knows...remembering to do a backup! Thankfully, IIS7 comes to the rescue here. Thanks to a feature called IIS7 configuration history, IIS will automatically make history snapshots of ApplicationHost.config each time a change is detected, enabling you to easily restore to a prior version. By default, IIS checks for a new version every 2 mins, and will keep 10 prior versions of the file. IIS7 stores these snapshots in the %systemdrive%\inetpub\history folder by default. You can change any of these settings by editing the <system.applicationHost/configHistory> section in ApplicationHost.config.

IMPORTANT NOTE: This feature only appears in Windows Server 2008 and Vista SP1. It is not in original release version of Vista , as it was not yet finished when Vista first shipped. This is one of the thousands of changes that was made to IIS7 after Vista RTM, and is one of many reasons you should install SP1 as soon as possible!
How do you restore a prior snapshot? Well, you could just go to the \inetpub\history\cfgHistory_NNNNNNNNNN directory and copy the applicationHost.config file into it's proper place: \windows\sytem32\inetsrv\config. Or you can use the same command as above for restoring a backup to restore a configuration history file.
To enumerate a list of backups and configuration history files, use the following command:
> %windir%\system32\inetsrv\appcmd.exe list backup

الجمعة، 24 أكتوبر 2008

How To Choose The Best Voip Provider For Your International Calling Needs

Broadband phone service is so popular because it's cheap - this is why millions of people are disconnecting their traditional land-line service in favor of VoIP (this is the technical term for internet phone service). Once you decide to switch to internet phone service, you'll need to decide on the best VoIP provider for your domestic and international calling needs. There are three main things to consider when choosing a VoIP provider for local and international calling:
1 - The reputation of the VoIP company
2- Does the VoIP provider have the right plan for your needs?
3 - International long distance rate to your particular destination/s
 
Finding the Best VoIP Providers
The first step in choosing a broadband phone service provider is narrowing down the field of choices to only the best VoIP companies. There are several VoIP providers to choose from, including your local cable company.
Telephone service is very important, and it's extremely important that the VoIP provider you choose provides a high level of reliability and excellent call quality. You also want to be sure that the VoIP company you choose offers excellent and fast technical support. When you switch from dependable (but expensive) land line phone service to internet phone service, the last thing you want is to have problems making or receiving calls - so it's important to choose only a highly-rated broadband phone company!
 
Cable Company VoIP
Your local cable company probably offers internet phone service too, and they should also be considered when choosing the best VoIP provider for your particular needs. Although digital phone service (this is what the cable companies call VoIP - it's still internet phone service) is known to be very reliable, the disadvantage is that it usually costs twice as much! Cable companies usually purchase VoIP service from a true VoIP provider and resell it to you. Because they have to make a profit, they have to charge you more. You can get the same high-quality digital phone service directly from a VoIP company for about 50% less than the cable company charges!
 
Deciding What Type of VoIP Plan You Need
Do you typically make a lot of phone calls? Do you want to be able to keep in touch with friends and loved ones who live far away? Do you want the luxury of being able to talk long distance for hours at a time for free? How many minutes a month are spent making international calls? When calling internationally, which countries do you call? These are questions you should ask yourself before comparing VoIP providers, as your answers define what you really need out of VoIP service.
If you want to make all the local and long distance calls you want within the US, Canada and Puerto Rico, consider getting an unlimited plan. Although this won't give you free international calls, international long distance rates are really cheap with internet phone service. For the absolute best value with an unlimited calling plan, choose an annual plan. With this type of plan, you pay for a whole year of service up front (usually around $200) and get a great price break!
If you want to make free unlimited international calls, consider getting an unlimited international calling plan. Although a bit more expensive than a domestic unlimited calling plan, this will allow you to talk to overseas family and colleagues without incurring any international long distance charges.
If you don't make many calls, your best bet may be to get a limited monthly VoIP plan and then"pay as you go" for international long distance calls. This will be about half the cost of an unlimited plan, and you'll get a set number of monthly minutes.
 
Compare International Long Distance Rates
International long distance calling rates are so low with VoIP that you'll be pleasantly surprised at how much you can talk for so little money! Rates vary among VoIP companies though, so be sure to compare each provider's international rate for the countries you call before deciding on the best VoIP provider for your needs.



Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy! Try it!