# Oracle Providers for ASP.NET

Installation Guide and Release Notes

Release 12.1.0.2.0 for ODAC 12c Release 3 Production

#### October 2014

#### Copyright (c) Oracle Corporation 2014

This document provides information that supplements the Oracle Providers for ASP.NET Production documentation.

## IMPORTANT NOTES

Oracle providers for ASP.NET support .NET Framework 2.0 and higher.

##

## INSTALLATION AND SETUP NOTES

1. Product Dependencies
   Oracle Providers for ASP.NET requires Oracle Client 12.1.0.2.0 or Oracle Instant Client 12.1.0.2.0. When installing a new Oracle Providers for ASP.NET 12.1.0.2.0 instance, Oracle Universal Installer (OUI) will automatically install Oracle Instant Client 12.1.0.2.0.
2. Policy DLLs
   Note that the installation of this product places policy DLLS into the GAC so that existing applications can start using newly installed version of this product immediately after installation. However, if this is not desired, be sure to remove the policy DLLs from the GAC.
3. Oracle Providers for ASP.NET 12.1.0.2.0 - Database Set Up
   Before using Oracle Providers for ASP.NET 12.1.0.2.0, execute the database SQL scripts that were part of the installation. Note that Oracle Providers for ASP.NET ships with InstallAllOracleASPNETProviders.sql which will create all the database objects for all the providers. If you already have an older version of Oracle Providers for ASP.NET installed, the execution of InstallAllOracleASPNETProviders.sql will update the stored procedures and column definitions, but tables will not be dropped nor re-created.

##

## TIPS, LIMITATIONS AND KNOWN ISSUES

If the HKEY_LOCAL_MACHINE\Software\Oracle\NLS_LANG registry entry is set to "NA", ORA-12705 errors will be encountered when using Oracle Providers for ASP.NET. To eliminate this problem, remove the HKEY_LOCAL_MACHINE\Software\Oracle\NLS_LANG registry entry.

## AUTOMATIC MACHINE.CONFIG CHANGES

After the installation of Oracle Providers for ASP.NET, %windir%\Microsoft.NET\Framework\v2.0.50727\CONFIG\machine.config file will be updated to make the system aware of the ASP.NET providers that were installed. In addition, a connection string alias of "OraAspNetConString" is added, which is referenced by each of the Oracle Providers for ASP.NET. Below are typical entries that will be made in the machine.config after the install.

(NOTE: You do not need to make these entries in the machine.config. This is for your information only.)

(NOTE: "..." are place holders for existing entries in the machine.config.)

<configuration>

...

<connectionStrings>

...

<add name="OraAspNetConString" providerName="Oracle.DataAccess.Client" connectionString=" " />

</connectionStrings>

...

<system.web>

...

<membership>

<providers>

<add name="OracleMembershipProvider" type="Oracle.Web.Security.OracleMembershipProvider, Oracle.Web, Version=2.121.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342" connectionStringName="OraAspNetConString" applicationName="" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="true" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="7" minRequiredNonalphanumericCharacters="1" passwordAttemptWindow="10" passwordStrengthRegularExpression="" />

...

</providers>

</membership>

...

</system.web>

...

</configuration>

The above example shows just an entry for the Oracle Membership Provider. There will be similar entries for other providers.

## QUICK SETUP REFERENCE

Below are the quick setup steps for Oracle Providers for ASP.NET. The steps below assumes that Oracle 12g 12.1.0.2.0 Production was installed under a valid Oracle Home which will be referred to as %ORACLE_HOME% henceforth in this readme.txt.

1. SQL*Net Setup

a) EZCONNECT

Either EZCONNECT or TNSNAMES can be used to connect to Oracle for

executing the Oracle Providers for ASP.NET setup scripts as well as for

the providers to connect to Oracle. To connect to the database using

either approach, %ORACLE_HOME%\Network\Admin\sqlnet.ora file must be

created to contain:

NAMES.DIRECTORY_PATH = (TNSNAMES, EZCONNECT)

To be able to connect using OS Authentication, the following line is

also needed to be included in sqlnet.ora:

SQLNET.AUTHENTICATION_SERVICES = (NTS)

To use EZCONNECT, the data source must be specified in the following

format (and no other configuration file is needed):

[//]host[:port][/service_name][/server][/instance_name]

b) TNSNAMES

To use TNSNAMES, a tnsnames.ora file must be also created in or

copied to the %ORACLE_HOME%\Network\Admin directory.

The %ORACLE_HOME%\Network\Admin\tnsnames.ora file can be created, for

example, to contain the following:

oracle =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP)(HOST = my-pc)(PORT = 1521))

(CONNECT_DATA =

(SERVER = DEDICATED)

(SERVICE_NAME = orcl)

)

)

The protocol, host, port, and service name in the tnsnames.ora should be

modified appropriately. If TNSNAMES is to be used, the TNSNAMES alias

is specified as the "data source", which in the example above is "oracle".

2. Executing the SQL Scripts

As noted during the install, the setup SQL scripts must be executed before

using any of the Oracle Providers for ASP.NET. For details, please see

Chapter 1 of the Oracle Providers for ASP.NET Developer's Guide.

If you don't have SQL*Plus to execute SQL scripts, you may install and use

Oracle Developer Tools (ODT) for Visual Studio 2008 or 2010 to execute those

scripts. Below are the steps:

a) Start up Visual Studio 2008 or 2010 IDE. Under Tools menu, select Run

SQL*Plus Script.

b) In the 'Run SQL*Plus Script' dialog box, click New Connection button.

c) In the Connection Properties dialog box, select "Oracle Database

Server (Oracle ODP.NET)" for Data Source and "Oracle Data Provider

for .NET" for Data Provider. Select a TNS alias

from Data Source Name drop-down list. If no entry is available, see

SQL*Net setup above. Enter a username and password, or select Use

Windows integrated authentication. Click Test Connection button to

test the connection. If it's successful, click the OK button to

continue.

NOTE: The scripts will create tables, stored procedures, views, and

roles. They will be owned by the database user that executed the

scripts. If the ASP.NET applications connect to the database as a

different database user than the database user that executed the

scripts, the database user (who owns the database objects that were

created for ASP.NET providers) will need to grant roles to other

database users, if they require access. For further details, please

read Chapter 1 of the Oracle Providers for ASP.NET user's Guide for

details.

d) Back in the 'Run SQL*Plus Script' dialog box, browse and select the

SQL scripts to run. Typically, the location of the scripts is

%ORACLE_HOME%\ASP.NET\SQL.

e) The InstallOracleASPNETCommon.sql script must be executed first

before executing any scripts for other Oracle Providers for ASP.NET.

However, once the InstallOracleASPNETCommon.sql script has been

executed for a given database, it does not need to be executed again

for that database.

Not all the scripts must be executed. For example, if the application

only uses Oracle's Membership provider, only the

InstallOracleASPNETCommon.sql and InstallOracleMembership.sql scripts

need to be executed, in that order. Note that to execute all the

install scripts for all the providers,

InstallAllOracleASPNETProviders.sql can be executed.

For deintallation, the corresponding "Uninstall" scripts should be

executed for all "Install" scripts that were executed. When

deinstalling, the UninstallOracleASPNETCommon.sql script must be

executed last after provider-specific "Uninstall" scripts have been

executed. For example, if the InstallOracleASPNETCommon.sql and

InstallOracleMembership.sql were executed during the setup, the

UninstallOracleMembership.sql and UninstallOracleASPNETCommon.sql

must be executed in that order for proper deinstallation. Note

that UninstallAllOracleASPNETProviders.sql can be executed to

remove all the database objects created from the execution of

InstallAllOracleASPNETProviders.sql.

3. Connection String Attribute in the machine.config (OPTIONAL)

If the "OraAspNetConString" alias in the machine.config is to be used by

your application, it must be assigned to a valid connection string in

the machine.config or override the setting in the machine.config by

providing a valid connection string in the web.config.

See the configuration sample in the AUTOMATIC MACHINE.CONFIG CHANGES section

above. Note that EZCONNECT can be used for the data source setting in the

connection string, eliminating the dependency on the tnsnames.ora file.

4. Web.config File (OPTIONAL)

You may use application config file (web.config) to override the default

settings in the machine.config file, as mentioned in the previous step.

Some web.config examples are provided in the Oracle Providers for ASP.NET

Developer's Guide for your reference.