Category: gRPC
-
.Net Core Web Api Returning Binary File with No Headers Instead of Expected Response
Hey everyone, A small issue I’ve run into while setting up a .net core web api microservice that also utilises a number of gRPC services. Symptoms were as follows: Response Read via Fiddler – HTTP/1.0 200 This buggy server did not return headers – Value was binary and unable to be read Server logs 03:59:23…
-
“protobuf” visual studio a namespace cannot directly contain members such as fields or methods
Hi everyone, I ran into the following intellisense error while adding a new proto file: “protobuf” visual studio a namespace cannot directly contain members such as fields or methods This was one of many errors that were shown and appeared to be an issue with Intellisense mistaking the file for a normal class definition. The…
-
Automapper protobuf datetime to timestamp c#
Hi everyone, I ran into the following error tonight while attempting to use automapper to map a datetime field to a protobuf timestamp property: automapper missing type map “DateTime -> Timestamp” To fix it, add the following to your mapping profile: CreateMap().ConvertUsing(x => x.ToTimestamp()); UPDATE: I later hit a similar error parsing a different entity:…
-
Http gRPC with .NET Core and Docker – Error starting gRPC call. System.Net.Http.HttpRequestException: An error occurred while sending the request. —> System.IO.IOException: The response ended prematurely.
Hi everyone, I’ve been mucking around with gRPC today while using .NET Core and Docker. I have two Microservices in the setup, one server and one client. Because these services will only be communicating internally I intended to use HTTP instead of HTTPS. Unfortunately, I hit the following error while attempting to set this up:…