0

Using RestRequest to a REST endpoint (Asana). Some machines get the request returned properly and some don't get anything. Doing more troubleshooting I think that the machines that do not get responses have IE as their default browser.

If I test the url manually in a Chrome browser I get the response. If I test in the IE browser then I get a "Do you want to Open or Save" prompt. I=My theory is that an IE setting of somekind is blocking the request with this question and since it is an app it just blocks.

My code is simple:

        var client = new RestClient(@"https://app.asana.com/api/1.0/workspaces/99999999999999/tasks/search);
        var request = new RestRequest(Method.GET);
        request.AddHeader("Authorization", "Bearer " + asanaToken);
        IRestResponse response = client.Execute(request);

How can I get around this?

Eric Snyder
  • 1,816
  • 3
  • 22
  • 46
  • 2
    The systems default browser shouldn't be relevant to how this code functions. –  May 14 '19 at 15:16
  • 1
    You need to do more debugging than just saying "some don't get anything". There will be a response with some detail in it, but this code isn't enough to diagnose it. And completely agree with @Amy, the browser makes no difference at all. – DavidG May 14 '19 at 15:17
  • does asana use certificates not installed (their CA) in some of the machines? – Cleptus May 14 '19 at 15:20
  • @DavidG - Yes, I get what you are saying. It is only happening on certain machines. I think I am going to have to create a version that logs stuff and install it on their machine. I cannot duplicate the result on my dev machine. – Eric Snyder May 14 '19 at 17:36
  • @EricSnyder Basic logging should be part of any application by default. It's easier to solve issues with more diagnostic data. –  May 14 '19 at 18:05
  • @Amy - Completely agree. I was being lazy. The error I am getting is: The underlying connection was closed: An unexpected error occurred on a send. – Eric Snyder May 14 '19 at 19:14
  • @bradbury9 - Don't think so. – Eric Snyder May 14 '19 at 19:17
  • 1
    @EricSnyder That sounds like a TLS version issue. See https://stackoverflow.com/questions/22627977/the-underlying-connection-was-closed-an-unexpected-error-occurred-on-a-send –  May 14 '19 at 19:18
  • See @Amy pointer to [this solution here.](https://stackoverflow.com/questions/22627977/the-underlying-connection-was-closed-an-unexpected-error-occurred-on-a-send) Solved it! – Eric Snyder May 14 '19 at 19:30

0 Answers0