0

We are trying to find out why background requests to a particular endpoint (http or https) is never getting to IIS. The IIS logs show other requests from our device but none from our background requests. They do show in the HTTP.SYS logs though with no error code, just a 'Request_Cancelled'

Under a different environment in test these requests do work as expected. So the only differences seem to be firewall settings or something we haven't found yet.

Having searched for possible causes I have seen information about possible invalid SSL certificates. We current don't use https for where we are experiencing the issue, and in test we have tried both successfully. Another possible cause may have been latency, so we tried adding a 10 second delay to all requests in test and this also worked as expected.

What could other causes of this error be, and preventing a request to IIS?

Nathan
  • 1
  • 2
  • Is it all iOS devices or just some devices? Maybe easier to narrow it down by the device that connects and see if there is a configuration or security issue at the device level that needs to be included. – GregN Sep 25 '19 at 08:15
  • The test device and live device are different. So it is worth checking with another device to see if there is a difference. Thanks – Nathan Sep 25 '19 at 12:08
  • Testing with the same device types still has the error. We are going to try adding a trace capture more details. – Nathan Sep 25 '19 at 13:54

2 Answers2

2

I think its a bit difficult to find the root cause for Request cancelled. You could try to capture and analyze http.sys etl log.

How to capture http.sys etl log.

  1. run CMD.EXE with administrator

  2. use cd c:\etl to locate your folder that you want to place etl log

  3. Run logman start httptrace -p Microsoft-Windows-HttpService 0xFFFF -o httptrace.etl -ets

  4. Try to reproduce the problem

  5. Stop the trace with command logman stop httptrace -ets

  6. Then you should see an .etl file displayed there

How to analyze these logs.

1.Download and install MS network monitor: https://www.microsoft.com/en-us/download/details.aspx?id=4865

2.Open the etl log with network monitor

3.Select Parser Profiles->network monitor parser->Windows on upper right corner

4.Then you should be able all events happened when you access the endpoint from IOS.

Since we can't find much document about how to troubleshooting request_cancelled error. Maybe analyze http.sys etl would be a good beginning

Jokies Ding
  • 3,374
  • 1
  • 5
  • 10
0

I've just experienced a similar issue with a vendor-supplied application - one of the XHR requests failing with the web server just abandoning the connection. The IIS log records the request as successful (200), but the HTTPERR log reporting it as "Request_Cancelled".

In my case, this was the result of a response limit applied by the vendor in the web.config (specifically: configuration/system.serviceModel/behaviors/serviceBehaviors/behavior/dataContractSerializer@maxItemsInObjectGraph - as soon as the number of objects serialised in a single response exceeded this, the request got cancelled), and removing this limit allowed the application to work correctly.

Whilst this obviously isn't going to be the same for all cases of unexpected 'Request_Cancelled's, it may be worth checking both your web.config as well as your system-wide C:\Windows\System32\inetsrv\config\applicationHost.config for anything that limits the size of the response.

Jason Musgrove
  • 3,574
  • 19
  • 14