1 Reply Latest reply on Apr 1, 2010 7:11 PM by cescamilla

    Connections in ASP.NET

      Hi, What is the best way to manage connections to PI server in an ASP.NET application? The PI-SDK help has asample ASP code that uses ServerManager class. It stores the instance of ServerManager in the Application object. Is this the recommeneded way for managing connections?  If we use the PISDK object to get the Server object, shoule we again create only one instance of the PISDK class and store it in the Application object? Thanks Biju
        • Re: Connections in ASP.NET

          It makes sense to use the ServerManager class in this context if you have multiple user identities hitting on your webpage and you want to use those identities to connect to the PI Server.


          The recommended way is to have a shared ServerManager for all pages to see in order to optimize connections (just like WebParts do).


          If you only have one identity hitting on the page then using the PI SDK object would work fine.


          Note that in either case having a ServerManager will work and you could scalate later without changing your code, but if you use PI SDK and later on you decide to go for a multi identity approach then you would have to go back to the code to change things.


          Also remember that ServerManager will not work with explicit login to the PI Server.