PI SDK Web Service Examples

Blog Post created by spilon on Jul 29, 2009

What I suggest in this download is an updated version of the "PI Web Service Examples", which can be found on the Technical Support website's download center. It presents 4 Visual Studio 2008 projects in C#: 2 web services and 2 web service clients. They are grouped in 2 solutions (.sln files), so make sure you choose the right one:

  • PI SDK Web Service and Client Examples (IIS6-).sln:
    if you are running IIS6 and earlier (e.g. Windows XP, Windows Server 2003)
  • PI SDK Web Service and Client Examples (IIS7+).sln:
    if you are running IIS7 and later (e.g. Windows Vista, Windows 7, Windows Server 2008)

Please note that those are only examples and should not be used "as is" in production environments. They were originally developed with the idea to keep it really simple and as concise as possible; some parts need to be adapted to make them appropriate for real-life, larger-scale applications. One example of this is the cross-thread calling of UI elements after an asynchronous tag search - you should make sure to use the appropriate threading model to fit the structure and the needs of your applications.


With that said, it is definitely simpler to use the PI Web Services product (released as CTP - Community Technology Preview - to the vCampus community) rather than creating your web services to wrap some PI SDK functionality. Find out more about PI Web Services on the newly-created "Web Services and PI" blog!