Rhino Compute Azure Server authentication issues [401]

Rhino Compute Server Issue

Issues with Hops on Rhino Compute Server Set Up via Azure

Hi all,

I've successfully set up a Rhino Compute server following the guide at Deploy to IIS using Azure. The server itself functions as expected, but I encounter issues specifically when it processes a hop. Regardless of whether I use a local filepath or a URL for the hop, I consistently receive a 200 OK response from the server. However, the JSON returned is empty—the structure of the output is correct, but it contains no data.

Additionally, I have installed the Hops plugin (along with a few others) using the package manager under the RhinoComputeUser profile. Unfortunately, this has not resolved the issue. The server logs only show information-level events and 200 OK responses.

Interestingly, I observed in the log files that when the hops request is sent to the server, it results in a 401 error specifically for hops, although the main service still outputs 200 OK from the server. I have configured my Compute URL and my API key as environment variables when starting the app. Here is the code snippet I use to make the call to my server:

output = gh.EvaluateDefinition(
    str(Path(__file__).parent / 'script'),
    input_trees
)

This code executes correctly, but the hop included within that script yields empty output with a 401 error. Is there any way to set the API key for hops within my scripts?

In the log files I can also see the same request receives a 401 response from hops: (C:\Users\RhinoComputeUser\AppData\Roaming\McNeel\Rhinoceros\packages\8.0\Hops\0.16.7\rhino.compute\logs),

but a 200 response from IIS: (C:\inetpub\wwwroot\aspnet_client\system_web\4_0_30319\rhino.compute\logs).

If I run the script locally and set my hops remote solver to my Server's URL and add my API key, it executes correctly.

Thanks,
Josh

![Rhino Compute Logs|690x407](upload://5d8VQ7cXCc4U03uXzuyPLJ0P7H2.png)

Hi Joshua,

Nice to see you setting up a Grasshopper server!

Following this quote I feel your Rhino.Compute server is properly configured. As 401 response is an Auth error, it seems to me that there is an issue with what your send in the headers.

To check your input, you could debug into the EvaluateDefinition function and check the ComputeFetch. Please check if apiKey, authToken and url are properly configured. If that is the case it might be an issue with how the IIS is configured, at which point I think the Rhino forum might help you further.

I don’t have an IIS available to test this myself, so if necessary I can hop on a quick call.

A small question I was having as well:

Could you print this output? Could it be you’re missing ContextBake components?

Hopefully that helps out a little bit and otherwise let me know!

Kind regards,

Rick