Custom webpart with a PI AF SDK

Discussion created by hsuzuki on Feb 14, 2013
Latest reply on Aug 27, 2013 by Gregor

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];