4 Replies Latest reply on Jul 1, 2011 6:17 AM by MichaelvdV@Atos

    NotFound error returned by Remote server

    SteveOD

      Hi,

       

      I'm trying to get PIWebServices running against a SilverLight App.

       

      To date, I've installed PIWebServices on a VirtualPC running Windows Server 2003.

       

      I can run WCFStorm and the PITestHarness (WinForms) and retrieve data happily.

       

      The forms are using WSHttpBinding while the SL app is meant to use basicHttpBinding.

       

      However when I use Lonnie's KPI demo app in SilverLight I get the error

       

                  Remote Server returned error: NotFound

       

      I'm not sure just what is not found.

       

      Any assistance appreciated.

       

      Cheers,

       

      Steve

        • Re: NotFound error returned by Remote server
          MichaelvdV@Atos

          Please check the endpoint address of the in your webservicereferences.clientconfig. It should be a BasicHttpBinding, and the endpoint of the basichttp endpoint configured in the web.config of PIWebservices.

            • Re: NotFound error returned by Remote server
              SteveOD

              Hi Michael,

               

              Thanks for that. It points me in the right direction.  These config files are a little confusing as I have not dealt with them before.

               

              Do you have a working example of the ServiceReference.ClientConfig file and a matching web.config file ?

               

              Also, am I right in believing that you can have multiple binding types deifned in the web.config file ?

               

              Steve

                • Re: NotFound error returned by Remote server
                  SteveOD

                  Hi,

                   

                  I am making good progress.

                   

                  I've set up the web.config in the PI WebServices directory to use basicHttpBinding.

                   

                  This now allows me to run Lonnie's Silverlight app which is great.

                   

                  This file only allows me to set up either basicHttpBinding or wsHttpBinding.

                   

                  Has anyone set up a web.config to allow both to function without needing to switch files.

                   

                  My attempt resulted in an error regarding two endpoints using to same contract.

                   

                  Cheers,

                   

                  Steve

                    • Re: NotFound error returned by Remote server
                      MichaelvdV@Atos

                      Yes, you can have two bindings configured for the same contract. You can only use one for your client.

                       

                      If you create your client, you can give a bindingconfiguration name in the constructor.

                       

                      var client = new PIWebserviceClient("<bindingconfigurationname>"). You can find the bindingconfiguration name in your servicereferences.clientconfig.