Home > Articles > Programming > ASP .NET

This chapter is from the book

This chapter is from the book

System.Configuration and System.Web.Configuration Namespaces

Because the configuration files are XML, you probably have already envisioned different ways to access the files and work with the settings in them. It just so happens that you don't have to start coding a custom configuration file reader yet because a rich API already exists for working with the configuration system files.

The .NET Framework supplies classes for working with configuration files in the System.Configuration and System.Web.Configuration namespaces. As you can infer from their names, the System.Web.Configuration namespace is designed to support the web.config file, and the System.Configuration namespace contains classes that support the configuration system as a whole. Take a look at the classes that are available in these namespaces and the methods they provide.

System.Configuration

The System.Configuration namespace contains the classes that are used to programmatically access .NET Framework configuration files. It also supplies objects for providing custom section handlers and handling errors in configuration files. The System.Configuration namespace provides the classes that are shown in Table 7.9.

Table 7.9 Classes of the System.Configuration Namespace

Class Name

Description

AppSettingsReader

Provides a single method for reading a value from the appSettings section.

ConfigurationException

Represents the exception thrown due to an error in a configuration file section. Provides methods for serializing the exception and determining the source configuration file and the source line number of the section node in the file.

ConfigurationSettings

Provides access to the configuration settings in a specified section.

DictionarySectionHandler

Reads key-value pair information for a section.

IgnoreSectionHandler

Provides a section handler for sections read and handled by systems other than System.Configuration.

NameValueSectionHandler

Defines a section handler for providing name-value section information.

SingleTagSectionHandler

Defines a section handler for providing access to attributes in a section.


In addition to the classes defined, the System.Configuration namespace also includes a single interface definition, IConfigurationSectionHandler. This interface is required for defined section handlers. The following classes support this interface:

  • DictionarySectionHandler

  • IgnoreSectionHandler

  • NameValueSectionHandler

  • SingleTagSectionHandler

Reading Custom Settings

The configuration file API provides a set of APIs for retrieving settings that are defined in the appSettings section, as well as for retrieving settings from custom sections. Two main methods of retrieving custom values from the appSettings section exist: using the AppSettingsReader class and using the ConfigurationSettings class.

The AppSettingsReader class supports one basic method, GetValue, which gets a single value based on its key from the configuration system.

The ConfigurationSettings class exposes two methods:

  • AppSettings—Retrieves a custom setting from the appSettings section.

  • GetConfig—Retrieves a custom setting from a custom section.

The code for retrieving application settings using the ConfigurationSettings.AppSettings class is similar to the code that uses the AppSettingsReader class. However, there's one main difference: If the key is not found in the configuration file using the ConfigurationSettings.AppSettings class, no error is thrown. This contrasts the AppSettingsReader, which throws an error if the specified key doesn't exist.

Listing 7.5 demonstrates how each method can easily be used by using the sample web.config file that was defined in Listing 7.1.

Listing 7.5 Reading Values from appSettings

<%@ Import Namespace="System.Configuration"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
   <HEAD>
     <title>Custom appSettings</title>
     <script language="vb" runat="server" >
        Private Sub Button_Click(ByVal sender As System.Object, ByVal
e As System.EventArgs) Try If Me.optConfigurationSettings.Checked Then lblResults.Text = "The startup table value is:
" & ConfigurationSettings.AppSettings
(txtKey.Text) Else Dim reader As AppSettingsReader = New
AppSettingsReader() lblResults.Text = "The value is: " &
reader.GetValue(txtKey.Text, GetType(String)) End If Catch generalExcep As System.Exception lblResults.Text = generalExcep.ToString() End Try End Sub </script> </HEAD> <body> <form runat="server"> <asp:textbox
id="txtKey" style="LEFT: 150px; POSITION: absolute;
TOP: 14px" runat="server" /> <asp:label
id="lblKey" style="LEFT: 10px; POSITION: absolute;
TOP: 15px" runat="server">
Enter the value key:</asp:label> <asp:radiobutton
id="optConfigurationSettings"
style="LEFT: 41px; POSITION: absolute; TOP: 63px"
runat="server" Width="186px"
Text="ConfigurationSettings.AppSettings"
Checked="True"
GroupName="method"></asp:radiobutton> <asp:radiobutton
id="optAppSettingsReader"
style="LEFT: 41px; POSITION: absolute; TOP: 89px"
runat="server" Width="186px"
Text="AppSettingsReader.GetValue"
GroupName="method"></asp:radiobutton> <asp:button
id="Button1"
style="LEFT: 55px; POSITION: absolute; TOP: 138px"
runat="server" Width="103px"
Text="Button" Height="29px" OnClick="Button_Click">
</asp:button> <asp:Label id="lblResults" runat="server"
Width="360px" Height="37px"
style="LEFT: 13px; POSITION: absolute; TOP: 203px">
</asp:Label> </form> </body> </HTML>

Run the code in Listing 7.5 and enter the value startupTable in the text box. Choose either access method and click the button: You will receive the value Customers. Next, enter a value of foo in the textbox and try this value with each method. The ConfigurationSettings.AppSettings option does not generate an error, while the AppSettingsReader method shows that an error occurred.

Creating Configuration Sections

Instead of defining many single tags, you can find that you need to persist a more complex structure. The web.config file also supports the creation of custom tags and groups by using the configSections element.

The configSections element defines the section names that appear in the configuration system. Open your machine.config file and look at the configSections section: Look familiar? This is where the sections discussed throughout this chapter are defined. Take a look at the components of the configSections section and its child elements.

The configSections element supports the following child elements:

  • section—Defines a configuration section. This element is discussed in more detail in the following section.

  • sectionGroup—Defines a grouping or namespace of configuration sections. Can contain other sectionGroup or section elements. Each sectionGroup element must have a name attribute that defines it.

  • remove—Removes a section or group defined higher in the configuration hierarchy. For example, if a section was defined in machine.config, it can be suppressed at the application level by using the remove element in web.config. Has the same effect as clear, but suppresses only a single element.

  • clear—Clears all predefined sections and groups. If the section or group was defined in machine.config, it can be suppressed at the application level by using the clear element. clear the same effect as remove, but it works on multiple elements at once.

section

The section defines a section within the configuration hierarchy. The section element supports the attributes listed in Table 7.10.

Table 7.10 Attributes of the section Element

Attribute Name

Use

Description

name

Required

Specifies the name for the configuration section.

type

Required

Specifies the type of section handler used to read the settings for the section.

allowDefinition

Optional

Specifies which configuration file the section can be used in. Possible values are

  • Everywhere (default)—Allows the section to be used in any configuration file.
  • Everywhere (default)—Allows the section to be used in any configuration file.
  • MachineOnly—The section can only be used in the machine.config file.
  • MachineToApplication—The section can appear in machine.config or the application configuration file (web.config).

allowLocation

Optional

Determines if the section can be used within the location element (true by default).


In Table 7.10, one of the required attributes for the section element is the type attribute. type follows this form:

configuration section handler class, assembly 
             [, Version, Culture, PublicKeyToken]

The configuration section handler portion of the value is any class that implements the IConfigurationSectionHandler interface. As previously mentioned, the System.Configuration namespace provides a set of classes that support this interface (DictionarySectionHandler, IgnoreSectionHandler, NameValueSection Handler, or SingleTagSectionHandler).

The assembly is the managed assembly to which the handler belongs. For example, the DictionarySectionHandler class is part of the System assembly. This can be verified by going to the Object browser and viewing the hierarchy to which the class belongs.

If the Global Assembly Cache manages the assembly, you also need to include the Version, Culture, and PublicKeyToken values. You can find these settings by going to the .NET Configuration MMC snap-in, double-clicking the assembly name, and copying the values from the dialog box. You can also determine this information by going to the .NET command prompt and running the gacutil.exe utility.

Listing 7.6 demonstrates how to define a custom group and section.

Listing 7.6 A Sample config.web File with Custom Sections Defined

<?xml version="1.0" encoding="utf-8" ?>
<configuration>

  <configSections>
   <sectionGroup name="databases">
      <section name="SQLServer"
         type="System.Configuration.NameValueSectionHandler, System,
Version=1.0.3300.0, Culture=neutral, PublicKeyToken=
b77a5c561934e089" /> </sectionGroup> </configSections> <databases> <SQLServer> <add key="Northwind" value="User ID=sa;Password=;Initial
Catalog=Northwind;Data Source=localhost" /> <add key="Pubs" value="User ID=sa;Password=;Initial Catalog=pubs;Data
Source=localhost" /> </SQLServer> </databases> <system.web> <compilation defaultLanguage="vb" debug="true" /> </system.web> </configuration>

Backup your web.config file and save the sample file from Listing 7.6 as web.config in your local project. Then add the web form that's found in Listing 7.7.

Listing 7.7 Reading Custom Configuration Sections

<%@Import Namespace="System.Collections.Specialized"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
 <head>
  <title>Custom Sections Demo</title>
   <script language="vb" runat="server">
     Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Dim config As NameValueCollection =
ConfigurationSettings.GetConfig("databases/SQLServer") Response.Write("The Northwind connection string: " &
config("Northwind") & "<br>") Response.Write("The Pubs connection string: " & config("Pubs")
& "<br>") End Sub </script> </head> <body> </body> </html>

Again, make sure to check the value of the PublicKeyToken property in the type attribute to ensure that it matches the value found in your Global Assembly Cache.

System.Web.Configuration

The primary class in the System.Web.Configuration namespace is the HttpBrowserCapabilities class. As you saw in Listing 7.5, this class determines browser capabilities. Table 7.11 details the additional properties available for this class.

Table 7.11 Properties of the System.Web.HttpBrowserCapabilities Class

Property Name

Description

ActiveXControls

Indicates if the browser supports ActiveX controls.

AOL

Determines if the user is an AOL client.

BackgroundSounds

Indicates if the browser supports background sounds.

Beta

Indicates if the browser is a beta release.

Browser

Gets the browser string (if any) transmitted in the User-Agent header.

CDF

Indicates if the browser supports Channel Definition Format (CDF) for webcasting.

ClrVersion

Gets the CLR version number installed on the client.

Cookies

Indicates if the browser supports cookies.

Crawler

Indicates if the browser is a web crawler search engine.

EcmaScriptVersion

Gets the number of the ECMA script version supported by the client.

Frames

Indicates if the browser supports HTML frames.

Item

Gets the value of the specified browser capability.

JavaApplets

Indicates if the browser supports Java applets.

JavaScript

Indicates if the browser supports JavaScript.

MajorVersion

Gets the major version number of the browser.

MinorVersion

Gets the minor version number of the browser.

MSDomVersion

Gets the number of the Microsoft HTML DOM version supported by the client.

Platform

Gets the name of the client platform.

Tables

Indicates if the browser supports HTML tables.

Type

Gets the name and major version number of the browser.

VBScript

Indicates if the browser supports Visual Basic Scripting (VBScript).

Version

Gets the full version number for the browser.

W3CDomVersion

Gets the number of the World Wide Web Consortium (W3C) XML DOM version supported by the client.

Win16

Indicates if the client is a Win16-based computer.

Win32

Indicates if the client is a Win32-based computer.


Take a look at a practical use for storing custom configuration settings for the application and for creating custom sections. One way that this configuration system is useful is by allowing you to alter a site's look, feel, and content for different customers that use the same application.

For example, suppose that you have one base application being used by two companies simultaneously. Instead of coding the same application twice or hosting the same application in two separate locations, they can share the same set of servers. Additionally, you have the capability of moving their site content around your server without requiring extensive search and replace operations throughout the source code.

Here's a sample web.config file that uses the appSettings section to define application-wide settings (here, it is a shared database). You can also create a custom section, customers, that stores grouped information per customer. Listing 7.8 shows the necessary entries in the web.config file.

Listing 7.8 A Sample web.config File that Shows Custom Settings

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <configSections>
   <sectionGroup name="customers">
        <section name="ALFKI"
          type="System.Configuration.NameValueSectionHandler,
System, Version=1.0.3300.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089"/> <section name="ANATR" type="System.Configuration.NameValueSectionHandler,
System, Version=1.0.3300.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089" /> </sectionGroup> </configSections> <appSettings> <add key="connectionString" value="User ID=sa;Password=;Data
Source=localhost;" /> </appSettings> <customers> <ALFKI> <add key="Initial Catalog" value="Northwind" /> <add key="Styles" value="futterkiste.css" /> <add key="XSLT" value="main.xslt" /> <add key="Directory" value="Alfreds" /> </ALFKI> <ANATR> <add key="Initial Catalog" value="Northwind" /> <add key="Styles" value="trujilio.css" /> <add key="XSLT" value="layout.xslt" /> <add key="Directory" value="Trujilio" /> </ANATR> </customers> <system.web> <compilation defaultLanguage="vb" debug="true" /> </system.web> </configuration>

This web.config file contains the custom sections ALFKI and ANATR within the customers namespace. Within each one of these tags, the following keys are defined:

  • Initial Catalog—Defines the initial catalog for the SQL Server database.

  • Styles—Defines the cascading stylesheet filename this customer uses for site colorization.

  • XSLT—Defines the XSLT stylesheet filename this customer uses for site layout.

  • Directory—Defines the directory where the customer's files reside, relative to the current path.

You then create subdirectories for each customer that contains the files. These folder names must match the names specified in the Directory key. We also create the CSS and XSLT files specified for each customer. Listing 7.9 shows the CSS file used for customer ID ALFKI in the Northwinds database, and Listing 7.10 shows the XSLT file.

Listing 7.9 Contents of alfreds/futterkiste.css

body
{
   color: black;
   font-family: Verdana, Tahoma, Sans-Serif;
   border-collapse: collapse;
   background-color: white;
}

.contactHeader
{
   font-weight: bold;
   font-size: 10pt;
   color: blue;
   font-family: 'Comic Sans MS';
   border-collapse: collapse;
}

Listing 7.10 Contents of alfreds/main.xslt

<
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
   <xsl:output method="html" encoding="ISO-8859-1"
doctype-public="-//W3C//DTD HTML 4.0 Transitional//EN" /> <xsl:param name="css" select="'styles.css'"/> <xsl:template match="/"> <link rel="stylesheet" type="text/css"> <xsl:attribute name="href">
<xsl:value-of select="$css"/>
</xsl:attribute> </link> <h1> <xsl:value-of select="Customers/CompanyName" /> </h1> <xsl:apply-templates /> <br/> <br/> <br/> <a href="choose.htm">Click here to choose again</a> </xsl:template> <xsl:template match="Customers"> <table border="0"> <tr> <th>Customer ID</th> <th>Contact Name</th> <th>Contact Title</th> <th>Phone</th> </tr> <tr> <td class="contactHeader"> <xsl:value-of select="CustomerID" /> </td> <td class="contactHeader"> <xsl:value-of select="ContactName" /> </td> <td class="contactHeader"> <xsl:value-of select="ContactTitle" /> </td> <td class="contactHeader"> <xsl:value-of select="Phone" /> </td> </tr> </table> </xsl:template> </xsl:stylesheet>

In Listing 7.10, you use a parameter for the stylesheet to dynamically locate the stylesheet file. Remember: The context page is the page that performs the transformation, so the path will be relative to this page (this is revisited in a moment).

Listing 7.11 shows the CSS file that's used for customerID ANATR, while Listing 7.12 shows the XSLT file for the customer.

Listing 7.11 Contents of trujilio/trujilio.css

body
{
   font-size: smaller;
   color: black;
   font-family: Verdana, Tahoma, Sans-Serif;
   border-collapse: collapse;
   background-color: gray;
}

.contactHeader
{
   font-weight: bold;
   font-size: 10pt;
   color: white;
   font-family: 'Comic Sans MS' , Verdana, Tahoma, Sans-Serif;
   border-collapse: collapse; 
}

Listing 7.12 Contents of trujilio/layout.xslt

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
   <xsl:output method="html" encoding="ISO-8859-1" doctype-public="-
//W3C//DTD HTML 4.0 Transitional//EN" /> <xsl:param name="css" select="'styles.css'"/> <xsl:template match="/"> <link rel="stylesheet" type="text/css"> <xsl:attribute name="href">
<xsl:value-of select="$css"/>
</xsl:attribute> </link> <h1> <xsl:value-of select="Customers/CompanyName" /> </h1> <xsl:apply-templates /> <br/> <br/> <br/> <a href="choose.htm">Click here to choose again</a> </xsl:template> <xsl:template match="Customers"> <table border="0"> <tr> <td class="contactHeader">Customer ID:</td> <td><xsl:value-of select="CustomerID" /></td> </tr> <tr> <td class="contactHeader">Contact Name:</td> <td><xsl:value-of select="ContactName" /></td> </tr> <tr> <td class="contactHeader">Contact Title:</td> <td><xsl:value-of select="ContactTitle" /></td> </tr> <tr> <td class="contactHeader">Phone:</td> <td><xsl:value-of select="CustomerID" /></td> </tr> </table> </xsl:template> </xsl:stylesheet>

Now that you have seen the XSLT and CSS files associated with each customer, you can build a generic page that displays the contents for each customer based on their customer ID. Listing 7.13 lists the .aspx code that's used to generically display pages for different customers.

Listing 7.13 -WebForm2.aspx: A Generic Page Display Application that Leverages the web.config File

<%@ Import Namespace="System.Collections.Specialized"%>
<%@ Import Namespace="System.Data"%>
<%@ Import Namespace="System.Data.SqlClient"%>
<%@ Import Namespace="System.Xml"%>
<%@ Import Namespace="System.Xml.Xsl"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
   <HEAD>
     <title>CoBranding Sample</title>
     <script language="vb" runat="server">
        Private Sub Page_Load(ByVal sender As System.Object, ByVal e
As System.EventArgs) Dim customerID As String customerID = Request.Form.Item("customer") Dim config As NameValueCollection =
ConfigurationSettings.GetConfig("customers/" +
customerID) Dim args As XsltArgumentList = New XsltArgumentList() args.AddParam("css", String.Empty,
config.Item("Directory") + "/" + config.Item("Styles")) Dim appReader As AppSettingsReader = New
AppSettingsReader() Dim connectionString As String =
appReader.GetValue("connectionString",
GetType(System.String)) connectionString += "Initial Catalog=" +
config.Item("Initial Catalog") Dim connection As SqlClient.SqlConnection = New
SqlClient.SqlConnection() connection.ConnectionString = connectionString Dim command As SqlClient.SqlCommand = New
SqlClient.SqlCommand() connection.Open() command.Connection = connection command.CommandText = "SELECT * FROM Customers WHERE
CustomerID='" + customerID + "' FOR XML AUTO,ELEMENTS" command.CommandType = CommandType.Text Dim reader As XmlTextReader reader = command.ExecuteXmlReader() Dim strXML As String Do While reader.Read() strXML += reader.ReadOuterXml() Loop reader.Close() connection.Close() connection.Dispose() command.Dispose() Xml1.TransformArgumentList = args Xml1.DocumentContent = strXML Xml1.TransformSource = config.Item("Directory") + "/" +
config.Item("XSLT") End Sub </script> </HEAD> <body MS_POSITIONING="GridLayout"> <form id="Form1" method="post" runat="server"> <asp:xml id="Xml1" runat="server" /> </form> </body> </HTML>

Let's walk through the sample application. When the page is loaded, the Page_Load event is fired. You retrieve the customer ID value from the customer form element and use that value as the basis for retrieving the custom configuration section. You then read from that section to find the CSS file location and add that value as a parameter for the XSLT transformation. The database connection string is read from the appSettings section, and the customer's individual initial catalog is applied to the connection string.

XML is retrieved from SQL Server using the FOR XML clause (see Chapter 9, "SQL Server 2000 and XML," for more information on the FOR XML clause). The returned XML string is used as the source for the <asp:xml> control on the form, and the list of parameters is added to the control. Finally, you locate the XSLT file for the particular customer, and the page is displayed.

To test the application, build a simple driver HTML page to call the test application. Listing 7.14 shows the sample driver page.

Listing 7.14 Choose.htm: A Simple Driver Page Used to Test the Application

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Choose Customer</title>
</head>
<body MS_POSITIONING="GridLayout">
   <form action="webform2.aspx" method="post">
     <select name="customer">
        <option value="ALFKI">Alfreds Futterkiste</option>
        <option value="ANATR">Ana Trujilio</option>
     </select>
     <br/>
     <input type="submit" value="Load CoBranding">
   </form>

</body>
  </html>

This sample driver file simply posts the customer ID to the page described in Listing 7.13. Compare the results in Figures 7.3 and 7.4 to see that the XSLT file is applied differently per customer ID.

Figure 7.3 Using customer ID ALFKI, you can apply the XSLT and CSS files to the XML data for the customer based on the settings in the web.config file.

Figure 7.4 Viewing data for customer ID ANATR displays the same data, but using a different stylesheet and CSS file as specified in the web.config

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020