I am getting 'The Underlining provider failed on Open' when calling one particular endpoint in the WebAPI using Angular's $resource to populate the dropdown lists. The form in the MVC View is like the following:
<div ng-app="myApp" ng-controller="myController as ctrl">
<select ng-options="..." />
<select ng-options="..." />
<select ng-options="..." />
</div>
The MVC/Angular client front-end project has $resource configured in myApp.factory(). The WebAPI service project has only one controller with several endpoints. All methods use the same repository to retrieve data from SQL Server via a common Context object. When debugging the instance in VS2015, all methods return data correctly. When the project is published to the IIS Server, the troublesome endpoint would return data for several initial calls. Then it returns HTTP 500 error, saying 'The underlying provider failed on Open'. When the project is republished again, the endpoint works for several calls then Error 500 again. Does anyone know why? Thanks.