c# - Method InterceptAsync in type Google.Apis.Auth.OAuth2.ServiceAccountCredential does not have an implementation -


i placed error message in title because scored web , cannot find single instance of else having issue.

i'm attempting use google .net api access analytics data shown here: http://www.toplinestrategies.com/dotneters/net/accessing-and-querying-google-analytics-via-service-account-c/?lang=en

i've followed everything, having created credential, pointed key file , password, , used email address client id.

but weird thing is, when execute page, fails error in title.

the offending line of code appears one:

    var credential = new serviceaccountcredential(        new serviceaccountcredential.initializer(clientid)        {            scopes = new[] { scope }        }.fromcertificate(certificate)); 

if remove line page doesn't cause exception, if add it, fails immediately.

but skips breakpoints on page entirely, can't step see or error is, if executing before page loads.

i suspected bad credentials if run fiddler see there no traffic passing google or anywhere, fails immediately.

this frustrating, has seen this? ideas might wrong? part angers me if set breakpoint anywhere on page, before failing code, doesn't hit, fails immediately, skipping breakpoints, how can be?

the path key correct, password correct, , email client id correct triple checked it, , can't problem either because never tries contact google.

i thought perhaps read/file permissions key gave full access on file, , x509certificate2 loads correctly...

so heck else possibly wrong here?

thanks

it turns out offending line of code 1 in web.config:

  <dependentassembly>     <assemblyidentity name="system.net.http" publickeytoken="b03f5f7f11d50a3a" culture="neutral" />     <bindingredirect oldversion="0.0.0.0-2.0.0.0" newversion="2.0.0.0" />   </dependentassembly> 

the version of system.net.http in bin folder 2.1.10. not sure why didn't crash whole site instead of 1 random component removing fixed problem


Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -