title: Freeze During Type.GetType() In DbProviderFactories.IncludeFrameworkFactoryClasses() in Entity Framework 5
body: <p>Local execution of my Entity Framework 5 ASP.NET MVC application suddenly stopped working today. It starts up and then appears to be thinking for a long time (I've let it run as long as 2 hours). Every time I pause it, whether it's after 30 seconds or 30 minutes, it's always stuck at the same spot in <code>DbProviderFactories.IncludeFrameworkFactoryClasses()</code> (which is called during the initialization process). If I decompile the source of <code>System.Data.dll</code>, this is what the relevant portion of that method looks like:</p>
  
  <pre><code>private static DataTable IncludeFrameworkFactoryClasses(DataTable configDataTable)
  {
        DataTable providerDataTable = DbProviderFactoriesConfigurationHandler.CreateProviderDataTable();
        DbProviderFactoryConfigSection[] factoryConfigSectionArray = new DbProviderFactoryConfigSection[4]
        {
          new DbProviderFactoryConfigSection(typeof (OdbcFactory), "Odbc Data Provider", ".Net Framework Data Provider for Odbc"),
          new DbProviderFactoryConfigSection(typeof (OleDbFactory), "OleDb Data Provider", ".Net Framework Data Provider for OleDb"),
          new DbProviderFactoryConfigSection("OracleClient Data Provider", "System.Data.OracleClient", ".Net Framework Data Provider for Oracle", typeof (SqlClientFactory).AssemblyQualifiedName.ToString().Replace("System.Data.SqlClient.SqlClientFactory, System.Data,", "System.Data.OracleClient.OracleClientFactory, System.Data.OracleClient,")),
          new DbProviderFactoryConfigSection(typeof (SqlClientFactory), "SqlClient Data Provider", ".Net Framework Data Provider for SqlServer")
        };
        for (int index = 0; index &lt; factoryConfigSectionArray.Length; ++index)
        {
          if (!factoryConfigSectionArray[index].IsNull())
          {
            bool flag = false;
            if (index == 2)
            {
              // FREEZES HERE:
              Type type = Type.GetType(factoryConfigSectionArray[index].AssemblyQualifiedName);
              if (type != (Type) null)
              {
                ...
              }
            }
            ...
          }
        }
        ...
     }
  </code></pre>
  
  <p>It gets stuck at the call to <code>Type.GetType()</code> for the Oracle provider. <code>factoryConfigSectionArray[index].AssemblyQualifiedName</code> is set to <code>"System.Data.OracleClient.OracleClientFactory, System.Data.OracleClient, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"</code>, which it seems to derive by doing some kind of strange string replacement on the <code>SqlClient</code> assembly.</p>
  
  <p>In any case, I can't figure why it would freeze on a call to <code>Type.GetType()</code>, regardless of the actual type being fetched. I've never seen this type of behavior before and it's very perplexing. If I dive deeper into the call stack, it's really frozen in <code>mscorlib</code> in <code>RuntimeTypeHandle.GetTypeByName()</code> and there's a managed to native call in there where the problem lies.</p>
  
  <p>Note that I've tried restarting Visual Studio, cleaning and building in both Debug and Release, and restarting my system. Whatever is going on appears to be at the system level.</p>
  
  <p>Has anyone seen this before (whether with Entity Framework or otherwise)? Any ideas how to get back up and running (though I'd obviously like to understand the root of the issue too)?</p>