LogicalDesk
LogicalDesk

Reputation: 1297

Could not determine storage version error, EF 6 code first

I'm using EF code first approach in MVC and my web.config's connection string looks like-

<connectionStrings>
    <add name="SchoolContext" connectionString="XYZ-server;integrated security=True;" providerName="System.Data.SqlClient"/>
</connectionStrings>

And I'm getting following error-

Server Error in '/' Application.

Could not determine storage version; a valid storage connection or a version hint is required.

I also checked duplicates but none of them worked in my case- Duplicate question1 Duplicate question2

Upvotes: 1

Views: 1899

Answers (1)

LogicalDesk
LogicalDesk

Reputation: 1297

I solved the issue by looking closely to the connection string, actually data source was missing, correct one is-

<add name="SchoolContext" connectionString="Data Source=XYZ-server;integrated security=True;" providerName="System.Data.SqlClient"/>

Upvotes: 1

Related Questions