Custom webpart : Failed to load 'PI Point' Plug-In

Discussion created by ztelo on Aug 28, 2009
Latest reply on Sep 2, 2009 by ztelo


I use the RawPIPoint property, of the AFAttribute class, to get the pipoint name associated to an attribute.

Here is a piece of code :

AFAttribList = /**/

foreach (AFAttribute CurAttribute in AFAttribList)
    if (CurAttribute.DataReference != null)
        if (CurAttribute.RawPIPoint!=null)

When I use this code in a web application, I can retrieve all the pipoint names and my application works fine.

But when I use the same code in my custom webpart, I get a null value for the RawPIPoint.
I debuged the webpart and I have found this exception:

{"Failed to load 'PI Point' Plug-In: Could not load file or assembly 'OSIsoft.AF.Asset.DataReference.PIPoint,
Version=, Culture=neutral, PublicKeyToken=6238be57836698e6' or one of its dependencies.
Failed to grant permission to execute. (Exception from HRESULT: 0x80131418)\n>> Execution permission cannot be acquired."}
System.Exception {System.InvalidProgramException}

StackTrace " at OSIsoft.AF.AFPlugIn.CreateInstance() in
d:\\Dev\\PIAF\\Foundation20\\SDK\\AFPlugIn.cs:line 764\r\n
at OSIsoft.AF.AFPlugIn.CreateDataReferenceInstance(AFObject context, String configString)
in d:\\Dev\\PIAF\\Foundation20\\SDK\\AFPlugIn.cs:line 338" string


I use VS2008, VSeWSS 1.3.


My web part is strongly name and i run it from the GAC.




Any idea about this issue?