0

I made a C# Script in SSIS pulling data from GA API. On Monday, Google closed the access to the api via basic authentication

AnalyticsService service = new AnalyticsService(Dts.Variables["CONFIG_GA_PROJECT"].Value.ToString());
                    service.setUserCredentials(username, pass);

=> Got 404 error

So I want to move to the following security implementation : Accessing older GData APIs (Spreadsheet API) using OAuth 2 and a service account

The problem is : seems like we can't use nuget installation in SSIS Script as dll has to be pushed in the GAC.

I tried using : How to install a DLL to the GAC on Windows Server 2012 using only PowerShell (without having to install SDK or Visual Studio) but didn't work...

Is anyone found a way to use Google.Apis.Auth.dll in a SSIS C# Script task ?

Community
  • 1
  • 1
  • How about create an assembly which references the GA dll and then register that in the GAC? Then you can reference your new library from a script task – Mark Wojciechowicz May 28 '15 at 15:36

1 Answers1

1

The problem you are having is due to the fact that the Google .net client library aren't strong name signed, so they cant be pushed to GAC. Also remember that the current Google .net client only works with .net 4 and .net 4.5 so you are going to be locking out the older versions of SSIS I think.

This is reason I didn't use them in my Google Analytics Custom SSIS Data Reader and Connection Manager which uses Oauth2.

Options:

  1. Strong name sign the Client library yourself. code here
  2. Wait for the strong name signed version of the library to be released. I hope its done soon. Strong Naming in binaries #238
  3. Do what I did and code it all yourself with out the Client library, this allows you to code for .net 3.0 and support SQL server 2005 - 2012 like mine.

I hope this helps. The one I made is free for download you are welcome to have a look Data Reader for Google Analytics

Linda Lawton - DaImTo
  • 106,405
  • 32
  • 180
  • 449