13 Replies Latest reply on May 22, 2015 3:51 PM by aseck

    PI Webservices

    sindhura.kanchi

      Hi, I am calling GetPISnapshotData method but in the response object it is giveing error 1004 - column not found.Can you please advice?

        • Re: PI Webservices
          Kenji Hashimoto

          Hi Sindhura,

           

          Is your PI WebServices always return an error or only GetPISnapshotData shows an error?

          Do you use HTTPS connection? We have a KB for using HTTPS connection. If you use https, please check it.

          KB00981 - Configuring PI Web Services to use HTTPS with an SSL certificate

          Also I found following in our database for the same error.

          Install Basic Authentication on IIS (it was not listed as an option before) and enable it. Set <transport clientCredentialType="Basic" /> on the basicHttpBinding in the PI Web Services web.config.

          • Re: PI Webservices
            dng

            Hi Sindhura,

             

            Please allow us to collect some more information about your issue:

            • Is this a new installation of PI Web Services, or has it been working before? If this was working before and the issue recently showed up, what was changed?
            • Were you able to successfully navigate to the site http://[servername]:[portnumber]/[PIWebServices directory name]/PITimeSeries.svc?
            • Where did you see the 1004 error? Was it in your custom application? Or when you were testing in WCFStorm?
            • If haven't already done so, can you test the method with WCFStorm and follow the configuration outlined here? Make sure the impersonation level is set as "Delegation". Do you see the error in WCFStorm?
              • Re: PI Webservices
                sindhura.kanchi

                This is a new installation of PIservices and I am using it for the first time.

                I am able to navigate to the service with the URL in the browser.

                I am calling the method from a console application not from WCFStorm.

                 

                Thanks

                Sindhura

                  • Re: PI Webservices
                    dng

                    Hi Sindhura,

                     

                    Would you mind testing out the method with WCFStorm? This will help us narrow down the issue.

                      • Re: PI Webservices
                        sindhura.kanchi

                        I am getting the error : No PI user was recorded for a trusted connection from WCFStorm.

                         

                        Thanks

                        Sindhura

                          • Re: PI Webservices
                            dng

                            Hi Sindhura,

                             

                            It looks like you are running into a security issue connecting to the PI Data Archive. You will likely want to check whether you have set the mapping or trust needed for PI Web Services. To troubleshoot the issue, I suggest checking the PI message logs on the PI Data Archive around the time when you get the error to see what authentication request PI Web Services is putting on the PI Data Archive. Take note of whether it's a mapping or trust request, as well as what user credentials were presented. You will likely see an error in the message logs indicating which requests have failed to authenticate.

                              • Re: PI Webservices
                                sindhura.kanchi

                                Hi,

                                 

                                After setting the trust, we were able to retrieve the data. However most of the time we are getting the following error .Can you advice?

                                 

                                Could not load file or assembly 'OSIsoft.PIDataServices.DataAccess, Version=3.4.0.0, Culture=neutral, PublicKeyToken=53b77d1d3d7a979b' or one of its dependencies. Either a required impersonation level was not provided, or the provided impersonation level is invalid. (Exception from HRESULT: 0x80070542)

                                 

                                Thanks

                                Sindhura

                                  • Re: PI Webservices
                                    dng

                                    Hi Sindhura,

                                     

                                    Where did you see the above error? In WCFStorm or your custom application? If it's in WCFStorm, can you make sure you have set the impersonation level as Delegation (refer to link here)? If it's your custom application, what is the full stack trace?
                                    Does this issue happen occasionally? Does the issue go away after recycling the application pool (or an IIS reset)?

                                     

                                    It looks like there is a security mis-configuration. I would encourage you to go through the security configuration session in the PI Web Services User Guide to verify the configuration. Are you associated with a site with a valid SRP license? If so, I would also encourage you to contact Tech Support for assistance troubleshooting the issue.

                                    • Re: PI Webservices
                                      bshang

                                      Hi Sindhura,

                                       

                                      please also check the following:

                                      1) app pool (domain) account permissions (full control) to:

                                          *   "%pihome%\PI Web Services",

                                          * the physical path of of the site hosting PI Web Services, and

                                          * C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\piwebservices

                                      2) If it's a custom app, the WCF client must authorize the allowed impersonation level. To do so, follow the steps in bottom of pg. 46 under "Configure security for applications" in the PI Web Services 2012 guide.

                                       

                                      Btw, what is the reason to use PI Web Services over Web API?

                                      • Re: PI Webservices
                                        aseck

                                        Hi Sindhura,

                                         

                                        Is there any update on this issue? Were you able to get PI Web Services to work with your application? Please let us know by marking the most helpful answer as the 'Correct Answer', or by telling us how we can help further.

                                         

                                        Thanks