locked
API routing not working in production RRS feed

  • Question

  • User-1165400470 posted

    Hi

    My web api app works fine locally and gets consumed fine by client app. After deployment to remote IIS 7.5 server however client app can't consume API and a '500 - Internal server error' is returned. The relevant IIS log is given below at the end. I can access API just fine using url http://my-api.mydomain.com/swagger/.

    Apart from IIS folder permissions what else could be the reason for this issue and how can I resolve it?

    Thanks

    Regards

    #Software: Microsoft Internet Information Services 7.5
    #Version: 1.0
    #Date: 2020-06-23 12:25:54
    #Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) sc-status sc-substatus sc-win32-status time-taken
    2020-06-23 12:25:54 <server ip> POST /v2.0/token/create - 80 - <client ip> Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/83.0.4103.97+Safari/537.36 500 0 0 3319
    2020-06-23 12:26:07 <server ip> POST /v2.0/token/create - 80 - <client ip> Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/83.0.4103.97+Safari/537.36 500 0 0 72
    2020-06-23 12:26:07 <server ip> POST /v2.0/token/create - 80 - <client ip> Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/83.0.4103.97+Safari/537.36 500 0 0 57
    2020-06-23 12:28:05 <server ip> GET / - 80 - <server ip> Mozilla/5.0+(Windows+NT+6.1;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/83.0.4103.106+Safari/537.36 200 0 0 954
    2020-06-23 12:29:10 <server ip> POST /v2.0/token/create - 80 - <client ip> Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/83.0.4103.97+Safari/537.36 500 0 0 306
    2020-06-23 12:29:11 <server ip> POST /v2.0/token/create - 80 - <client ip> Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/83.0.4103.97+Safari/537.36 500 0 0 93
    2020-06-23 12:33:54 <server ip> POST /v2.0/token/create - 80 - <client ip> Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/83.0.4103.97+Safari/537.36 500 0 0 80
    2020-06-23 12:35:01 <server ip> POST /v2.0/token/create - 80 - <client ip> Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/83.0.4103.97+Safari/537.36 500 0 0 74
    2020-06-23 12:35:04 <server ip> POST /v2.0/token/create - 80 - <client ip> Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/83.0.4103.97+Safari/537.36 500 0 0 58
    2020-06-23 12:35:06 <server ip> POST /v2.0/token/create - 80 - <client ip> Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/83.0.4103.97+Safari/537.36 500 0 0 54
    2020-06-23 12:42:24 <server ip> GET / - 80 - <client ip> Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/83.0.4103.97+Safari/537.36 200 0 0 65
    2020-06-23 12:42:26 <server ip> GET / - 80 - <client ip> Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/83.0.4103.97+Safari/537.36 200 0 0 56
    2020-06-23 12:42:35 <server ip> GET / - 80 - <client ip> Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/83.0.4103.97+Safari/537.36 200 0 0 63
    2020-06-23 12:42:38 <server ip> GET / - 80 - <client ip> Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/83.0.4103.97+Safari/537.36 200 0 0 58
    2020-06-23 12:42:38 <server ip> POST /token - 80 - <client ip> Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/83.0.4103.97+Safari/537.36 500 0 0 6928
    2020-06-23 12:42:40 <server ip> POST /token - 80 - <client ip> Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/83.0.4103.97+Safari/537.36 500 0 0 113
    2020-06-23 12:42:47 <server ip> GET / - 80 - <client ip> Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/83.0.4103.97+Safari/537.36 200 0 0 60
    2020-06-23 12:42:50 <server ip> GET / - 80 - <client ip> Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/83.0.4103.97+Safari/537.36 200 0 0 55
    2020-06-23 12:42:59 <server ip> GET / - 80 - <client ip> Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/83.0.4103.97+Safari/537.36 200 0 0 71
    2020-06-23 12:43:02 <server ip> GET / - 80 - <client ip> Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/83.0.4103.97+Safari/537.36 200 0 0 69
    2020-06-23 12:43:11 <server ip> GET / - 80 - <client ip> Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/83.0.4103.97+Safari/537.36 200 0 0 60
    2020-06-23 12:43:13 <server ip> GET / - 80 - <client ip> Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/83.0.4103.97+Safari/537.36 200 0 0 56
    2020-06-23 12:43:23 <server ip> GET / - 80 - <client ip> Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/83.0.4103.97+Safari/537.36 200 0 0 59
    2020-06-23 12:43:25 <server ip> GET / - 80 - <client ip> Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/83.0.4103.97+Safari/537.36 200 0 0 53
    2020-06-23 12:43:35 <server ip> GET / - 80 - <client ip> Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/83.0.4103.97+Safari/537.36 200 0 0 55
    2020-06-23 12:43:37 <server ip> GET / - 80 - <client ip> Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/83.0.4103.97+Safari/537.36 200 0 0 55
    

    Tuesday, June 23, 2020 1:30 PM

All replies

  • User475983607 posted

    This is not a routing issue.  A 500 error means there is an exception on the server.  There can be many reasons for 500 errors.; configuration like an incorrect connection string and  unexpected or missing data.  On the client, it could be an unexpected response from Web API.

    The solution is adding better logging and exception handling to find the bug.

    Tuesday, June 23, 2020 1:53 PM
  • User-1165400470 posted

    Thanks.

    Tuesday, June 23, 2020 9:46 PM