IIS NullReferenceException when deployed but not in Dev Server <p>I have developed an IIS Application using C# code behind ASPX pages with entity framework for database access. When I run it in the Visual Studio Development Server it works fine but if I either Publish it to IIS or run it on the Local IIS Web Server from Visual Studio (which is pretty much the same as Publishing I guess) I get</p> <pre><code>NullReferenceException: Object reference not set to an instance of an object.] System.Web.Hosting.RecyclableCharBuffer.Append(String s) +15 System.Web.Hosting.ISAPIWorkerRequest.SendUnknownResponseHeader(String name, String value) +93 System.Web.HttpResponse.WriteHeaders() +233 System.Web.HttpResponse.Flush(Boolean finalFlush) +219 System.Web.HttpRuntime.FinishRequest(HttpWorkerRequest wr, HttpContext context, Exception e) +127 </code></pre> <p>This Exception is thrown after my Home.aspx has finished it's Page Load. Some simple ASPX pages work ok. Setting a NullReferenceException break point just drops into disassembly.</p> <p>I am stuck for ideas about how to track this issue down. Any thoughts???</p>