OAuth2 error windows 8.1 GoogleWebAuthorizationBroker.AuthorizeAsync

110 views
Skip to first unread message

Derek Wade

unread,
May 16, 2015, 7:57:13 PM5/16/15
to google-api-d...@googlegroups.com, dw...@individualsoftware.com
Could not load type 'System.Security.Authentication.SslProtocols' from assembly 'System.Net.Primitives, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'



This error is thrown when attempting to call GoogleWebAuthorizationBroker.AuthorizeAsync.

I am developing under Windows 7 and my program works fine. When trying to run under Windows 8.1, this error is thrown.

The difference I've found is under Windows 8.1, the System.Net.Primitives assembly version is 4.0.30319.33440 (8/9/2013) and under my Windows 7 working system the version is 4.0.30319.34209 (4/11/2014).

I've not found a way to update Windows 8.1 to this revision. I've tried to override loading the newer assembly through the manifest with no luck.

Has anyone else experienced this and found a solution?

Eyal Peled

unread,
May 16, 2015, 7:59:08 PM5/16/15
to google-api-d...@googlegroups.com, dw...@individualsoftware.com
You need to target a different platform when you run under Windows 8.1.
Google.Apis has a different OAuth implementation for Windows 8.1, Windows Phone, etc. Update the project, recompile, and follow the guidelines in https://developers.google.com/api-client-library/dotnet/guide/aaa_oauth.

Good luck!
Eyal

--
You received this message because you are subscribed to the Google Groups "google-api-dotnet-client" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-api-dotnet-...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages