title: ASP.NET Web Api 2.0 with Entity framework throws exception when hosted as Web site
body: <p>I am using ASP.NET web api 2.0 with EF 6.0. I deploye my application using VS publish feature. when i locally host my application in IIS as Web site and access the API get method it thorws exception which is</p>
  
  <pre><code>&lt;ExceptionMessage&gt;
  The ObjectContext instance has been disposed and can no longer be used for operations that require a connection.
  &lt;/ExceptionMessage&gt;
  &lt;ExceptionType&gt;System.ObjectDisposedException&lt;/ExceptionType&gt;
  </code></pre>
  
  <p>It works fine when i host my application as Web application in Default application or change my web site application pool to Default application.</p>