title: Sequence contains no elements server side
body: <p>I am developing a Asp.net MVC web application and have been deploying to a web server for a few months now. Just recently I have experienced a new error that confused me. Upon publishing my application, and loading up the website, I get the following error message:</p>
  
  <pre><code> Sequence contains no elements
  
   Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 
  
   Exception Details: System.InvalidOperationException: Sequence contains no elements
  
   Source Error: 
  
  An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
  
  Stack Trace: 
  
  
  [InvalidOperationException: Sequence contains no elements]
   System.Linq.Enumerable.First(IEnumerable`1 source) +514
  System.Linq.Queryable.First(IQueryable`1 source) +330
  LabSys.MvcApplication.Application_AuthorizeRequest(Object sender, EventArgs   e) +1261
    System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +92
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&amp;completedSynchronously) +165
  </code></pre>
  
  <p>I am very confused, because the application runs perfectly on localhost, without any issue or error message. I also checked my database, and it is also connected and validated to the server. So there should be no error.</p>
  
  <p>Thanks for any help in advance!</p>