title: 'Could not load file or assembly Oracle.ManageddataAccess' when I am not referencing it
body: <p>I keep getting </p>
  
  <blockquote>
    <p>System.IO.FileNotFoundException: 'Could not load file or assembly
    'Oracle.ManagedDataAccess, Version=4.122.1.0, Culture=neutral,
    PublicKeyToken=89b483f429c47342 or one of its dependencies</p>
  </blockquote>
  
  <p>error when I try to check for existence of a role. The problem is that  have references to unmanaged data access"Oracle.DataAccess.dll" and none to managed!</p>
  
  <p>I checked web.config and all the references and can't see where this managed data access reference is coming from. Any ideas?</p>
  
  <pre><code>using System;
  using System.Web;
  using System.Web.Security;
  using System.Web.Routing;
  
  public class Global : HttpApplication
  {
      void Application_Start(object sender, EventArgs e)
      {
          // Code that runs on application startup
          if (Roles.Enabled)
          {
              if (!Roles.RoleExists("User"))  &lt;--- Error pops up here
              {
                  Roles.CreateRole("User");
              }
              ...
          }
      }
  }
  </code></pre>
  
  <p>In web.config:</p>
  
  <pre><code>&lt;compilation defaultLanguage="c#" debug="true" targetFramework="4.6"&gt;
    &lt;assemblies&gt;
      &lt;add assembly="Oracle.DataAccess, Version=4.122.1.0, Culture=neutral, PublicKeyToken=89B483F429C47342"/&gt;
      &lt;add assembly="System.DirectoryServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/&gt;
      &lt;add assembly="System.DirectoryServices.AccountManagement, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/&gt;
    &lt;/assemblies&gt;
  &lt;/compilation&gt;
  ....
  &lt;roleManager enabled="true" defaultProvider="AHSOracleRoleProvider"&gt;
    &lt;providers&gt;
      &lt;add name="AHSOracleRoleProvider" type="Oracle.Web.Security.OracleRoleProvider, Oracle.Web, Version=4.122.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342" connectionStringName="AHSConnectionString" applicationName="/"/&gt;
    &lt;/providers&gt;
  &lt;/roleManager&gt;
  </code></pre>