gRPC (Server & Client) - chanandrew96/MyLearning GitHub Wiki

UI for testing gRPC service

  1. gRPCUI
    GitHub project that provided UI for testing gRPC service.
    Download from the Release page.
    Execute grpcui.exe -plaintext [gRPC URL](grpcui.exe -plaintext localhost:5000) and it will host the UI.

Setting SSL (HTTPS) connection

Setting up in appsettings.json

Reference: Configure HTTPS in appsettings.json

{
  "Logging": {
    "LogLevel": {
      "Default": "Information",
      "Microsoft.AspNetCore": "Warning"
    }
  },
  "AllowedHosts": "*",
  "Kestrel": {
    "EndpointDefaults": {
      "Protocols": "Http2"
    },
    "Endpoints": {
      "gRPC": {
        "Url": "<Http url>",
        "SslProtocols": []
      },
      "HttpsCert": {
        "Url": "<Https url>",
        "SslProtocols": [ "Tls12", "Tls13" ],
        "ClientCertificateMode": "AllowCertificate",
        "Certificate": {
          "Subject": "<The cert subject without 'CN='>",
          "Store": "<Store location>",
          "Location": "<Location>",
          "AllowInvalid": "<Boolean (true/false)>"
        }
      }
    },
    "Certificates": {
      "Default": {
        "Path": "<.pfx or .crt path>",
        "Password": "Password"
      }
    }
  }
}

Parameters of Certificate

Reference: Certificate sources

  • Subject: Open the certificate file and find the Subject property
  • Store: Reference to the StoreName
  • Location: "LocalMachine"/"CurrentUser"
⚠️ **GitHub.com Fallback** ⚠️