You are viewing limited content. For full access, please sign in.

Question

Question

Workflow HTTP Post - Entering the URI separately from the domain causes 500 error

asked on July 24, 2018 Show version history

Just to verify what it means by URI I used the wiki page. It is everything in the URL proceeding the domain name, including the first forward slash character.

So I enter the domain name in the web service.

And the URI in the URI field.

But this returns a 500 error.

Where if I enter everything into the chrome URL field on the same server as one string, the server correctly responds.

 

Update. Running the following C# Code works from the same workflow server but I MUST set the connection to use TLS or I get the same error, which in Wireshark shows that it is a reset request. I am wondering if the problem is because I have the wrong SSL configuration in the http request activity. Do I need to tell it to use TLS somewhere, I thought that was determined by the Web Server, not the user.

        protected override void Execute()
        {
            System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls11;
            // Write your code here.
            string output = GetUsers();
            SetToken("output",output);

        }

            public string GetUsers()
            {
                var req = WebRequest.Create("https://app.asana.com/api/1.0/users");
                SetBasicAuthentication(req);
                return new StreamReader(req.GetResponse().GetResponseStream()).ReadToEnd();
            }

            void SetBasicAuthentication(WebRequest req)
            {
                var authInfo = apiKey + ":";
                var encodedAuthInfo = Convert.ToBase64String(
                Encoding.Default.GetBytes(authInfo));
                req.Headers.Add("Authorization", "Basic " + encodedAuthInfo);
            }

 

0 0

Answer

SELECTED ANSWER
replied on July 24, 2018

You're on the right track with TLS, I think. .Net 4, which Workflow uses, defaults to using TLS 1.0. Asana indicates they stopped supporting TLS 1.0 a while back.

.Net 4 extra configuration needed for TLS 1.2 is documented in KB 1013919.

0 0
replied on July 25, 2018

Perfect, I will try this out next week! Thank you

0 0
replied on July 31, 2018

That fixed it right away, no restart required. Thanks you! Useful article, Microsoft is hiding everything in the registry it seems.

0 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.