Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to call a .NET Core 3.0 gRPC Server application with bloomRPC?

For this question, it is relevant to know that I do have ASP .NET Core experience, do have REST experience but I am a newbee when it comes to gRPC. In addition, I am working on Windows right now.

At first, I created a server project and a client project as explained here.

This works fine and exactly as expected and documented.

Logically, I want to be able to call my server project from a tool (as many developer use a tool -such as Postman- to test their REST Api Server project). I am failing when it comes to this so maybe someone can explain what am I doing wrong and how to resolve my problem? I am using bloomRPC and I get an error I do not understand (my server application is available).

enter image description here

like image 355
Daan Avatar asked Jul 30 '19 17:07

Daan


2 Answers

Follow steps below:

  1. Make sure RpcServer is running.

  2. Check your launchSettings.json

    {
        "profiles": {
            "GrpcGreeter": {
                "commandName": "Project",
                "launchBrowser": false,
                "applicationUrl": "https://localhost:5001;http://localhost:5000",
                "environmentVariables": {
                    "ASPNETCORE_ENVIRONMENT": "Development"
                }
            }
        }
    }
    
  3. Import proto to bloomRPC

  4. Change Server Address to 0.0.0.0:5000

like image 146
Edward Avatar answered Nov 01 '22 07:11

Edward


You can manually import your VisualStudio's certificate into the bloomRPC. Click on the TLS button next to the lock icon. You'll get a popup window where you can add your certificate by clicking on "Add Root Certificate". Use the base-64 encoded X.509 certificate.

ssl target host should be the hostname for which the ssl certificate is generated for, in your case it's localhost.

VisualStudio can create multiple certificates so you need to test which one of them is working for you.

Here are the steps how to export your VisualStudio's certificate from the MMC: https://support.globalsign.com/ssl/ssl-certificates-installation/import-and-export-certificate-microsoft-windows

Importing certificate to BloomRPC

like image 34
LilacBlue Avatar answered Nov 01 '22 07:11

LilacBlue