在ASP.NET角应用程序中,我有一个通过angularJS调用的特定方法来显示数据库中的一些数据,但这样做,我得到了一个错误,即“a error已发生。错误详细说明未由服务器发送”。我通过调试该方法确认了它,发现它工作正常并检索数据,但当需要在客户端上显示时,就会发生这种情况。我已经打开浏览器控制台来检查正在发生的事情,但是错误也没有记录在那里。如果我能准确地知道问题所在,那就好多了。见下面的代码;
C#
public async Task<ListResultDto<GoodsRequestDto>> GetGoodsRequests()
{
var goodsRequests = await _goodsRequestRepo.GetAllListAsync();
return new ListResultDto<GoodsRequestDto>(
goodsRequests.MapTo<List<GoodsRequestDto>>()
);
}AngularJS
vm.loadGoodsRequests = function () {
projectService.getGoodsRequests({}).success(function (result) {
vm.goodsRequests = result.items;
});
} <div ng-if="vm.goodsRequests.length" ng-repeat="gr in vm.goodsRequests" class="classInfo-list-item col-md-6">
<div class="classInfo-body">
<h3 class="classInfo-title">
{{gr.categoryItem.name + "_" + gr.brand.name + "_" + gr.product.name | cut:true:50:' ...'}}
</h3>
<p class="classInfo-description">Quantity: {{gr.quantity}} {{gr.unit}}</p>
<p class="classInfo-description">Payment Term: {{gr.paymentTerm}}</p>
<div class="classInfo-registration-info">
{{gr.goodsQuotes.length}} Quote(s).
</div>
<div class="classInfo-actions">
<a class="btn btn-sm btn-info" ng-href="#/my-goods-requests/{{gr.id}}">@L("Details") <i class="fa fa-arrow-circle-right"></i></a>
</div>
<span ng-class="vm.statusClass(gr.statusString)" class="classInfo-date"> {{gr.statusString }}</span>
</div>
</div>对于应用程序的其他页面,我使用了类似的方法,并且没有遇到任何这样的问题。我不知道我做错了什么,最糟糕的是,我不知道错误的确切原因。
发布于 2017-05-12 10:38:56
如果您使用的是"/host/maintenance".的ASP.NET样板,您可以从中看到这些日志在这种情况下,您需要与主机管理员登录。
https://stackoverflow.com/questions/42837760
复制相似问题