PK
-Aoa, mimetypeapplication/epub+zipPK -A iTunesMetadata.plistn
Oracle Providers for ASP.NET is part of Oracle Data Access Components (ODAC), which can be downloaded from OTN. Beginning with ODAC 11.1.0.6.20, Oracle Providers for ASP.NET can be installed through XCopy or Oracle Universal Installer.
XCopy
Administrators use XCopy to deploy Oracle Providers for ASP.NET to a large number of computers for production deployments. It has a small footprint and fine grain control during installation and setup.
Oracle Universal Installer
Developers or users use Oracle Universal Installer for automatic GUI installation. It includes documentation and code samples that are not part of XCopy deployment.
Note: This section describes installation using the Oracle Universal Installer. For the XCopy installation instructions and configuration, refer to the README file that is part of that installation. |
When Oracle Providers for ASP.NET are installed, Oracle Universal Installer automatically registers Oracle.Web.dll
with the Global Assembly Cache (GAC).
The Oracle Providers for ASP.NET installation creates entries in the machine.config
file of the computer on which it is installed. These entries provide basic configuration information for the Oracle Membership, Profile, Role, Site Map, Web Parts Personalization, and Web Event Providers. The machine.config
includes a blank connection string for OraAspConString
, which a developer can configure to connect to an Oracle database with the Oracle Providers for ASP.NET schema.
Additionally, Oracle Providers for ASP.NET Dynamic Help is registered with Visual Studio, providing context-sensitive online help that is seamlessly integrated with the Visual Studio Dynamic Help. With Dynamic Help, the user can access Oracle Providers for ASP.NET documentation within Visual Studio by placing the cursor on an Oracle Providers for ASP.NET keyword and pressing the F1 function key.
Once you have installed Oracle Providers for ASP.NET, two additional setup tasks are required, as follows:
The following sections explain how to configure the providers:
To set up the Oracle database, database administrators must grant the following database privileges to the Oracle Providers for ASP.NET schema. These privileges grant the schema privileges to create the tables, views, stored procedures, and other database objects the Oracle Providers for ASP.NET require. These scripts must be run against the database from which the ASP.NET providers will retrieve their stored state information. These SQL scripts can be run using SQL*Plus or within Oracle Developer Tools for Visual Studio.
Oracle Providers for ASP.NET requires the following privileges during setup:
Change notification
Create job
Create procedure
Create public synonym
Create role
Create session
Create table
Create view
Drop public synonym
Grant access to and allocate space in an Oracle tablespace
Not all database privileges are required for Oracle Providers for ASP.NET runtime operations. Database administrators may selectively grant and revoke privileges as required. For runtime operations, all providers require that the CREATE
SESSION
privilege be granted to the schema user. In addition, the Site Map and Cache Dependency providers require the CHANGE
NOTIFICATION
privilege during runtime. The remaining privileges can be granted to the schema user just for installation and deinstallation, then revoked for runtime operations.
Errors that occur during the setup script execution may indicate that the user needs to be granted the above privileges. If this is the case, the database administrator must grant these privileges. The Oracle Session State Provider for ASP.NET requires the CREATE JOB
privilege when Oracle Database 10g or later is the database.
To configure all providers in the database at once, run InstallAllOracleASPNETProviders.sql
. This script is found in the ORACLE_BASE\\ORACLE_HOME
\ASP.NET\sql
directory.
To install Oracle Session State Provider with an Oracle Database 9i Release 2, developers must modify the InstallAllOracleASPNETProviders.sql
script to call the appropriate install script for the provider as listed in Table 1-2. This script calls the configuration script for each provider one by one.
Applications may not require all Oracle Providers for ASP.NET. Providers can be set up individually. Except for the Oracle Session State Provider and Oracle Cache Dependency Provider, the following install script must be executed before any other install scripts: InstallOracleASPNETCommon.sql
. Then, for each Oracle Provider for ASP.NET, a SQL script specific for that provider must be executed (in any order).
These install scripts are found in the ORACLE_BASE\\ORACLE_HOME
\ASP.NET\sql
directory.
Table 1-2 ASP.NET Provider Install Scripts
Provider | Required Installation Script |
---|---|
Oracle Membership Provider |
|
Oracle Personalization Provider |
|
Oracle Profile Provider |
|
Oracle Role Provider |
|
Oracle Session State Provider |
For Oracle Database 10g Release 1 and later For Oracle Database 9i Release 2 There are correspondingly named uninstall scripts for these install scripts. Note: This provider only requires the execution of the appropriate provider-specific |
Oracle Site Map Provider |
|
Oracle Web Events Provider |
|
Oracle Cache Dependency Provider |
No script execution needed |
When Oracle Providers for ASP.NET installation scripts run, they execute, in turn, corresponding .plb
scripts that are located in the same directory. The .plb
scripts create the stored procedures and functions that the providers use. The installation .sql
scripts must execute where the .plb
file can be accessed.
Each provider also provides corresponding uninstall scripts to remove database objects that were created from the install scripts. These scripts are prefixed with the word Uninstall
.
The install and uninstall scripts are the same for Oracle Providers for ASP.NET 2.0 and Oracle Providers for ASP.NET 4
Installation configures the machine.config
file to enable Oracle Providers for ASP.NET system-wide.
If both .NET Framework 2.0 and .NET Framework 4 are present, then the installer configures the machine.config
files for both in order to enable Oracle Providers for ASP.NET 2.0 and Oracle Providers for ASP.NET 4 system-wide.
After installation, developers must provide the connection information to the database schema that stores and retrieves the ASP.NET state information. This step requires developers to supply the User
Id
, Password
, Data
Source
, and other connection string information if necessary. In the machine.config
file, developers can provide an entry similar to the example below.
<connectionStrings> <add name="OraAspNetConString" connectionString="User Id=aspnet;Password=aspnet;Data Source=oracle; " /> </connectionStrings>
Optionally, developers can customize the properties of each ASP.NET provider from within the <system.web>
section of the machine.config
.
While Oracle Universal Installer automatically configures the machine.config
, developers can apply more fine grained application-level control over the Oracle Providers for ASP.NET by using the web.config
file. This file overrides entries from the machine.config
file, but only for the specific web application it is a part of. Developers can set up their web.config
file with the same XML syntax as the machine.config
file.
Developers can use standard ASP.NET management tools to configure the Oracle Providers for ASP.NET. Specifically, developers can use the Internet Information Services management console. In the ASP.NET Configuration Settings of the console, developers can modify the Oracle provider settings. Alternatively, in a Web Site project in Visual Studio, the ASP.NET Configuration choice under the Website menu item allows developers to set these settings for their specific Web Site projects.
A standard Oracle Providers for ASP.NET installation automatically sets up machine
.config
with default values, but administrators can modify the setup. Users can use the OraProvCfg
utility to configure the provider-specific entry in the machine.config
file as follows:
Note: To configure Oracle Providers for ASP.NET 2.0, use theOraProvCfg utility under ORACLE_BASE\ORACLE_HOME\ ASP.NET\Bin\2.x.
To configure Oracle Providers for ASP.NET 4, use the |
To display the OraProvCfg
utility help:
OraProvCfg -help
To add Oracle Providers for ASP.NET-specific entries to the machine.config
file:
OraProvCfg /action:config /product:aspnet /component:all /frameworkversion:v2.0.50727 /providerpath:c:\Oracle\odp.net\bin\2.x\Oracle.Web.dll
Where Framework version and Provider path (especially) may need to change accordingly.
To remove the Oracle Providers for ASP.NET-specific entries from the machine.config
file:
OraProvCfg /action:unconfig /product:aspnet /component:all /frameworkversion:v2.0.50727
Where Framework version may need to change accordingly.
The Oracle providers for ASP.NET reside in namespaces contained in one assembly: Oracle.Web.dll
.
Table 1-1 lists the provider types, class names, and namespaces that are part of Oracle.Web.dll
.
Table 1-1 Oracle Providers for ASP.NET Namespaces and Providers
Provider Type | Class Name | Namespace |
---|---|---|
Membership |
OracleMembershipProvider Class |
|
Role |
|
|
Site Map |
|
|
Session State |
|
|
Profile |
|
|
Web Event |
|
|
Personalization |
OraclePersonalizationProvider Class |
|
Cache Dependency |
|
|
This section describes new features in Oracle Providers for ASP.NET.
Oracle Providers for ASP.NET release 11.2.0.1.2 includes the following:
64-bit Oracle Providers for ASP.NET XCopy for Windows x64
Now available for Windows x64 systems, Oracle Providers for ASP.NET XCopy provides system administrators with a smaller client install size than the standard client, and is easier to configure. XCopy simplifies embedding the ASP.NET providers in customized deployment packages.
Oracle Providers for ASP.NET release 11.2.0.1.2 includes the following:
ASP.NET 4 Support
Oracle Providers for ASP.NET 4 supports ASP.NET 4.
The OraclePersonalizationProvider
class enables ASP.NET developers to store Web parts personalization information in an Oracle database.
Class Inheritance
System.Object
System.Configuration.Provider.ProviderBase
System.Web.UI.WebControls.WebParts.PersonalizationProvider
Oracle.Web.Personalization.OraclePersonalizationProvider
Declaration
// C# public class OraclePersonalizationProvider: PersonalizationProvider
Thread Safety
All public static methods are thread-safe, although instance members are not guaranteed to be thread-safe.
Remarks
This class allows ASP.NET applications to store and manage personalization information in an Oracle database.
Example
The following is a web.config
example for an ASP.NET application that uses an OraclePersonalizationProvider
as the default provider. This configuration uses the connection string and default attribute values specified in the machine.config
file.
<?xml version="1.0"?> <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0"> <system.web> <webParts> <personalization defaultProvider="OraclePersonalizationProvider"/> </webParts> </system.web> </configuration>
The following is a web.config
example for an ASP.NET application that uses an OraclePersonalizationProvider
as the default provider, with customized settings and an application-specific connection string:
<?xml version="1.0"?> <configuration xmlns= "http://schemas.microsoft.com/.NetConfiguration/v2.0"> <connectionStrings> <add name="my_personalization_app_con_string" connectionString= "User Id=scott;Password=tiger;Data Source=Oracle"/> </connectionStrings> <system.web> <webParts> <!-- Enable and customize OraclePersonalizationProvider --> <personalization defaultProvider="CustomOraclePersonalizationProvider"> <providers> <add name="CustomOraclePersonalizationProvider" type="Oracle.Web.Personalization.OraclePersonalizationProvider, Oracle.Web, Version=2.112.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342" connectionStringName="my_personalization_app_con_string" applicationName="my_personalization_app"/> </providers> </personalization> </webParts> </system.web> </configuration>
Note that the applicationName
attribute should be set to a unique value for each ASP.NET application.
Requirements
Namespace: Oracle.Web.Personalization
Assembly: Oracle.Web.dll
Oracle Providers for ASP.NET Version: Oracle Providers for ASP.NET 2.0 and Oracle Providers for ASP.NET 4
OraclePersonalizationProvider
members are listed in the following tables.
OraclePersonalizationProvider Constructors
The OraclePersonalizationProvider
constructor is listed in Table 8-1.
Table 8-1 OraclePersonalizationProvider Constructor
Constructor | Description |
---|---|
Instantiates a new instance of the |
OraclePersonalizationProvider Static Methods
OraclePersonalizationProvider
static methods are listed in Table 8-2.
Table 8-2 OraclePersonalizationProvider Static Methods
Static Methods | Description |
---|---|
|
Inherited from |
|
Inherited from |
OraclePersonalizationProvider Public Properties
OraclePersonalizationProvider
public properties are listed in Table 8-3.
Table 8-3 OraclePersonalizationProvider Public Properties
Public Properties | Description |
---|---|
|
Gets or sets the name of the application that is used to specify personalization information specific to an application |
|
Gets the number of seconds that the command is allowed to execute before it is terminated with an exception |
|
Inherited from |
|
Inherited from |
OraclePersonalizationProvider Public Methods
OraclePersonalizationProvider
public methods are listed in Table 8-4.
Table 8-4 OraclePersonalizationProvider Public Methods
Public Methods | Description |
---|---|
|
Returns a collection containing zero or more |
|
Returns the number of rows in the underlying Oracle database that are within the specified scope |
|
Initializes the Oracle personalization provider |
|
Inherited from |
|
Inherited from |
|
Deletes personalization state information from the underlying data source, based on the specified parameters |
|
Deletes user personalization data from the underlying Oracle data source, based on the specified parameters |
|
Inherited from |
|
Inherited from |
|
Inherited from |
|
Inherited from |
|
Inherited from |
|
Inherited from |
OraclePersonalizationProvider
constructors create instances of the OraclePersonalizationProvider
class.
Overload List:
OraclePersonalizationProvider()
This constructor creates an instance of the OraclePersonalizationProvider
class.
This constructor creates an instance of the OraclePersonalizationProvider
class.
Declaration
// C# public OraclePersonalizationProvider();
Remarks
ASP.NET applications call this constructor to create an instance of the OraclePersonalizationProvider
class as specified in the application configuration file. Initialization values for the OraclePersonalizationProvider
instance are passed through the Initialize
method.
The OraclePersonalizationProvider
static methods are listed in Table 8-5.
Table 8-5 OraclePersonalizationProvider Static Methods
Static Methods | Description |
---|---|
|
Inherited from |
|
Inherited from |
The OraclePersonalizationProvider
public properties are listed in Table 8-6.
Table 8-6 OraclePersonalizationProvider Public Properties
Public Properties | Description |
---|---|
|
Gets or sets the name of the application that is used to specify personalization information specific to an application |
|
Gets the number of seconds that the command is allowed to execute before it is terminated with an exception |
|
Inherited from |
|
Inherited from |
This property gets or sets the name of the application that the personalization information is specific to.
Declaration
// C# public override string ApplicationName{get; set;}
Property Value
The name of the application. If the applicationName
attribute is not specified in the application configuration file, or if the value is an empty string, then this property is set to the application virtual path.
Exceptions
HttpException
- The caller does not have high trust for ASP.NET hosting.
ProviderException
- The ApplicationName
string is greater than 256 characters.
Remarks
The main purpose of the ApplicationName
property is to scope the data managed by OraclePersonalizationProvider
object. Applications that specify the same ApplicationName
string when configuring the Web parts personalization service share personalization state, but applications that specify unique ApplicationName
strings do not. The OraclePersonalizationProvider
must associate the personalization state with application names so operations performed on personalization data sources can be scoped accordingly.
The following example shows typical code that the OraclePersonalizationProvider
might use to retrieve the personalization state for a user named Scott
and an application named App
:
SELECT * FROM PersonalizationState WHERE UserName='Scott' AND Path='~/Default.aspx' AND ApplicationName='App'
The final AND
in the WHERE
clause ensures that other applications that contain personalization state keyed by the same user name and path do not conflict with the App
application.
If no value is specified for the applicationName
attribute in the configuration file, then the default is the ApplicationPath
property value for the current request. The attribute name in the configuration file is case-sensitive.
The ApplicationName
property is not thread-safe. It is recommended that application code not allow users to set the ApplicationName
property in Web applications.
This property gets the number of seconds that the command is allowed to execute before it is terminated with an exception.
Declaration
// C# public int CommandTimeout {get;}
Property Value
An int
.
Remarks
To customize a provider, ASP.NET developers can set an integer value for this property through the web.config
file using the commandTimeout
attribute.
The default value is 30 seconds. The attribute name in the configuration file is case-sensitive.
The OraclePersonalizationProvider
public methods are listed in Table 8-7.
Table 8-7 OraclePersonalizationProvider Public Methods
Public Methods | Description |
---|---|
|
Returns a collection containing zero or more |
|
Returns the number of rows in the underlying Oracle database that are within the specified scope |
|
Initializes the Oracle personalization provider |
|
Inherited from |
|
Inherited from |
|
Deletes personalization state information from the underlying data source, based on the specified parameters |
|
Deletes user personalization data from the underlying Oracle data source, based on the specified parameters |
|
Inherited from |
|
Inherited from |
|
Inherited from |
|
Inherited from |
|
Inherited from |
|
Inherited from |
This method returns a collection containing zero or more PersonalizationStateInfo
-derived objects based on scope and specific query parameters.
Declaration
// C# public override PersonalizationStateInfoCollection FindState(PersonalizationScope scope, PersonalizationStateQuery query, int pageIndex, int pageSize, out int totalRecords);
Parameters
scope
The scope of query (User or Shared) for personalization information. This cannot be a null reference.
query
The query to be used for filtering personalization information. This can be a null reference.
pageIndex
The location where the query starts.
pageSize
The number of records to return.
totalRecords
The total number of records available.
Return Value
A PersonalizationStateInfoCollection
object containing zero or more PersonalizationStateInfo
-derived objects.
Exceptions
ArgumentOutOfRangeException
- The scope contains a value other than PersonalizationScope.User
or PersonalizationScope.Shared
.
OracleException
- An Oracle-related error has occurred.
ArgumentException
- One of the following conditions exists:
The value of the pageSize
parameter is 0 or 1.
The pageIndex
or pageSize
parameter is less than 0.
((pageIndex * pageSize + pageSize
) - 1) is greater than Int32.MaxValue
. -1 accounts for zero-based indexing of records.
Remarks
The PersonalizationStateInfo
-derived objects should be returned in alphabetic order and sorted by a combination of their Path
and Username
property values, both in ascending order.
This method passes the query wildcard characters to the underlying Oracle database. The database performs a wildcard search on a partial path with the wildcard character appearing at the beginning, the end, or the middle of the search string text in the PathToMatch
property of the query
parameter. For example, setting the PathToMatch
property to ~/appdir%
finds all paths that start with ~/appdir
.
Likewise, in a wildcard search on a partial user name, the wildcard character can appear at any point in the text string of the UsernameToMatch
property of the query
parameter. For example, to find all user names that start with scott
, the UsernameToMatch
parameter looks like scott%
.
The following query rules must be followed:
If only the scope
parameter is provided, and the query
parameter is null or all the properties on the query
parameter return either a null reference or default values, then all records matching the indicated scope
parameter are returned.
If the PathToMatch
property is not a null reference, then the returned records are also filtered based on paths that match the PathToMatch
value.
If the UsernameToMatch
property is not a null reference, then the returned records are also filtered based on user names that match the UsernameToMatch
property value.
If the UserInactiveSinceDate
property is not equal to the MaxValue
, then the records returned are also filtered to return only those records associated with inactive users. The comparison includes records where the Last
ActivityDate
property is less than or equal to the User
Inactive
Since
Date
property.
This method does not validate combinations of query parameters. For example, the application code can request a set of personalization state records associated with a specific user name in the shared scope. Because user names are not associated with shared information, the returned collection is empty.
This method returns the number of rows in the underlying Oracle database that are within the specified scope.
Declaration
// C# public override int GetCountOfState(PersonalizationScope scope, PersonalizationStateQuery query);
Parameters
scope
The scope of query (User or Shared) for personalization information. This cannot be a null reference.
query
The query to be used for filtering personalization information. This can be a null reference.
Return Value
The number of rows in the underlying data source that are within the specified scope parameter.
Exceptions
ArgumentException
-The PathToMatch
or the UsernameToMatch
property of query
is a non-null reference and is an empty string ("") after trimming.
ArgumentOutOfRangeException
- The scope specified is not a valid value from the PersonalizationScope
enumeration.
OracleException
- An Oracle-related error has occurred.
Remarks
This method passes the query wildcard characters to the underlying Oracle database. The database performs a wildcard search on a partial path with the wildcard character appearing at the beginning, the end, or the middle of the search string text in the PathToMatch
property of the query
parameter. For example, setting the PathToMatch
property to ~/appdir%
finds all paths that start with ~/appdir
.
Likewise, in a wildcard search on a partial user name, the wildcard character can appear at any point in the text string of the UsernameToMatch
property of the query
parameter. For example, to find all user names that start with scott
, the UsernameToMatch
parameter looks like scott%
The following query constraints must be followed:
If only the scope
parameter is provided, and the query
parameter is a null reference or all the properties on the query
parameter return either a null reference or default values, then all records matching the indicated scope
parameter are returned.
If the PathToMatch
property is not a null reference, then the records returned are also filtered based on paths that match the PathToMatch
value.
If the UsernameToMatch
property is not a null reference, then the returned records are also filtered based on user names that match the UsernameToMatch
property value.
If the UserInactiveSinceDate
property is not equal to the MaxValue
, then the returned records are also filtered to return only those records associated with inactive users. The comparison includes records where the LastActivityDate
property is less than or equal to the UserInactiveSinceDate
property.
This method initializes the OraclePersonalizationProvider
with the property values specified in the ASP.NET application configuration file (web.config
).
Declaration
// C# public override void Initialize(string name, NameValueCollection config);
Parameters
name
The friendly name of the provider.
config
A collection of the name/value pairs configuration options for this provider.
Exceptions
HttpException
- The current trust level is less than Low.
InvalidOperationException
- An attempt is made to call the Initialize
method on a provider that has already been initialized.
ArgumentNullException
- The config
parameter is a null reference.
System.Configuration.Provider.ProviderException
- One of the following conditions exists in the application configuration file:
The connectionStringName
attribute is empty or does not exist in the application configuration file.
The value of the connection string for the connectionStringName
attribute value is empty, or the specified connectionStringName
attribute does not exist in the application configuration file.
The applicationName
attribute value exceeds 256 characters.
The application configuration file for this OraclePersonalizationProvider
instance contains an unrecognized attribute.
Remarks
The Initialize
method is not intended to be called directly by the application.
This method deletes personalization state information from the underlying data source, based on the specified parameters.
Declaration
// C# public override int ResetState(PersonalizationScope scope, string[] paths, string[] usernames);
Parameters
scope
A PersonalizationScope
type indicating the personalization information to be queried. This value cannot be a null reference.
paths
The paths for personalization information in the shared scope
parameter to be deleted.
usernames
The user names for personalization information in the user scope
parameter to be deleted.
Return Value
The number of rows deleted.
Exceptions
ArgumentOutOfRangeException
- The scope
parameter specified is not a member of the PersonalizationScope
enumeration value.
OracleException
- An Oracle-related error has occurred.
ArgumentException
- Either of the following conditions exists:
The paths
or usernames
parameter is an empty array.
Elements of the paths
or usernames
arrays do not meet the validation rules. Validation rules are discussed in the following Remarks section.
Remarks
This method performs its operations as a single, atomic transaction.
Any paths
and usernames
elements contained within the respective arrays must meet the following validation rules. If a validation rule fails for any member of the parameter arrays, then an ArgumentException
exception is thrown. The validation rules are:
Null reference values are not allowed.
An empty string ("") is not allowed. Parameters should be trimmed prior to performing an empty string check.
The usernames
array cannot contain a comma (,).
This method deletes user personalization data from the underlying Oracle data source, based on the specified parameters.
Declaration
// C# public override int ResetUserState(string path, DateTime userInactiveSinceDate);
Parameters
path
The path of the personalization data to be deleted. This value can be a null reference but cannot be an empty string ("").
userInactiveSinceDate
The date that indicates the last activity.
Return Value
The count of rows deleted from the underlying Oracle data source.
Exceptions
ArgumentException
- The path
parameter is an empty string.
OracleException
- An Oracle-related error has occurred.
Remarks
The parameters of this method have the following restrictions:
The path
parameter cannot contain wildcard characters.
If the path
parameter is a non-null reference, then only per-user personalization records associated with the path
parameter are deleted.
Only per-user personalization records associated with users that are considered inactive since the date specified in the userInactiveSinceDate
parameter are deleted. The exact comparison deletes records where the Last Activity Date
property is less than or equal to the userInactiveSinceDate
parameter.
If both parameters are provided, then records that match both constraints are deleted.
The path
parameter can be a null reference.
The path
parameter cannot be an empty string after trimming.
The userInactiveSinceDate
parameter cannot be a null reference.
The OracleCacheDependency
object enables ASP.NET applications to invalidate cached items based on changes made in an Oracle database.
Class Inheritance
System.Object
System.Web.Caching.CacheDependency
Oracle.Web.Caching.OracleCacheDependency
Declaration
// C# public sealed class OracleCacheDependency : CacheDependency
Thread Safety
All public static methods are thread-safe, although instance members are not guaranteed to be thread-safe.
Remarks
This class invalidates data that is cached by ASP.NET applications, based on changes in the Oracle database.
This feature uses the Oracle Database Change Notification feature and requires Oracle Database release 10.2 or later.
The user must have the CHANGE
NOTIFICATION
privilege, which can be granted with the following SQL statement:
GRANT change notification TO username;
Requirements
Namespace: Oracle.Web.Caching
Assembly: Oracle.Web.dll
Oracle Providers for ASP.NET Version: Oracle Providers for ASP.NET 2.0 and Oracle Providers for ASP.NET 4
OracleCacheDependency
members are listed in the following tables.
OracleCacheDependency Constructors
The OracleCacheDependency
constructor is listed in Table 9-1.
Table 9-1 OracleCacheDependency Constructor
Constructor | Description |
---|---|
OracleCacheDependency Constructors |
Instantiates a new instance of the |
OracleCacheDependency Properties
OracleCacheDependency
properties are listed in Table 9-2.
Table 9-2 OracleCacheDependency Properties
Properties | Description |
---|---|
|
Inherited from |
|
Inherited from |
OracleCacheDependency Methods
OracleCacheDependency
methods are listed in Table 9-3.
Table 9-3 OracleCacheDependency Methods
Methods | Description |
---|---|
|
Inherited from |
|
Inherited from |
|
Inherited from |
|
Inherited from |
|
Returns a unique identifier for the |
|
Inherited from |
|
Inherited from |
This constructor instantiates a new instance of the OracleCacheDependency
class.
Overload List:
OracleCacheDependency(OracleCommand)
This constructor creates an instance of the OracleCacheDependency
class.
This constructor instantiates a new instance of the OracleCacheDependency
class.
Declaration
// C#
public OracleCacheDependency(OracleCommand cmd);
Parameters
cmd
The OracleCommand
object has the command text on which the change notification is based.
Remarks
When this constructor is invoked, the OracleCacheDependency
object is instantiated and the OracleCommand
object is configured for change notification. When the supplied OracleCommand
object is executed by the application, the change notification is registered and the OracleCacheDependency
instance is notified when changes are detected on the server side.
OracleCacheDependency
properties are listed in Table 9-4.
Table 9-4 OracleCacheDependency Properties
Properties | Description |
---|---|
|
Inherited from |
|
Inherited from |
OracleCacheDependency
methods are listed in Table 9-5.
Table 9-5 OracleCacheDependency Methods
Methods | Description |
---|---|
|
Inherited from |
|
Inherited from |
|
Inherited from |
|
Inherited from |
|
Returns a unique identifier for the |
|
Inherited from |
|
Inherited from |
This method returns a string that uniquely identifies the OracleCacheDependency
object.
Declaration
// C# public override string GetUniqueID()
Developer's Guide
11g Release 2 (11.2.0.3) for Microsoft Windows
E18737-02
November 2011
Oracle Providers for ASP.NET Developer's Guide, 11g Release 2 (11.2.0.3) for Microsoft Windows
E18737-02
Copyright © 2007, 2011, Oracle and/or its affiliates. All rights reserved.
Primary Authors: Sumit Jeloka, Maitreyee Chaliha
Contributing Authors: Janis Greenberg, Sheela Vasudevan, Kimnari Akiyama, Neeraj Gupta, Sinclair Hsu, Alex Keh, Ashish Shah, Arun Singh
This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.
The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing.
If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, the following notice is applicable:
U.S. GOVERNMENT RIGHTS Programs, software, databases, and related documentation and technical data delivered to U.S. Government customers are "commercial computer software" or "commercial technical data" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, the use, duplication, disclosure, modification, and adaptation shall be subject to the restrictions and license terms set forth in the applicable Government contract, and, to the extent applicable by the terms of the Government contract, the additional rights set forth in FAR 52.227-19, Commercial Computer Software License (December 2007). Oracle America, Inc., 500 Oracle Parkway, Redwood City, CA 94065.
This software or hardware is developed for general use in a variety of information management applications. It is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury. If you use this software or hardware in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its safe use. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous applications.
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group.
This software or hardware and documentation may provide access to or information on content, products, and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services.
The OracleWebEventProvider
class allows ASP.NET applications to store Web events in an Oracle database.
Class Inheritance
System.Object
System.Configuration.Provider.ProviderBase
System.Web.Management.WebEventProvider
System.Web.Management.BufferedWebEventProvider
Oracle.Web.Management.OracleWebEventProvider
Declaration
// C# public class OracleWebEventProvider: BufferedWebEventProvider
Thread Safety
All public static methods are thread-safe, although instance members are not guaranteed to be thread-safe.
Remarks
This class allows ASP.NET applications to store Web event information in an Oracle database.
Example
The following is a web.config
example for an ASP.NET application that uses the OracleWebEventProvider
class as the default provider. This configuration uses the connection string and default attribute values specified in the machine.config
file.
Applications must provide any required configuration entries for event mapping, buffer modes, and rules in the web.config
file, because the machine.config
file does not provide these configuration entries. The following web.config
file provides an example:
<?xml version="1.0"?> <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0"> <system.web> <healthmonitoring enabled="true"/> <bufferModes> <add name="Notification" maxBufferSize="1000" maxFlushSize="200" urgentFlushThreshold="500" regularFlushInterval="00:00:6" urgentFlushInterval="00:00:03" maxBufferThreads="1"/> </bufferModes> <eventMappings> <add name="CustomEvent" type="CustomEventSource.CustomEvent, CustomEventSource"/> </eventMappings> <rules> <add name="CustomRule" eventName="CustomEvent" provider="OracleWebEventProvider" minInterval="00:00:00"/> </rules> </healthMonitoring> </system.web> </configuration>
The following is a web.config
example for an ASP.NET application that uses an OracleWebEventProvider
class as the default provider, using customized settings for the connection string name and application name, and an application-specific connection string, along with other configurations as described in the previous example:
<?xml version="1.0"?> <configuration xmlns= "http://schemas.microsoft.com/.NetConfiguration/v2.0"> <connectionStrings> <add name="my_webevent_app_con_string" connectionString= "User Id=scott;Password=tiger;Data Source=Oracle"/> </connectionStrings> <system.web> <!-- Enable and customize OracleWebEventProvider --> <healthMonitoring enabled="true"> <providers> <add name="CustomOracleWebEventProvider" type="Oracle.Web.Management.OracleWebEventProvider, Oracle.Web, Version=2.112.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342" connectionStringName="my_webevent_app_con_string" bufferMode="CustomBufferMode"> </providers> <bufferModes> <add name="CustomBufferMode" maxBufferSize="1000" maxFlushSize="200" urgentFlushThreshold="500" regularFlushInterval="00:00:06" urgentFlushInterval="00:00:03" maxBufferThreads="1"/> </bufferModes> <eventMappings> <add name="CustomEvent" type="CustomEventSource.CustomEvent, CustomEventSource"/> </eventMappings> <rules> <add name="CustomRule" eventName="CustomEvent" provider="CustomOracleWebEventProvider" minInterval="00:00:00"/> </rules> </healthMonitoring> </system.web> </configuration>
Note that the applicationName
attribute should be set to a unique value for each ASP.NET application.
Requirements
Namespace: Oracle.Web.Management
Assembly: Oracle.Web.dll
Oracle Providers for ASP.NET Version: Oracle Providers for ASP.NET 2.0 and Oracle Providers for ASP.NET 4
OracleWebEventProvider
members are listed in the following tables.
OracleWebEventProvider Constructors
The OracleWebEventProvider
constructor is listed in Table 7-1.
Table 7-1 OracleWebEventProvider Constructor
Constructor | Description |
---|---|
Instantiates a new instance of the |
OracleWebEventProvider Static Methods
OracleWebEventProvider
static methods are listed in Table 7-2.
Table 7-2 OracleWebEventProvider Static Methods
Static Methods | Description |
---|---|
|
Inherited from |
|
Inherited from |
OracleWebEventProvider Public Properties
OracleWebEventProvider
public properties are listed in Table 7-3.
Table 7-3 OracleWebEventProvider Public Properties
Public Properties | Description |
---|---|
|
Inherited from |
|
Gets the number of seconds that the command is allowed to execute before it is terminated with an exception |
|
Inherited from |
|
Inherited from |
|
Inherited from |
OracleWebEventProvider Public Methods
OracleWebEventProvider
public methods are listed in Table 7-4.
Table 7-4 OracleWebEventProvider Public Methods
Public Method | Description |
---|---|
|
Initializes the |
|
Processes the event passed to it as an argument |
|
Flushes the information passed to it as an argument |
|
Releases all resources |
|
Inherited from |
|
Inherited from |
|
Inherited from |
|
Inherited from |
|
Inherited from |
This constructor creates an instance of the OracleWebEventProvider
class.
Overload List:
This constructor creates an instance of the OracleWebEventProvider
class.
This constructor creates an instance of the OracleWebEventProvider
class.
Declaration
// C# public OracleWebEventProvider();
Remarks
This constructor creates a new instance of the OracleWebEventProvider
class.
The OracleWebEventProvider
static methods are listed in Table 7-5.
Table 7-5 OracleWebEventProvider Static Methods
Static Methods | Description |
---|---|
|
Inherited from |
|
Inherited from |
The OracleWebEventProvider
public properties are listed in Table 7-6.
Table 7-6 OracleWebEventProvider Public Properties
Public Properties | Description |
---|---|
|
Inherited from |
|
Gets the number of seconds that the command is allowed to execute before it is terminated with an exception |
|
Inherited from |
|
Inherited from |
|
Inherited from |
This property gets the number of seconds that the command is allowed to execute before it is terminated with an exception.
Declaration
// C# public int CommandTimeout {get;}
Property Value
An int
.
Remarks
To customize a provider, ASP.NET developers can set an integer value for this property through the web.config
file using the commandTimeout
attribute.
The default value is 30 seconds. The attribute name in the configuration file is case-sensitive.
The OracleWebEventProvider
public methods are listed in Table 7-7.
Table 7-7 OracleWebEventProvider Public Methods
Public Method | Description |
---|---|
|
Initializes the |
|
Processes the event passed to it as an argument |
|
Flushes the information passed to it as an argument |
|
Releases all resources |
|
Inherited from |
|
Inherited from |
|
Inherited from |
|
Inherited from |
|
Inherited from |
This method initializes the OracleWebEventProvider
instance with the property values specified in the ASP.NET application configuration file (web.config
).
Declaration
// C# public override void Initialize(string name, NameValueCollection config);
Parameters
name
The name of the OracleWebEventProvider
instance to initialize.
config
A Systems.Collections.Specialized.NameValueCollection
object that contains the names and values of configuration options for the OracleWebEventProvider
.
Exceptions
InvalidOperationException
- If the OracleWebEventProvider
instance is already initialized.
ProviderException
- One of the following conditions exists:
The connectionStringName
attribute in the configuration file is null or empty.
The connection string corresponding to value of the connectionStringName
attribute is null or empty.
An unrecognized attribute is found in the configuration file.
Another error occurs during initialization of the provider.
Remarks
The Initialize
method is not intended to be called directly by the application.
This method processes the event passed to it as an argument.
Declaration
// C#
public override void ProcessEvent(WebBaseEvent eventRaised);
Parameters
eventRaised
The WebBaseEvent
object to be processed.
Remarks
This method is called by ASP.NET applications to start event processing. If buffering is enabled, then the event is added to the buffer of events, otherwise, the event information is directly written into Oracle Database.
This method flushes the information passed to it as an argument.
Declaration
// C#
public override void ProcessEventFlush(WebEventBufferFlushInfo flushEvent);
Parameters
flushEvent
The WebEventBufferFlushInfo
object that contains a collection of buffered Web events.
Remarks
This method is called by ASP.NET applications to flush all events into Oracle Database.
This method releases all resources.
Declaration
// C# public override void Shutdown();
Remarks
This method is called by ASP.NET applications when the provider is unloaded. All the buffered events are first flushed into Oracle Database before the provider proceeds with shutdown.
This chapter introduces Oracle Providers for ASP.NET.
This chapter contains these topics:
This chapter describes the OracleMemberProvider
class.
See Also: ASP.NET membership and membership providershttp://msdn.microsoft.com/en-us/library/tw292whz.aspx |
This chapter contains the following topic:
This chapter describes the OraclePersonalizationProvider
class.
See Also:
|
This chapter contains the following topic:
Oracle Providers for ASP.NET requires the following:
Microsoft ASP.NET
Oracle Providers for ASP.NET 2.0 is supported with ASP.NET 2.0, 3.0, and 3.5
Oracle Providers for ASP.NET 4 is supported with ASP.NET 4
Windows operating system
32-bit: Windows 7 (Professional, Enterprise, and Ultimate Editions), Windows Vista (Business, Enterprise, and Ultimate Editions), Windows Server 2008 (Standard, Enterprise, Datacenter, Web, and Foundation Editions), Windows Server 2003 R2 (all editions), Windows Server 2003 (all editions), or Windows XP Professional Edition.
Oracle supports 32-bit Oracle Providers for ASP.NET on x86, AMD64, and Intel EM64T processors on these operating systems.
x64: Windows 7 x64 (Professional, Enterprise, and Ultimate Editions), Windows Vista x64 (Business, Enterprise, and Ultimate Editions), Windows Server 2008 R2 x64 (Standard, Enterprise, Datacenter, Web, and Foundation Editions), Windows Server 2008 x64 (Standard, Enterprise, Datacenter, Web, and Foundation Editions), Windows Server 2003 x64 (all editions), Windows Server 2003 R2 x64 (all editions), or Windows XP x64.
Oracle supports 32-bit Oracle Providers for ASP.NET and 64-bit Oracle Providers for ASP.NET for Windows x64 on these operating systems.
Access to Oracle9i Database Release 2 or later.
Oracle Cache Dependency Provider requires Oracle Database 10g Release 2 or later
Oracle Data Provider for .NET and Oracle Client (installed with Oracle Providers for ASP.NET software). You must use the same version of the ODP.NET and Oracle Client with Oracle Providers for ASP.NET. For example, if you use Oracle Providers for ASP.NET version 11.2, you should use ODP.NET and Oracle Client versions 11.2 as well.
Oracle Providers for ASP.NET 2.0 depends on Oracle Data Provider for .NET 2.0
Oracle Providers for ASP.NET 4 depends on Oracle Data Provider for .NET 4
Administrators who wish to upgrade an older instance of Oracle Providers for ASP.NET to a newer version must upgrade both the Oracle Client and database schema. Oracle does not support using one Oracle Providers for ASP.NET client version, say 11.2, with another Oracle Providers for ASP.NET database schema version, say 11.1.0.6.20. Both the schema and client providers must be the same version.
The following list discusses upgrading the client and database schema:
Oracle Client Upgrade:
When installing the latest Oracle Providers for ASP.NET version, the machine.config
file is automatically updated so that Web applications are directed to use the latest version. If there are applications that use the web.config
file, then administrators must make sure to update this file.
Database Schema Upgrade:
Administrators need to execute the new version's Oracle Providers for ASP.NET SQL scripts on the same schema where the older Oracle Providers for ASP.NET schema exists. The scripts are designed to upgrade older schemas or create the schema if none exists. The scripts preserve existing Oracle Providers for ASP.NET data such that no data is lost.
If the database server itself is being upgraded, then administrators can use standard Oracle upgrade procedures with Oracle Providers for ASP.NET data. Data is preserved when performing the upgrade. Encrypted data remains encrypted and usable after the upgrade.
If there are multiple ASP.NET applications using a single Web server or a single Oracle Database, then it is not necessary for all of them to use the same Oracle Providers for ASP.NET version. For example, some of the applications may use Oracle Providers for ASP.NET 11.1.0.7.20, and other applications may use the 11.2 version. Individual web.config
files are used to determine as to which Oracle Providers for ASP.NET version to use for each application.
Each Oracle Providers for ASP.NET version must have a database schema specific to its version. For example, all Oracle Providers for ASP.NET 11.2 applications must be able to access at least one schema built using the 11.2 SQL scripts. These 11.2 provider applications can all share one schema, but they cannot use an 11.1.0.7.20 schema. When using multiple Oracle Providers for ASP.NET versions to access the same database, administrators can create separate schemas for each Oracle Providers for ASP.NET version.
This document is your primary source of introductory, installation, postinstallation configuration, and usage information for Oracle Providers for ASP.NET.
This Preface contains these sections:
Oracle Providers for ASP.NET Developer's Guide is intended for programmers who are developing applications using ASP.NET providers to store application state in Oracle databases.
To use this guide, you must be familiar with Microsoft .NET Framework classes, ASP.NET, and ADO.NET, and have a working knowledge of application programming using Microsoft C#, Visual Basic .NET, or another .NET language.
Although the examples in the documentation and the samples in the sample directory are written in C#, developers can use these examples as models for writing code in other .NET languages.
For information about Oracle's commitment to accessibility, visit the Oracle Accessibility Program website at http://www.oracle.com/pls/topic/lookup?ctx=acc&id=docacc
.
Access to Oracle Support
Oracle customers have access to electronic support through My Oracle Support. For information, visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=info
or visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=trs
if you are hearing impaired.
For more information, see these Oracle resources:
Oracle Developer Tools for Visual Studio .NET Help
For simplicity in demonstrating this product, code examples do not perform the password management techniques that a deployed system normally uses. In a production environment, follow the Oracle Database password management guidelines, and disable any sample accounts. See Oracle Database Security Guide for password management guidelines and other security recommendations.
The following text conventions are used in this guide:
Convention | Meaning |
---|---|
boldface | Boldface type indicates graphical user interface elements associated with an action, or terms defined in text or the glossary. |
italic | Italic type indicates book titles, emphasis, or placeholder variables for which you supply particular values. |
monospace | Monospace type indicates commands within a paragraph, URLs, code in examples, text that appears on the screen, or text that you enter. |
Oracle Providers for ASP.NET is a collection of ASP.NET providers that follow the ASP.NET provider model and uses Oracle Database as the data source.
Microsoft ASP.NET includes a number of services and providers that store application state in databases and other storage media. Developers can store application state, such as shopping cart or user information, in a persistent data source. By storing the application state in a database, applications ensure high availability and reliable access to the data from any Web server in the server farm. Users can retrieve their ASP.NET state data no matter which Web farm computer they access because it is located centrally on the database. If the particular Web farm computer a user is accessing fails, the information is not lost because the ASP.NET data is persisted in the database. ASP.NET developers can now be more productive as they build their Web applications through these ASP.NET services, which are classes that are part of the .NET Framework.
These ASP.NET services are data-source independent, but they can be configured to use a particular ASP.NET provider, which is implemented specifically to store and retrieve data from a specific data source. Oracle Providers for ASP.NET, like all ASP.NET providers, follow the ASP.NET provider model to provide all the functionality that the ASP.NET services need. By simply configuring the Oracle Providers for ASP.NET as default providers in a configuration file, ASP.NET applications can store various types of application states in an Oracle database. The application states that can be stored are commonly used among Web applications. ASP.NET developers can use these providers, as opposed to creating their own from scratch.
Oracle Providers for ASP.NET are available for both 32-bit and 64-bit (x64) platforms. See "System Requirements" for more details.
Oracle offers the following providers:
Membership Provider
Role Provider
Site Map Provider
Session State Provider
Profile Provider
Web Event Provider
Web Parts Personalization Provider
Cache Dependency Provider
Descriptions of each provider that Oracle offers are as follows:
Oracle Membership Provider for ASP.NET
The Oracle membership provider enables ASP.NET applications to store the registered user information of a Web site in an Oracle database through the ASP.NET membership service. It provides methods for creating users, deleting users, verifying login credentials, changing passwords, and other tasks associated with managing application users.
See Also: ASP.NET membership and membership providershttp://msdn.microsoft.com/en-us/library/tw292whz.aspx |
Oracle Role Provider for ASP.NET
The Oracle role provider enables ASP.NET applications to store and manage Web site-specific role information in an Oracle database through the ASP.NET role service. The Oracle role provider exposes methods for creating roles, deleting roles, adding users to roles, and other tasks associated with managing roles defined in an ASP.NET application.
See Also: ASP.NET role management and role providershttp://msdn.microsoft.com/en-us/library/9ab2fxh0.aspx |
Oracle Site Map Provider for ASP.NET
The Oracle site map provider enables ASP.NET applications to store site map information in an Oracle database. The Oracle site map provider reads site map data from the Oracle database to build an upside-down tree of SiteMapNode
objects, as well as to supply methods for retrieving nodes from the site map.
See Also: ASP.NET site navigation and site map providerhttp://msdn.microsoft.com/en-us/library/ms227558.aspx |
Oracle Session State Provider for ASP.NET
The Oracle session state provider enables ASP.NET applications to store ASP.NET session information in an Oracle database through the ASP.NET session state service. This provider manages per-user session state, such as a shopping cart for an e-commerce application.
See Also: ASP.NET session state and session state providershttp://msdn.microsoft.com/en-us/library/ms178581.aspx |
Oracle Profile Provider for ASP.NET
The Oracle profile provider enables ASP.NET applications to store an individual Web site user's profile information in the Oracle database. The profile provider can write and read Web site user profile properties that are persisted in the database.
See Also: ASP.NET profile properties and profile providershttp://msdn.microsoft.com/en-us/library/2y3fs9xs.aspx |
Oracle Web Event Provider for ASP.NET
The Oracle Web event provider enables ASP.NET applications to store events raised by the ASP.NET health monitoring system in the Oracle database. The provider provides buffering and flushing capabilities to minimize database round-trips.
See Also: ASP.NET health monitoring and web event providerhttp://msdn.microsoft.com/en-us/library/ms178701%28VS.80%29.aspx |
Oracle Web Parts Personalization Provider for ASP.NET
The Oracle Web parts personalization provider enables ASP.NET applications to store personalization data in an Oracle database through the ASP.NET Web parts personalization service.
It connects to an integrated set of controls for creating Web sites that enable end users to modify the content, appearance, and behavior of Web pages directly from a browser.
See Also:
|
Oracle Cache Dependency Provider for ASP.NET
Oracle cache dependency provider provides automatic invalidation of data that is cached by ASP.NET applications in the System.Web.Caching.Cache
object, based on changes made in the Oracle database. This provider can provide performance improvements to ASP.NET applications because ASP.NET applications can use the cached database data and fetch data from the database only when it is needed.
See Also: Oracle Data Provider for .NET Developer's Guide for more information on database change notification |
See Also: ASP.NETCacheDependency class http://msdn.microsoft.com/en-us/library/system.web.caching.cachedependency.aspx |