Podio AuthenticateWithApp throws WinHttpException on Windows Server 2008

0

I've made a small asp.net website integrating with Podio. I'm using the Official Podio.Async Client Library v. 2.0.1. Running from a local testing server in visual studio 2015 on my Win10 pc the website works fine.

My problem occurs, when I publish the site to our Windows 2008 server. When I try to run the code it throws this exeption:

System.Net.Http.WinHttpException: The parameter is incorrect

I have installed Microsoft .NET Framework 4.6.1 on the Win2008 server.

I'm wondering if i'm missing some prerequisites on the Windows 2008 server, since the site works fine locally.

The error is thrown on this line:

await podio.AuthenticateWithApp(appid, appsecret);

Stack Trace:

[WinHttpException (0x80070057): The parameter is incorrect]
       System.Net.Http.WinHttpHandler.SetSessionHandleTlsOptions(SafeWinHttpHandle sessionHandle) +234
       System.Net.Http.WinHttpHandler.SetSessionHandleOptions(SafeWinHttpHandle sessionHandle) +343
       System.Net.Http.WinHttpHandler.EnsureSessionHandleExists(WinHttpRequestState state) +490
       System.Net.Http.<StartRequest>d__101.MoveNext() +259

[HttpRequestException: An error occurred while sending the request.]
   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +99
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +58
   System.Net.Http.<FinishSendAsync>d__58.MoveNext() +948
   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +99
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +58
   PodioAPI.<Request>d__36`1.MoveNext() +614
   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +99
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +58
   PodioAPI.<Post>d__32`1.MoveNext() +1721
   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +99
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +58
   PodioAPI.<Authenticate>d__44.MoveNext() +283
   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +99
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +58
   PodioAPI.<AuthenticateWithApp>d__39.MoveNext() +322
   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +99
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +58
   System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() +28
   <loadPodioItems>d__5.MoveNext() in c:\Data\Services\App_Code\PodioData.cs:102
   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +99
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +58
   System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() +28
   <updatePodioSuppliers>d__46.MoveNext() in c:\Data\Services\App_Code\PodioData.cs:475
   System.Runtime.CompilerServices.<>c.<ThrowAsync>b__6_0(Object state) +52
   System.Web.<>c__DisplayClass22_0.<Post>b__0() +15
   System.Web.Util.SynchronizationHelper.SafeWrapCallback(Action action) +89
   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +99
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +58
   System.Web.Util.WithinCancellableCallbackTaskAwaiter.GetResult() +30
   System.Web.UI.<LoadRecursiveAsync>d__246.MoveNext() +393
   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +99
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +58
   System.Web.Util.WithinCancellableCallbackTaskAwaiter.GetResult() +30
   System.Web.UI.<ProcessRequestMainAsync>d__523.MoveNext() +4639
c#
asp.net
podio
asked on Stack Overflow Jan 23, 2019 by user3173406 • edited Jan 23, 2019 by user3173406

1 Answer

0

Most likely error in is TLS 1.0.

From Podio Help Article:

API Security Update Upcoming change for developers using Podio's API ....

What you need to do by 27 June 2018

Ensure you are using TLS 1.1 as a minimum, though we recommend upgrading to TLS 1.2. This applies to private, public and partner applications connecting to the Podio API.

Please note that if you access Podio API then you are the client. And it doesn't matter if web server on your host supports TLS 1.2, what matters is if your API client supports TLS 1.2 when connecting to the Podio backend.

answered on Stack Overflow Jan 24, 2019 by Pavlo - Podio

User contributions licensed under CC BY-SA 3.0