[英]Entitiy exception was unhandled by user code
I was given a certain project (asp.net project) that was running on a VM. 我得到了在VM上运行的某个项目(asp.net项目)。 I copied that project to my local machine.(A db is connected to visual studio using entity framework) The sql server that i have has the follow name.
我将该项目复制到本地计算机上。(使用实体框架将数据库连接到Visual Studio)我拥有的SQL Server具有以下名称。
"BASIT-GILANI\MSSQLSERVER1"
and i use windows authentication to login to sql server mgmt studio. 我使用Windows身份验证登录到SQL Server mgmt Studio。
I am continually getting this error 我不断收到此错误
Entitiy exception was unhandled by user code An exception of type 'System.Data.Entity.Core.EntityException' occurred in mscorlib.dll but was not handled in user code
用户代码未处理整个异常。mscorlib.dll中发生了类型为'System.Data.Entity.Core.EntityException'的异常,但未在用户代码中处理
Additional information: The underlying provider failed on Open.
附加信息:基础提供程序在打开时失败。
I am also giving a piece of code from my web.config file 我也从我的web.config文件中给出了一段代码
<connectionStrings>
<add name="IntegrationDBEntities" connectionString="metadata=res://*/IntegrationDb.csdl|res://*/IntegrationDb.ssdl|res://*/IntegrationDb.msl;provider=System.Data.SqlClient;provider
connection string="data source=BASIT-GILANI\MSSQLSERVER1;initial catalog=ODSDB;MultipleActiveResultSets=True;App=EntityFramework;Connection Timeout=160"" providerName="System.Data.EntityClient" />
</connectionStrings>
Does anyone have any idea of how to solve this issue? 有谁知道如何解决这个问题?
Do you have sufficient privilege to access the database ? 您是否具有访问数据库的足够特权? Have you already try to connect from a different SQL client like SQL Server Management with the same credentials ?
您是否已经尝试过使用相同的凭据从其他SQL客户端(例如SQL Server Management)进行连接?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.