title: TypeInitializationException when instaling CORS
body: <p>I have made a Web Api app and I want to access this api from a separate
  website using Ajax.</p>
  
  <p>To access the api I need to install CORS, but when doing so I get the 
  error (when Debuging): </p>
  
  <blockquote>
    <p>An exception of type 'System.TypeInitializationException' occurred in MvcApplication1.dll but was not handled in user code
    Additional information: The type initializer for 'System.Web.Http.GlobalConfiguration' threw an exception**</p>
  </blockquote>
  
  <p>This error occurs within Global.asax.cs at:</p>
  
  <pre><code>WebApiConfig.Register(GlobalConfiguration.Configuration);
  </code></pre>
  
  <p>After rebuilding the solution and Debuging it again, I get navigatet to the webpage wich then show another error message:</p>
  
  <blockquote>
    <p>Cannot create/shadow copy 'EntityFramework' when that file already exists.**</p>
  </blockquote>
  
  <p>The Web Api worked perfect before I installed CORS, other than not
  be able to access the api from a another website/location, witch is what I want...</p>