Unable to connect to Service from Studio

I tried the following procedure:
In first terminal:
mkdir test
cd test
x download NetCoreApps/NorthwindCrud
cd NorthwindCrud
cd scripts
source gen-dev.https.sh
source gen-prod.https.sh
cd …
dotnet run

I got the following output:

Hosting environment: development
Content root path: /Users/…/…/NorthwindCrud
Now listening on: https://localhost:5001
Now listening on: http://localhost:5054
Now listening on: https://localhost:5051
Application started. Press Ctrl+C to shut down.

In second terminal:
x open studio

Hosting environment: development
Content root path: /Users/…/.sharp-apps/studio
Now listening on: http://localhost:5002
Application started. Press Ctrl+C to shut down

With both the service and Studio running,
I opened http://localhost:5002, I added the base URL https://localhost:5001 of the NorthwindCrud service and I was able to use Studio as expected on a Mac.

However, when I repeated the same process on a linux laptop, the Studio, when I try to add the https://localhost:5001, I get the error message:
Not a Remote ServiceStack Instance.
How can I resolve this error and get the studio working on Linux? I am running kubuntu 20.04 LTS on my Linux laptop. Please help.

Does https://localhost:5001/metadata/app.json return a large JSON response?

Yes, it does return a large amount of JSON.
curl -k https://localhost:5001/metadata/app.json | wc
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 199k 0 199k 0 0 2973k 0 --:–:-- --:–:-- --:–:-- 2973k
0 11 204036

hmm not sure, might be a ssl cert error, can you try running and connecting over http:// instead of https://

Thanks for the clue. I changed the settings in appsettings.json in the service project NorthwindCrud to match the following:

"Kestrel": {
    "Endpoints": {
      "Http": {
        "Url": "http://localhost:5001",
        "Protocols": "Http1"
      },
      "Https": {
        "Url": "https://localhost:5051",
        "Protocols": "Http1And2",
        "Certificate": {
          "Path": "dev.pfx",
          "Password": "grpc"
        }
      },
      "Http2": {
        "Url": "http://localhost:5054",
        "Protocols": "Http2"
      }
    }
  }, 

Then I added http://localhost:5001 as the base URL and it now works as expected.

1 Like