【发布时间】:2017-05-15 10:23:05
【问题描述】:
我正在使用带有样板框架的 asp.net 核心。在实现保存功能时,我收到“发生错误!服务器未发送错误详细信息。”生产服务器上的错误。在调试时,我发现控件进入 .fail() 函数,而不是进入 .done() 函数。记录被保存到数据库中,我在弹出窗口中收到以下消息:“发生错误!服务器未发送错误详细信息。”
下面是使用的jquery:
this.save = function (modalManager) {
debugger;
_$Form = _modalManager.getModal().find('form[name=FormName]');
var orderTemplateId = $("#orderTemplateId").val();
var OrderTemplate = _$Form.serializeFormToObject();
_modalManager.setBusy(true);
debugger;
OrderTemplate.id = orderTemplateId;
var AssignedProductsIds = _findAssignedProductList();
debugger;
_orderTemplateService.createOrUpdateOrderTemplate({
OrderTemplate: OrderTemplate,
AssignedProductsIds: AssignedProductsIds,
}).done(function (result) {
debugger;
abp.notify.info(app.localize('SavedSuccessfully'));
_modalManager.close();
}).fail(function (result) {
debugger;
_modalManager.close();
}).always(function (result) {
_modalManager.setBusy(false);
window.location.href = '/app/zone';
});
};
该功能在本地服务器上完美运行,没有任何错误。所以,我不知道哪里出错了?
谢谢。
【问题讨论】:
-
在浏览器中检查控制台。它至少会为您提供可用于调试问题的 HTTP 响应代码
-
你看过日志文件了吗?
-
abp 的版本?
标签: jquery asp.net-core-mvc asp.net-ajax aspnetboilerplate