6 Replies Latest reply on Oct 3, 2012 9:20 PM by MikeK_

    Save Nutrient Analysis 6.0 (api version 24)


      I am trouble shooting an error on our 6.0 installation. I am using the Save Nutrient Analysis API but I am getting an error.

      "FaultException'1 was unhandled" "The application config root has already been set".

      Is anyone familiar with this type of issue and any ideas on how to fix it?

        • 1. Re: Save Nutrient Analysis 6.0 (api version 24)
          Ron M-Oracle
          Do any of the other web service calls work, like the GetSpecSummary web service? This kind of an error is usually only seen on a web application that isn't set up correctly. Where is your web service client running from?

          Would you please include the full stack trace?
          • 2. Re: Save Nutrient Analysis 6.0 (api version 24)
            Hi Ron M,

            As far as I know we do not use the other service calls and do not have a webservice client set up for them, so I don't know if they work. Our web service client is running within our network. Our version 6.1 (api verision 25) works fine for the save nutrient analysis. But yes, I think something is not set up right on the 6.0 environmnent.

            Server stack trace:
            at System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message reply, MessageFault fault, String action, MessageVersion version, FaultConverter faultConverter)
            at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
            at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
            at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
            at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

            Exception rethrown at [0]:
            at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
            at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
            at ConsoleApplication1.ServiceReference1.NutritionServices.SaveNutrientAnalysis(NutrientAnalysisRequest request)
            at ConsoleApplication1.ServiceReference1.NutritionServicesClient.ConsoleApplication1.ServiceReference1.NutritionServices.SaveNutrientAnalysis(NutrientAnalysisRequest request) in E:\LIMS_WebServiceClient\ConsoleApplication\Service References\ServiceReference1\Reference.cs:line 2516
            at ConsoleApplication1.ServiceReference1.NutritionServicesClient.SaveNutrientAnalysis(tNutrientSample[] NutrientAnalysisSamples, Boolean& IsSuccessful, NutrientAnalysisResult[]& Results) in E:\LIMS_WebServiceClient\ConsoleApplication\Service References\ServiceReference1\Reference.cs:line 2522
            at ConsoleApplication2.Program.Main(String[] args) in E:\LIMS_WebServiceClient\ConsoleApplication\Program.cs:line 678

            ----- here is the code that the debugger navigates to on the error  ---
            ConsoleApplication1.ServiceReference1.NutrientAnalysisResponse ConsoleApplication1.ServiceReference1.NutritionServices.SaveNutrientAnalysis(ConsoleApplication1.ServiceReference1.NutrientAnalysisRequest request) {
            return base.Channel.SaveNutrientAnalysis(request); *<---- Line 2516 in Reference.cs* }

            Edited by: 949004 on Oct 2, 2012 10:24 AM
            • 3. Re: Save Nutrient Analysis 6.0 (api version 24)
              Ron M-Oracle
              This feels like a configuration issue. Please verify that you have made the correct configuration changes to:

              Did you make sure to create the virtual directory called ProdikaContracts?

              These are all documented in the API configuration guide.

              If all of that is set up correctly, look at the webservices_messages.svclog file on web\Integration to see additional details, like the data the web service is receiving.

              We typically have people try the GetSpecSummary web service just to verify that they have set everything up correctly.

              If everything looks right, we can send you a small console app that lets you test the GetSpecSummary web service to see if you have set everything up correctly or not.
              1 person found this helpful
              • 4. Re: Save Nutrient Analysis 6.0 (api version 24)
                Yea, I checked those config files and the virtual directory; they all seem to be set up correctly.
                • 5. Re: Save Nutrient Analysis 6.0 (api version 24)
                  Ron M-Oracle
                  If you will provide your email address, I can send you a small console app that you can try.

                  By the way, are you running the web service as one main user, as specified in the environmentvariables.config
                  or are you passing in the username with each web service call?
                  • 6. Re: Save Nutrient Analysis 6.0 (api version 24)
                    Hi Ron,

                    Thanks for your time on this issue. I think we found a solution to this issue on our end.