5 Replies Latest reply on Aug 17, 2020 10:03 PM by 637289

    Toolbox WebAPI Error

    637289 New User

      Hello,

       

      I am attempting to use the Toolbox WebAPI to do some GET requests for use in another Tool but I am running into some errors that maybe someone has a suggestion to solve.

       

      Some Info:

      • Toolbox 4.3 installed and working on Windows 7
      • Toolbox server running in SingleUser mode and Desktop Client not opened while conducting API requests.
      • IIS version 7.5; NET Framework v4.6.1 and both turned on in Windows features as described in deployment guidance.  
      • API Website added through IIS Manager as described in deployment guidance.
      • WebAPI browser page works on localhost:<port>  <- using an unused port.
      • Swagger UI also appears to be working.

       

      When testing by sending requests through Swagger UI, I keep getting response code 500.

       

      For example:

      request: 'http://localhost:<port>/api/v3/search/cas/50000/true'

       

      Response Body:

      { "Message": "An error has occurred.", "ExceptionMessage": "The given key was not present in the dictionary.", "ExceptionType": "System.Collections.Generic.KeyNotFoundException" }  ....

       

       

      I can provide full response body if useful.  The deployment guidance says IIS version 8+ should be used but I am running Windows 7. 

       

      Any ideas?

       

      Really appreciate all the work that has gone into Toolbox 4 development.

       

      Best,

      Matt

        • Re: Toolbox WebAPI Error
          862758 New User

          Dear Matt,

           

          apologies for the extremely delayed answer. We were pointed to this post by another user who has the same problem. Please use the QSAR Toolbox Helpdesk where we guarantee answers within a day or two.

           

          This issue (affecting functions under Profiling, Calculations and Metabolism) is most likely caused because a COM server (providing some of the Calculators and Metabolism simulators) is lacking privileges when run within IIS. What I can suggest is that you edit the Application Pool of the Toolbox WebAPI entry in IIS, changing the Process Model identity from ApplicationPoolIdentity (default) to LocalSystem and then restart the Toolbox WebAPI website.

           

          Please let me know if you are still trying to get the WebAPI to work and I can provide you with detailed instructions.

           

          Stanislav

            • Re: Toolbox WebAPI Error
              1166944 New User

              Dear 862758,

               

              Thank you very much for your answer - and the PM you send me. I would like to state my question here in the forum for future reference.

              I tried to follow the instructions you provided but unfortunately was not able to find the option you mentioned. Is it somewhere hidden in a sub-sub menue?

              I have to admit that I do have no expertise in using the IIS so a more detailed instruction on how to overcome this issue would be highly appreciated - maybe with some pictures

               

              Thanks in advance for the efforts

              Best

              1166944

                • Re: Toolbox WebAPI Error
                  862758 New User

                  Dear Falko,

                   

                  following your request and based on other people's interest, we have updated the WebAPI deployment manual. The modified part that addresses the described issue is in Section 4 (Deploying TBWSe in IIS). You may either delete the already created toolbox site and create it again following the slightly modified instructions, OR you can stop the website and go directly to Step 8 to make the suggested modification to the Application Pool.

                   

                  Stanislav

                  2 of 2 people found this helpful