简体   繁体   中英

On azure web APi show 500 internal server error

I have developed a web api project in visual studio 2013 update 4 with EF6 in windows 8.1 pro pc and here is my connection string generated by EF

<connectionStrings>
<add name="bcsmdbEntities" connectionString="metadata=res://*/BCSMModel.csdl|res://*/BCSMModel.ssdl|res://*/BCSMModel.msl;
     provider=System.Data.SqlClient;provider connection string=&quot;data source=j01qw1lha2.database.windows.net;
     initial catalog=bcsmdb;persist security info=True;user id=xxxxxx;password=xxxxxxxx;
     MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />

when I am performing GET request its working fine in my local machine but after deploy it in azure as web app its return 500 internal server error. The error details are like this

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

Can anyone please help me to find out what is going wrong ? Thanks in advance

我发现了问题,实际上是天蓝色的管理员正确的问题,已解决的问题

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM