ASP.NET MVC5 Google API GoogleWebAuthorizationBroker.AuthorizeAsync works locally but not deployed in IIS

I had a strange problem trying to get the MVC5 application to work with the Google Mirror API when it was deployed (or with any Google API).

This is the code I'm trying my best to work with:

UserCredential credentials = GoogleWebAuthorizationBroker.AuthorizeAsync(
    new ClientSecrets
    {
        ClientId = "my_client_id",
        ClientSecret = "my_client_Secret"
    },
    new[] { MirrorService.Scope.GlassTimeline }, 
    "username", 
    CancellationToken.None,
    new GlassDataStore()
).Result;

When I run it locally from Visual Studio 2013, everything works fine - the above code runs and passes authentication, is stored in the database, and I can continue as normal sending cards, etc.

, "" ( Subscriptions), , . , - , , , .

, ( ), w3p.exe ( , ).

- , GoogleWebAuthorizationBroker, , .

, web.configs .

? , - , , .. .

!

edit: . , WebAuthorizationBroker MVC - GoogleAuthorizationCodeFlows. , - MVC5, VS2013, !

+2
1

- , GoogleAuthorizationCodeFlows, , :)

, , Google.

0

All Articles