Could not determine storage version error, EF 6 code first

给你一囗甜甜゛ 提交于 2019-12-24 06:34:10

问题


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


回答1:


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"/>


来源:https://stackoverflow.com/questions/45010485/could-not-determine-storage-version-error-ef-6-code-first

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!