Skip to content
Advertisement

The provider did not return a ProviderManifestToken string Entity Framework

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.

Inner Exception: {"The provider did not return a ProviderManifestToken string."}

I’ve searched other threads as there are many with similar errors, but I cannot seem to find a solution.

I am using VS2012 Professional and SQL Server 2012. I am able to connect to the server using Server explorer using windows authentication. I am building a webforms application with multiple tiers. One of them containing my Entity framework tier which contains my Context class.

<?xml version="1.0"?>
<!--
  For more information on how to configure your ASP.NET application, please visit
  http://go.microsoft.com/fwlink/?LinkId=169433
  -->

<configuration>
  <system.web>
    <compilation debug="true" targetFramework="4.5" />
    <httpRuntime targetFramework="4.5" />
  </system.web>

  <connectionStrings>
    <add name="MYSQLSERVER"
         providerName="System.Data.SqlClient"
         connectionString="Data Source=myComputerMYSQLSERVER;Trusted_Connection=true"></add>
  </connectionStrings>
</configuration>

This is what the app.config in my Entity Framework class library layer looks like.

<entityFramework>
    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
      <parameters>
        <parameter value="v11.0" />
      </parameters>
    </defaultConnectionFactory>
  </entityFramework>
</configuration>

Also, I have tried changing the app.config defaultConnectionFactory type to

<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework">

but it did not change anything.

I am not really sure what any of the changes I am making even mean which worries me. Sure I could of found the solution online and fixed my issue, but I would really like to understand the web.config and what this all means. On top of finding a solution to this problem, can anyone point me in the right direction to learning web.configs?

Thank ahead for your help.

Advertisement

Answer

In my case, it was my SQL Server instance that was not running. I simply started the service and everything worked fine. Hope this helps someone down the road.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement