title: Sometimes getting ProviderIncompatibleException, when connecting from EF to SQL Server
body: <p>I have IIS application pool with "ApplicationPoolIdentity" user account, running ASP.NET MVC application, which uses EF code first to connect to SQL Server, running on separate machine in the domain.
  This is the connection string:</p>
  
  <pre><code>&lt;add name="MyDatabaseContext"
       providerName="System.Data.SqlClient"
       connectionString=
   "Data Source=ServerName;Initial Catalog=DatabaseName;Integrated Security=True"/&gt;
  </code></pre>
  
  <p>SQL Server has a login for corresponding Active Directory group.</p>
  
  <p>Usually, everything runs smoothly. However sometimes, out of the blue (no possible trigger found), I start getting the following exception:</p>
  
  <p><em>System.Data.ProviderIncompatibleException: An error occurred while getting provider information from the database. This can be caused by Entity Framework using an incorrect connection string. Check the inner exceptions for details and ensure that the connection string is correct. ---> System.Data.ProviderIncompatibleException: The provider did not return a ProviderManifestToken string. ---> System.Data.SqlClient.SqlException: Login failed for user '<strong>NT AUTHORITY\ANONYMOUS LOGON</strong>'.</em></p>
  
  <p>Restarting server machine helps. However this is not an acceptable solution in production environment. We were attributing this problem to AD-related technical issues that we had in the domain. However these problems seem to have been resolved. 
  Is there any other possible reason?</p>