Rhino.compute won't work

I am working on Unity to build models using the rhino API through rhino.compute service.
I have successfully started the compute.geometry service (as the command window says), but after a few seconds I got the exception below. As a result when I was trying to use the rhino API, I got a WebException in Unity

“The remote server returned an error:(400) Bad Request.”

The Chinese means that an exception occurs when sending request. And the sentence after the System.Net.WebException says it cannot connect to a remote server. The one after SocketException says the attempt to connect fails because the connecting side does not respond correctly after a period or the host that it tries to connect gives no response.
I am actually confused with anything related to server and web. Any help would be highly appreciated.

@stevebaer can you help?

Does the exception occur when you call compute from unity?

Thanks for replying.
Now I find that the exception shown in the command window doesn’t neccessarily occur, but most of the time it does, and it’s usually after I open a new web page in browser (before I could call compute from Unity). Is that due to my network condition? But I have tried using my own mobile phone’s hotspot, the situation hardly improved.
As for the exception in Unity, it happens every time. I am thinking does it have something to do with my token. I got it from my account page in rhino3d.com, and it belongs to collaborative team.

Thanks for any consideration. I finally make it work!
I find out that the exception in command window is not fatal problem, but the script in Unity. I can not access 127.0.0.1/8081, which is what I write in the script, but I can access localhost/8081. That’s how the problem occurs. By replacing the url with "http://localhost:8081/, I manage to solve the problem. If anyone would have this same problem, I hope this can be a lesson to learn.

1 Like