Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Some sort of api runtime issue for blog api

Hello,

 

I am trying to connect a google api to display a list of blogs.  I've created an api key and I'm accessing the blog list via the URI with the api key.  Locally I am able to run and retrieve the data for display, but when I post my code to a Godaddy server, I get this error:

Attempt by method 'Google.Apis.Util.UriPatcher+<>c__DisplayClass0_0.<PatchUriQuirks>b__0(System.String)' to access field 'System.UriParser.HttpUri' failed.

 

Is there some dll that I need to be overriding the reference to on the server? I did have to update my web config to point to the correct newtonsoft json and the correct api options.

 

For reference, my packages config reads as follows:

<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Google.Apis" version="1.53.0" targetFramework="net45" />
<package id="Google.Apis.Auth" version="1.53.0" targetFramework="net45" />
<package id="Google.Apis.Blogger.v3" version="1.53.0.2249" targetFramework="net45" />
<package id="Google.Apis.Core" version="1.53.0" targetFramework="net45" />
<package id="HtmlAgilityPack" version="1.11.34" targetFramework="net45" />
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net45" />
<package id="System.Net.Http" version="4.3.4" targetFramework="net452" />
</packages>

 

my web config reads as follows:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
<!--
For a description of web.config changes see http://go.microsoft.com/fwlink/?LinkId=235367.

The following attributes can be set on the <httpRuntime> tag.
<system.Web>
<httpRuntime targetFramework="4.5" />
</system.Web>
-->
<system.web>
<compilation debug="true" targetFramework="4.5.2">
<assemblies>
<add assembly="System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
</assemblies>
</compilation>
<pages controlRenderingCompatibilityVersion="4.0" />
<customErrors mode="Off" />
</system.web>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Google.Apis" publicKeyToken="4b01fa6e34db77ab" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.53.0.0" newVersion="1.53.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Google.Apis.Core" publicKeyToken="4b01fa6e34db77ab" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.53.0.0" newVersion="1.53.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Google.Apis.Auth" publicKeyToken="4b01fa6e34db77ab" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.53.0.0" newVersion="1.53.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Google.Apis.Blogger.v3" publicKeyToken="4b01fa6e34db77ab" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.53.0.0" newVersion="1.53.0.2249" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

 

0 3 274
3 REPLIES 3

Is it related to Apigee or a different product?

https://docs.apigee.com/api-platform/get-started/get-started

 

I'm getting the same error, it works fine in one machine and in another it throws this error. Did you manage to fix it?

wrong forum. Ask elsewhere.

Top Solution Authors