我正在使用javascript对我的MVC控制器进行POST。如果出现故障,服务器将捕获异常并返回错误消息。这在HTTP下工作正常。我在IIS Express上启用了SSL,并且突然返回的错误包含错误页面的HTML,而不是异常消息。
这可能是什么原因?
这是在javascript:
var pointingAtMe = { log: function() { console.log('1'); } }
var x = pointingAtMe;
var y = pointingAtMe;
// change the actual thing x and y are both pointing to
x.log = function() { console.log('2'); } // this line also sets `y.log` and `pointingAtMe.log`since they all point to the same thing
// and the change gets applied to both
y.log(); // logs '2'
这是在服务器上:
var config = {
url: "https://localhost:44301/update",
type: "POST",
data: data
};
$.ajax(config).fail(function (error) {
// error.statusText contains exception.Message over HTTP
// error.statusText contains "OK" over HTTPS (IIS Express)
});