3 Replies Latest reply on Apr 17, 2013 1:36 PM by Steven Murawski

    InfoServiceProxy._Log.VerboseFormat Does Not Exist

    Steven Murawski

      I'm trying to use the SWISPowerShell cmdlets to unmanage a node and I was getting an error about a missing method -

      System.MissingMethodException: Method not found: 'Void SolarWinds.Logging.Log.VerboseFormat(System.String, System.Object[])'.

                                 at SolarWinds.InformationService.Contract2.InfoServiceProxy.ValidateUsedConnection()

                                 at SolarWinds.InformationService.Contract2.InfoServiceProxy.Close()

                                 at SwisPowerShell.BaseSwisCmdlet.CheckConnection()

                                 at SwisPowerShell.InvokeSwisVerb.InternalProcessRecord()

                                 at SwisPowerShell.BaseSwisCmdlet.DoWithExceptionReporting(Action work)

                                 at System.Management.Automation.CommandProcessor.ProcessRecord()

       

      I dug down a bit and it appears that method is missing from the SolarWinds.Logging assembly shipping with the 1.6 SDK.

       

      It's easy to replicate with creating a SWIS connection and calling the close method -

       

      $swis = Connect-SWIS #your specific details here

      $swis.close()

       

      Since each run of the Invoke-SWISVerb calls close on the connection first before opening it, I keep hitting the problem. 

       

      Was this a problem with the shipping assemblies or am I hitting some other error condition?  I'm new to the Orion SDK in general, but very experienced in PowerShell and .NET.

       

      Below is the method that calls the verbose logging method which does not exist -

       

      // SolarWinds.InformationService.Contract2.InfoServiceProxy

      private void ValidateUsedConnection()

      {

           if (this._infoService == null)

           {

               return;

           }

           if (this._activityMonitor == null || this._activityMonitor.RequestSent)

           {

               return;

           }

           InfoServiceProxy._log.Info("Non-used connection was opened. Information for developers. No impact on product functionality. See verbose log for more details.");

           InfoServiceProxy._log.VerboseFormat("StackTrace: {0}", new object[]

           {

               Environment.StackTrace

           });

           try

           {

               using (this._infoService.Query(new QueryXmlRequest("SELECT TOP 1 1 as Test FROM Metadata.Entity")))

               {

               }

           }

           catch

           {

           }

      }