asp.net - How to configure error response formatting on Windows Azure Web App -


i building demo api sort of issue tracker using open rasta , asp.net - , deploying windows azure web app.

the api returns detailed error information in dedicated media-type (application/mason+json). on local machine expected error response, on azure error code (for instance 404) , standard asp.net error message.

see instance http://mason-issue-tracker.azurewebsites.net/projects/999 should have returned application/mason+json returns html instead.

is there setting somewhere in azure change this?

the missing setting in web.config this:

<system.webserver>    <httperrors existingresponse="passthrough"></httperrors> </system.webserver> 

that fixed me. still not know why required on azure not on local machine(s).

found answer @ http://develoq.net/2011/returning-a-body-content-with-400-http-status-code/. setting documented @ https://msdn.microsoft.com/en-us/library/ms690497%28vs.90%29.aspx


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - Bypass Geo Redirect for specific directories -

php - .htaccess mod_rewrite for dynamic url which has domain names -