Friday, October 06, 2017

ColdFusion 2016, IIS 8.5, Skip IIS Custom Errors and 401 responses

Well I thought I would just put this quick thought out as it had me pulling my hair for a bit.

I developed an API for a client that when it fails authentication it returns a 401 and a JSON response in the body. In ColdFusion 11 I had no issues and then I just updated their staging server to ColdFusion 2016 and it started to return 401 without the response BODY ( sometimes it would and sometimes it would not ). This caused some issues with an app I am developing that uses this API and hence the hair pulling.

So, I decided to look at my connector and see it it was a setting I chose and it was, apparently clicking on Skip IIS Custom Errors causes this issue.

I have written about this before and recommended it (http://www.giancarlogomez.com/2016/05/coldfusion-10-iis-7-custom-errors-and.html) but now it appears I might revert back to the default setting (at least for this client ).

Now, after comparing the ColdFusion 11 install that I have still on production, it appears I have this setting set to false and on this upgrade I decided to set to true ( or click in the wsconfig GUI ). I don't know why I did this, maybe because I saw a checkbox for it and was like cool I will click it ( squirrel ).

So as a reminder to myself and hopefully to anyone else that might experience this issue, just set that setting to false and everything will go back to normal :-).



Post a Comment