我在Visual Studio 2013更新4中使用Windows 8.1 pro pc中的EF6开发了一个web api项目,这是我的EF生成的连接字符串
<connectionStrings>
<add name="bcsmdbEntities" connectionString="metadata=res://*/BCSMModel.csdl|res://*/BCSMModel.ssdl|res://*/BCSMModel.msl;
provider=System.Data.SqlClient;provider connection string="data source=j01qw1lha2.database.windows.net;
initial catalog=bcsmdb;persist security info=True;user id=xxxxxx;password=xxxxxxxx;
MultipleActiveResultSets=True;App=EntityFramework"" providerName="System.Data.EntityClient" />
当我执行GET请求时,它在我的本地计算机上正常工作但在将其作为web应用程序部署在azure之后返回500内部服务器错误。错误详细信息如下
{
"Message": "An error has occurred.",
"ExceptionMessage": "The underlying provider failed on Open.",
"ExceptionType": "System.Data.Entity.Core.EntityException",
"StackTrace": " at System.Data.Entity.Core.EntityClient.EntityConnection.Open()\r\n at System.Data.Entity.Core.Objects.ObjectContext.EnsureConnection(Boolean shouldMonitorTransactions)\r\n at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess)\r\n at System.Data.Entity.Core.Objects.ObjectQuery`1.<>c__DisplayClass7.<GetResults>b__5()\r\n
任何人都可以帮我找出问题所在吗?提前致谢
答案 0 :(得分:0)
我发现了问题,实际上是天蓝色的管理员权限问题,问题已解决