问题描述
我创建了我的EDM并在我的SQL Server 2008 Express版本中生成了一个数据库,该版本在本地安装。它在本地运行良好但在托管后我收到以下错误
I created my EDM and generated a database in my SQL Server 2008 Express edition, which is installed locally. It run fine locally but after hosting it i got the following error
基础提供程序在打开时失败。& Err =抛出类型'System.Web.HttpUnhandledException'的异常。
The underlying provider failed on Open.&Err=Exception of type 'System.Web.HttpUnhandledException' was thrown.
我的连接字符串是
add name =" MobileShawarmaEntities"的connectionString = QUOT;元数据= RES://*/Data_Access.MobileShawarma.csdl | RES://*/Data_Access.MobileShawarma.ssdl | RES://*/Data_Access.MobileShawarma.msl;提供商= System.Data.SqlClient的; provider connection string =& quot; Data Source = .\SQLEXPRESS; AttachDbFilename = | DataDirectory | \ MobileShawarma.mdf; Integrated
Security = True; User Instance = True; MultipleActiveResultSets = True& quot;"的providerName = QUOT; System.Data.EntityClient" />
add name="MobileShawarmaEntities" connectionString="metadata=res://*/Data_Access.MobileShawarma.csdl|res://*/Data_Access.MobileShawarma.ssdl|res://*/Data_Access.MobileShawarma.msl;provider=System.Data.SqlClient;provider connection string="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\MobileShawarma.mdf;Integrated Security=True;User Instance=True;MultipleActiveResultSets=True"" providerName="System.Data.EntityClient" />
请有人对我有答案吗?
推荐答案
托管它是什么意思? 如果要将其部署到其他服务器中,则需要确保在该服务器中正确安装了SQL Server Express。
What do you mean by hosting it? If you are deploying it in other servers, you need to make sure SQL Server Express is installed correctly in that server.
美好的一天!
这篇关于底层提供程序在Open上失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!