Javascript ASMX web service call - Handling Exceptions

筅森魡賤 提交于 2019-12-11 13:31:26

问题


I've got a web service that returns me an array of strings. I call this service from my javascript...

WebPortal.WebPortalServices.GetAllProperties(success, fail);

Now this works fine, I have my success and fail functions in my javascript. There seems to be a limit, either its the file size of the array or maybe the item count in the array, but either way when I get above 2500~ strings in the returned array the call fails. I.e my fail function is called.

How can I get the reason the service failed in my 'fail' function? I get no errors in my ASMX when I step through the service, it returns the Array of strings fine.

Thanks,

James


回答1:


function fail(arg)

{

alert("error has occured: " + arg._message);

}



来源:https://stackoverflow.com/questions/6438339/javascript-asmx-web-service-call-handling-exceptions

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!