0

I'm developing an ASP.NET Web API application using VS 2015 and EF 6.1.3. It retrieves some data from an external SQL database and all worked as expected in my local machine. After published this application into Azure API App as well as enable the Application Insights for that. then I see the App map, in that I receive the following EF failed dependency error:

Invalid column name 'CreatedOn'.

No Database or code changes were made – before published it into azure: whatever the code runs in my local machine same code will publish it into azure. And I have no CreatedOn property in my entities and no such field in the database and I don't need it and don't want it in any case.

Before posting this question here, I search in google and find out some links but I am not satisfied with those answers.

CreatedOn column in Entity Framework 6

Invalid column name 'CreatedOn'

Entity Framework 4.3. Invalid column name 'CreatedOn'

Can you please tell me how to resolve this issue as soon as possible .

Pradeep
  • 5,101
  • 14
  • 68
  • 140
  • Are you publishing a debug build? Have compilation debug="true" in the web.config? If so, change those for release. – Steve Greene Jun 28 '17 at 13:38
  • Currently I used this line of code in web.config file, . If I modified debug =true with release=true. Then I got error like release attribute is not allowed. – Pradeep Jun 28 '17 at 13:48
  • You should do a [web config transform](https://msdn.microsoft.com/en-us/library/dd465318(v=vs.100).aspx) to remove that setting on the release build: ` ` – Steve Greene Jun 28 '17 at 13:51
  • It's already exists same above command in my Web.Release.config file but still I received the same error. – Pradeep Jun 29 '17 at 05:07

0 Answers0