The type initialiser for 'MyDR' threw an exception

Discussion created by RJKSolutions on Jul 26, 2012
Latest reply on Jul 26, 2012 by RJKSolutions

Fellow vCampers...


I have a baffling issue that I want to run by you all to see if anyone has experienced this, or has some intelligent suggestions.  For illustrative purposes I refer to MyDR as the custom Data Reference in question.


I have a custom data reference, MyDR, that has maybe 8 or 9 supporting assemblies.  On the AF server itself the custom data reference works fine, it essentially calls some web services for data.  This makes me happy.  


However, I want to get at this data reference from PI Web Parts so the data reference is copied on to the Sharepoint server.  Before I go near PI web Parts the data reference when loaded (via PI System Explorer on the server) is throwing the following generic error (I'm not happy anymore):


The type initialiser for 'MyDR' threw an exception


I log a more specific error of:


MyDR failed.  Method:static MyDR() Exception:System.ArgumentNullException: Value cannot be null. Parameter name: method at System.Delegate.CreateDelegate(Type type, Object firstArgument, MethodInfo method, Boolean throwOnBindFailure) at MyDR.Piaf.Helpers.FixResolvePlugInAssemblyEventHandler.InsertPreHandler() at MyDR..cctor()


Now I'm sad.  This error does not occur on the AF Server, only on the client (sharepoint server).


Has anyone seen anything like this before?  All supporting assemblies are present, but PI System Explorer reports the "type initialiser" error for all Attributes using MyDR.  All security delegations are in place, to solve double hop. 


Payment in beer awaits you.