I have issue with http bearer auth json post to api.

Used apps or and php methods

  • wget
  • console curl
  • php curl
  • file get contents

Sucessfull scenarios - post request

  1. Computer connected to same network as server.
  • request from wsl1 Debian
  • request from xammp php curl
  • request with empty json payload or payload only with id from:
    • virtual box Debian
    • wsl2 Debian
    • server
  • request with form encoded payload from all typem of connections
  1. Computer connected to vpn
  • request from xammp php curl
  • request from virtual box Debian with vpn connection
  • request from wsl1 and wsl2 Debian

Sucessfull scenarios - get request

All typem of connections

Fail scenarios

  1. Computer connected to same network as server
  • request from server with complete payload
  • request from virtual box Debian with full payload
  • request from wsl2 Debian with full payload

Fail symptoms

Sucessfull handshake and http post request. Response from server about window scalling. Eny response after first ack tcp request from server. Few retransmissions and api close connection

Api configuration

  • iis 8.5
  • ASP.net
  • http 1.1
  • auth bearer
  • encoding chunked

Client configuration

  • windows, Apache, php 7.0 - all types of connections work
  • Debian 9, curl - connections work only from a other network or by vpn

Any suggestions?

Edit 1

I have made some screenshots from wireshark. All machines are in same netwrok as tested server - not api.



Edit 2

I have done some research and i discovered that it does not work also from other hosting provider. FreeBSD os and console curl. Maybe that information will be helpfull.

  • 1
    A few things you might consider, 1) Never post everything in a single paragraph. 2) Draw diagrams and build tables when you attempt to tell complex setup and compare failed/successful scenarios. – Lex Li Mar 17 at 21:40
  • I have changed question structure. Do you have and idea how to solve that issue? – newman Mar 18 at 5:32
  • Can you find anything weird in %SystemRoot%\System32\LogFiles\HTTPERR about those failed requests? docs.microsoft.com/en-us/troubleshoot/aspnet/… – Lex Li Mar 18 at 5:53
  • I do not have Access to api server but provider said that logs look fine – newman Mar 18 at 9:18
  • If you don't have access to the server itself, then I think that's impossible to move on. To troubleshoot TCP reset, it is common to use tools like Wireshark on both the browser/server side to capture network packets and identify where the reset packets come from (the server or some network device in between). You can see how important server access is. – Lex Li Mar 18 at 14:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.