9 Replies Latest reply on Dec 13, 2011 1:58 PM by AlistairFrith

    VB.Net and PI WebService

    PIAdminUnison

      Hi all,

       

      I have been looking around for some examples of VB.Net projects using the new PI WebServices 2010, but haven't had much luck.  I am just look to connect to the PI WebServices and get the values for sinusoid for the past 4 hours.  For now I am just trying to do this through a VB.Net application so not sure if I need to it through synchronous or asynchronous calls.  If anyone has a simple project they don't mind sharing, I would greatly appreciate it.

       

      Thanks,

       

      Jimmy

       

       

        • Re: VB.Net and PI WebService
          hanyong

          I have a simple console project that might be useful to you.

            • Re: VB.Net and PI WebService
              hanyong

              Just like to add on some useful references, Lonnie has posted a nice example for calling PI Web Services asynchronously in a Sliverlight app here.

                • Re: VB.Net and PI WebService

                  @Jimmy Bass: just curious, did Han Yong's solution address your question?

                    • Re: VB.Net and PI WebService
                      PIAdminUnison

                      Hey Steve,

                       

                      Yes Han's solution helped.  I had to do some changes because we are using AD security but we are using NTLM not Kerberos.  I added

                      _Client.ClientCredentials.Windows.AllowedImpersonationLevel = _
                          System.Security.Principal.TokenImpersonationLevel.Delegation

                      I still want to do some more testing but it is too bad there is no WebService to search the PI AF for elements directly.  I assume this will come with time?

                       

                      Jimmy

                        • Re: VB.Net and PI WebService

                          Jimmy Bass

                          Yes Han's solution helped.  I had to do some changes because we are using AD security but we are using NTLM not Kerberos.
                          Glad we could help!

                           

                          Jimmy Bass

                          it is too bad there is no WebService to search the PI AF for elements directly.  I assume this will come with time?
                          Indeed, this will come with time. 'Search' in general is a high priority as OSIsoft and we want to make sure we don't just implement bits and pieces of it, inconsistently across our product suite - we want to provide a consistent search experience across our various products, both tag-based and asset-based searches.

                          • Re: VB.Net and PI WebService

                            Jimmy Bass

                            there is no WebService to search the PI AF for elements directly
                            Per my previous post, this will come with time. In the meantime, you might want to expose some AF Search capabilities by wrapping some AF SDK calls in your own custom web service, which would sit side-by-side with PI Web Services.

                             

                            It's a relatively straightforward thing to do and I know other users on this community did it... should you decide to go down that path, please do not hesitate to initiate new discussion threads on the topic, when/if you need further assistance with something in particular.