2 Replies Latest reply on Sep 22, 2011 5:57 AM by hanyong

    Unusual problem with AFSDK and PISDK in Webapp

    jedwards

      I am having an unusual problem that i hope someone can shed some light on. I have a web application that uses the afsdk to read assets and attributes and dynamically builds the page. When this page is launched it operates as expected.

       

      I have a second page that is the "Data Admin" page. It displays the AF elements and attributes. It allows for new Elements to be added by template and allows editing of the attributes. I have built a web pi search dialog that references the PISDK to set the pi-tags for the Element attributes. If this page is run first it runs just fine and performs as expected.

       

      Problem is IF I launch the Data Admin page which works well, and return to the Home page i Immediatly have a fault. The fault occurs when trying to pull the value from AF.

       

        _PBOParam.Attributes("CurrentValue").GetValue.Value 

       

         {"Unable to create the PISDK. PI Data References will not function."} Object

       If I start on the data page and then go to data admin I get a fault .

       

          Dim gPISDK as New PISDK.PISDK 

       

         [InvalidCastException: Unable to cast object of type 'PISDK.PISDKClass' to type 'PISDK.PISDKClass'.]

       

      It appears to be a problem to reference the PISDK directly in the app and have AF Reference it indiectly in the same app. Any insight would get greatly apprecated.