c# - ASPX page to return http 500 error message regardless of Web.Config -


i have lot of ajax calls connect aspx page instead of web methods (i don't have control on that).

it happens call aspx wrong arguments, , http 500 throw (this want). in cases, need message of error, can handle in javascript ui.

problem : don't have control on web.config, because application can use on multiple server. people configuring web.config can whatever want, forwarding http 500...

so there neat way sure ui error message, regardless of web.config?

well, if end same problem me, , if don't use recent version of asp.net, can create own way pass errors.

this means server won't return http 500, http 200 instead json inside tell client problem happened. then, $.ajax or other libraries won't understand that, you'll have handle error case yourself. dirty, don't o unless don't have choice.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -