1

I had some 32bit/64bit issues in one of my web applications after the DB was upgraded to 64 bit 12C and after researching the problems I had encountered, the almost universal answer was "Use Managed Driver and not worry about 32/64 bit issue". So I did. I

  • downloaded and installed "ODAC 12c Release 4 and Oracle Developer Tools for Visual Studio (12.1.0.2.4)" from here,
  • removed references to Oracle.Web and Oracle.DataAccess (unmanaged drivers) in my app and added reference to new managed driver "Oracle.ManagedDataAccess"
  • changed all the "using Oracle.Web", "using Oracle.DataAccess.Client" to "using Oracle.ManagedDataAccess.Client"

But I cannot find one document that tells me how web config file needs to be modified to use managed driver.

Do I need to make any changes to <connectionStrings> section?

Do I need to add additional sections to make use of managed driver?

What do I need to change in Membership and Role Providers sections? The existing providers refer to Oracle.Web.Security.OracleRoleProvider and once upgrading to Managed version, all references to Oracle.Web and Oracle.DataAccess has to be removed.

If anyone has gone through the pain, please share your solutions to these, any other issues I might run into once these are resolved.

This is a sample of current web config file that I think needs to be changed/removed:

<connectionStrings>
    <clear/>
    <add name="MSAConnectionString" connectionString="User Id=Some_User;Password=SomePwd;Data Source=(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = 10.20.30.40)(PORT = 1521)))(CONNECT_DATA =(SID = MSA))); Min Pool Size=10;Max Pool Size=300;Incr Pool Size=5;Decr Pool Size=2;"/>
</connectionStrings>

<compilation defaultLanguage="c#" debug="true" targetFramework="4.0">
    <assemblies>// next two line will have to be removed, since DLLs no longer referenced
        <add assembly="Oracle.DataAccess, Version=2.121.2.0, Culture=neutral, PublicKeyToken=89B483F429C47342"/>
        <add assembly="Oracle.Web, Version=2.121.2.0, Culture=neutral, PublicKeyToken=89B483F429C47342"/>
        <add assembly="System.DirectoryServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
        <add assembly="System.DirectoryServices.AccountManagement, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
    </assemblies>
</compilation>

<membership defaultProvider="DSSOracleMembershipProvider">
    <providers>
        <add name="DSSOracleMembershipProvider" type="Oracle.Web.Security.OracleMembershipProvider, Oracle.Web, Version=2.121.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342" connectionStringName="MSAConnectionString" applicationName="/" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="4" minRequiredPasswordLength="9" passwordAttemptWindow="8"/>
    </providers>
</membership>
<roleManager enabled="true" defaultProvider="DSSOracleRoleProvider">
    <providers>
        <add name="DSSOracleRoleProvider" type="Oracle.Web.Security.OracleRoleProvider, Oracle.Web, Version=2.121.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342" connectionStringName="MSAConnectionString" applicationName="/"/>
    </providers>
</roleManager>
NoBullMan
  • 2,032
  • 5
  • 40
  • 93
  • I am sure someone has developed a web application that uses forms authentication (uses role and membership providers) and is also using Oracle Managed Driver (Oracle.ManagedDataAccess). I just need to know how to modify the provider section of web.config if referneces to Oracle.DataAccess and Oracle.Web are removed from the application after adding a reference to Oracle.ManagedDataAccess. – NoBullMan Jul 27 '16 at 11:41
  • Apparently not possible! Just saw this link https://community.oracle.com/thread/3589539?start=0&tstart=0 where someone posted "4.The providers do not support Oracle.ManagedDataAccess.Client" as one his issues and response from Oracle team was: "Currently, the providers are not supported with managed ODP.NET". – NoBullMan Jul 27 '16 at 11:50

1 Answers1

1

A few thoughts: 1) Membership is part of Oracle.Web - so you will still need those references - I like to add this to the runtime section in the web.config for good measure:

 <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
  <dependentAssembly>
    <assemblyIdentity name="Oracle.Web" publicKeyToken="89b483f429c47342" />
    <bindingRedirect oldVersion="0.0.0.0-4.121.2.1" newVersion="4.121.2.1" />
  </dependentAssembly>
</assemblyBinding>

2) VS2015 NuGet can help you get the Oracle managed client installed; however, it could be as simple as global substituting Oracle.ManagedDataAccess.Client for Oracle.DataAccess.Client. (Leave Oracle.Web alone!)

3) additional tuning for your ADO.net pool may be required (in connection strings) - see here: ODP.NET error in IIS: ORA-12357 Network Session End of file

Also the 2.x drivers are for ASP.NET 2.0 - the 4.x are ASP.NET 4.0 - looks like your pointing to the wrong framework.

jmaschle
  • 41
  • 4