8 Replies Latest reply on Aug 27, 2013 10:38 AM by Gregor

    Custom webpart with a PI AF SDK

    hsuzuki

      Hi vCampus team

       

      ,

       

      I build a custom webpart which connects to PI AF Server and the display has this custom webparts and PI WebParts (TreeView). And then, My webpart retrieves an AF attributes of the element which is pointed in the TreeView. Now, I wrote the windows account name and password in the codes like below. But, I'd like to use Windows Logon account for PI AF login same as PI WebParts priviledge. How do I write the codes for this?

       

       

       

      public NetworkCredential myCred = new NetworkCredential("username", "password", "domain name");

       

       

       

      PISystems myAFSystems = new PISystems();

       

      _myAFSystem = myAFSystems[strServername];

       

      _myAFSystem.Connect(myCred);

       

       

       

      Best,