简体   繁体   English

无法找出客户端错误

[英]Cannot figure out Client Error

In an ASP.NET Angular Application, I have a particular method I am calling through angularJS to display some data from the database, but doing so, I get an error that states " An Error has occurred . Error detailed not Sent by the server." 在ASP.NET Angular应用程序中,我有一个特定的方法,我要通过angularJS调用该方法以显示数据库中的某些数据,但这样做时,我收到一条错误消息,指出“ 发生了错误。服务器未发送详细错误信息。 ” I confirmed it by debugging the method and discovered it works just fine and retrieves the data, but when it's time to display on the client, this happens. 我通过调试该方法进行了确认,发现它可以正常工作并检索数据,但是当需要在客户端上显示时,就会发生这种情况。 I have opened the browser console to check what is happening, but the error is not logged there either. 我已经打开浏览器控制台来检查发生了什么,但是该错误也未记录在该控制台中。 If Only I can know what the problem is exactly, it would be so much better. 如果只有我能知道问题出在哪里,那就好得多了。 See my code below; 请参阅下面的代码;

C# C#

    public async Task<ListResultDto<GoodsRequestDto>> GetGoodsRequests()
    {
        var goodsRequests = await _goodsRequestRepo.GetAllListAsync();

        return new ListResultDto<GoodsRequestDto>(
            goodsRequests.MapTo<List<GoodsRequestDto>>()
            );
    }

AngularJS AngularJS

           vm.loadGoodsRequests = function () {
                projectService.getGoodsRequests({}).success(function (result) {
                    vm.goodsRequests = result.items;
                });
            }

The HTML HTML

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

I used similar approach for other pages of the application and I didn't get any such problem. 我对应用程序的其他页面使用了类似的方法,但是没有遇到任何此类问题。 I don't know what I'm doing wrong and worst of all, I don't know the exact cause of the error. 我不知道我在做什么错,最糟糕的是,我不知道错误的确切原因。

If your'e using the ASP.NET boilerplate , you can see the logs from "/host/maintenance" . 如果您使用的是ASP.NET样板 ,则可以从“ / host / maintenance”查看日志。 In this case you need to log in with the host admin. 在这种情况下,您需要以主机管理员身份登录。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 编译时没有错误代码,但屏幕上没有数据表,我不知道为什么 - No error codes on compilation but there is no datatable on the screen and I cannot figure out why 无法弄清楚如何在C#中的查询表达式错误中修复语法错误(缺少运算符) - Cannot figure out how to fix syntax error (missing operator) in query expression error in C# 我在 Unity 中收到 2 条错误消息,但不知道如何修复它 - I am getting 2 Error messages in Unity and cannot figure out how to fix it 无法反序列化当前的JSON数组(例如[1,2,3])。 C#,无法找出错误 - Cannot deserialize the current JSON array (e.g. [1,2,3]). C#, cant figure the error out 我不断收到此错误,条件表达式中的数据类型不匹配。 我不知道为什么 - I keep getting this error , Data type mismatch in criteria expression. I cannot figure out why 无法弄清楚此jQuery代码的工作方式 - Cannot figure out how this jQuery code is working 需要帮助找出此搜索程序中的错误 - Need help to figure out the error in this search program 谁能找到使用此FTP客户端浏览目录的方法? - Can anyone figure out a way to navigate a directory using this FTP Client? 无法找出此“数组索引超出范围”错误 - Can't Figure out this “array index is out of range” Error 无法弄清楚如何从View中的GroupBy循环中获取标头数据 - Cannot figure how to get header data out of GroupBy loop in View
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM