{"id":14225,"date":"2023-10-25T07:07:18","date_gmt":"2023-10-25T07:07:18","guid":{"rendered":"https:\/\/positiwise.com\/blog\/?p=14225"},"modified":"2024-08-05T12:01:49","modified_gmt":"2024-08-05T12:01:49","slug":"implement-grpc-with-asp-net-core","status":"publish","type":"post","link":"https:\/\/positiwise.com\/blog\/implement-grpc-with-asp-net-core","title":{"rendered":"How to Implement gRPC with ASP.NET Core"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><strong class=\"pw-highlight-text-color\"><em>Quick Overview:<\/em><\/strong><br>The blog provides an insight into the gRPC (google Remote Procedure Call) with a brief definition and its benefits. In addition, you will undergo each step to implement it and create a server and client application to test its functioning. The practical example will help you learn about all the required packages and files for building gRPC services with ASP.NET Core.<\/p><div id=\"ez-toc-container\" class=\"ez-toc-v2_0_85 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/positiwise.com\/blog\/net-core-vs-node-js\/#A_Run-Through_NET_Core_vs_Nodejs\" >A Run-Through: .NET Core vs Node.js<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/positiwise.com\/blog\/net-core-vs-node-js\/#NET_Core\" >.NET Core<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/positiwise.com\/blog\/net-core-vs-node-js\/#Pros_of_using_NET_Core\" >Pros of using .NET Core<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/positiwise.com\/blog\/net-core-vs-node-js\/#Nodejs\" >Node.js<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/positiwise.com\/blog\/net-core-vs-node-js\/#A_Deep_Dive_into_NET_Core_vs_Nodejs\" >A Deep Dive into .NET Core vs. Node.js<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/positiwise.com\/blog\/net-core-vs-node-js\/#Processing_Approach_and_Performance\" >Processing Approach and Performance<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/positiwise.com\/blog\/net-core-vs-node-js\/#Security\" >Security<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/positiwise.com\/blog\/net-core-vs-node-js\/#Scalability\" >Scalability<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/positiwise.com\/blog\/net-core-vs-node-js\/#Platform_Adaptability\" >Platform Adaptability<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/positiwise.com\/blog\/net-core-vs-node-js\/#Support_from_Community\" >Support from Community<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/positiwise.com\/blog\/net-core-vs-node-js\/#Comparison_Table_between_NET_Core_and_Nodejs\" >Comparison Table between .NET Core and Node.js<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/positiwise.com\/blog\/net-core-vs-node-js\/#Wrapping_Up_on_NET_Core_vs_Nodejs\" >Wrapping Up on .NET Core vs Node.js<\/a><\/li><\/ul><\/nav><\/div>\n\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-how-to-use-grpc-services-with-asp-net-core\">How to Use gRPC Services with ASP.NET Core<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In the wide list of numerous API designs, there&#8217;s a new entry in the market known as gRPC. Nowadays, it\u2019s highly trending among <a href=\"https:\/\/positiwise.com\/hire-asp-net-developers\">.NET developers<\/a> for leveraging efficiency, interoperability, and advanced tooling mechanisms. In this post, you will also get to know about this trending technology.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">By undergoing the sections further, you will have a brief understanding of gRPC and a detailed implementation procedure.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Let\u2019s get started.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-what-is-grpc\">What is gRPC?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">gRPC is an advanced mechanism used to boost the Remote Procedure Call functionality in the applications. Primarily, it is considered a framework that can be used with the Microsoft dotnet framework for efficiently providing client devices with required services.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In addition, it gets used in data centers as pluggable support, offering health checking, authentication, load balancing, and tracing. The .NET professionals prefer it for implementing reliable server-client architecture with the help of pre-defined interfaces.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Besides .NET and ASP.NET Core, it\u2019s also compatible with the following technologies and programming languages:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Java<\/li>\n\n\n\n<li>Go<\/li>\n\n\n\n<li>Python<\/li>\n\n\n\n<li>Ruby<\/li>\n\n\n\n<li>C#<\/li>\n\n\n\n<li>F#<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">You can use it with any of the mentioned technologies, but it&#8217;s considered highly compatible with ASP.NET Core applications. Once you configure it, you can connect mobile apps, browsers, and devices to the backend services for streamlined data flow.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-the-benefits-of-asp-net-core-grpc-services\">The Benefits of ASP.NET Core gRPC Services<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The benefits of gRPC in ASP.NET Core applications include the following:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>It helps to build a lightweight <a href=\"https:\/\/positiwise.com\/blog\/microservices-architecture-in-net-core\">microservices architecture<\/a> for the application.<\/li>\n\n\n\n<li>It boosts the speed and enables developers to implement language-agnostic implementations.<\/li>\n\n\n\n<li>It supports building efficient server-client communication.<\/li>\n\n\n\n<li>It enables the configuration of bi-directional communication between client and server.<\/li>\n\n\n\n<li>You can use it for real-time applications, such as streaming services, similar to Zoom meetings.<\/li>\n\n\n\n<li>It uses fewer network resources, leading to saving resources and costs.<\/li>\n<\/ul>\n\n\n\n<div class=\"wp-block-group border rounded bg-light has-global-padding is-layout-constrained wp-container-core-group-is-layout-71df2e02 wp-block-group-is-layout-constrained\" style=\"padding-top:var(--wp--preset--spacing--40);padding-right:var(--wp--preset--spacing--40);padding-bottom:var(--wp--preset--spacing--40);padding-left:var(--wp--preset--spacing--40)\">\n<p class=\"has-text-align-center fs-2 text-blue lh-sm has-contrast-color has-text-color wp-block-paragraph\"><strong>Take Your Web Development to the Next Level with ASP.NET Core<\/strong><\/p>\n\n\n\n<p class=\"has-text-align-center mt-2 wp-block-paragraph\">Boost your web dev skills now with ASP.NET Core! Build robust, scalable web apps faster than ever before with our dedicated .NET Core Developers!<\/p>\n\n\n\n<div class=\"wp-block-buttons mt-3 is-content-justification-center is-layout-flex wp-container-core-buttons-is-layout-20959078 wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link has-base-color has-text-color has-background wp-element-button\" href=\"https:\/\/positiwise.com\/hire\/hire-dot-net-core-developers\" style=\"border-radius:100px;background-color:#ed7923;padding-top:10px;padding-right:30px;padding-bottom:10px;padding-left:30px\"><strong>Hire .NET Core Developers<\/strong><\/a><\/div>\n<\/div>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-the-procedure-of-building-grpc-services-with-asp-net-core\">The Procedure of Building gRPC Services with ASP.NET Core<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">To learn about the implementation of gRPC in ASP.NET Core, we&#8217;ll be creating a server-client architecture using the Visual Studio IDE (Integrated Development Environment).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The server and client scenario will help you understand how the two devices communicate using gRPC. In addition, you will gain a brief idea of how gRPC can be configured in any other ASP.NET Core application of yours.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here, we have divided the complete procedure into four main phases. Further, the phases are divided into brief steps for better understanding. As you move further in the process, you will avail yourself of more visibility of the packages, classes, and methods used to configure gRPC. The four phases are:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Phase 1: Developing a gRPC Server<\/li>\n\n\n\n<li>Phase 2: Developing a gRPC Client<\/li>\n\n\n\n<li>Phase 3: Developing a gRPC Greeter Client<\/li>\n\n\n\n<li>Phase 4: Testing the gRPC Server and Client Communication<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Let\u2019s begin the gRPC implementation process.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-phase-1-developing-a-grpc-server\">Phase 1: Developing a gRPC Server<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In this phase, we will enable the gRPC services for which you need to download Visual Studio 2022 with a workload named \u2013 <strong>ASP.NET and Web Development<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1131\" height=\"660\" src=\"https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2023\/10\/aspnet-web-development.png\" alt=\"aspnet web development\" class=\"wp-image-14231\" srcset=\"https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2023\/10\/aspnet-web-development.png 1131w, https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2023\/10\/aspnet-web-development-300x175.png 300w, https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2023\/10\/aspnet-web-development-1024x598.png 1024w, https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2023\/10\/aspnet-web-development-768x448.png 768w\" sizes=\"auto, (max-width: 1131px) 100vw, 1131px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">After the Visual Studio installation, follow the below steps.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Step 1: Open the IDE and choose <strong>Create a new project<\/strong> option.<\/li>\n\n\n\n<li>Step 2: In the search box, input <strong>\u201cgRPC\u201d<\/strong> and choose <strong>the &#8220;ASP.NET Core gRPC service\u201d<\/strong> option.<\/li>\n\n\n\n<li>Step 3: Click on the <strong>Next<\/strong> button.<\/li>\n\n\n\n<li>Step 4: Input the details for the <strong>\u201cConfigure your new project\u201d<\/strong> window. For this practical task, provide the project name as <strong>\u201cGrpcGreeter<\/strong>.&#8221;<\/li>\n\n\n\n<li>Step 5: Click on <strong>the &#8220;Next\u201d<\/strong> button.<\/li>\n\n\n\n<li>Step 6: Choose <strong>\u201c.NET 6.0 (Long-term support)\u201d<\/strong> in the <strong>\u201cAdditional information\u201d<\/strong> window.<\/li>\n\n\n\n<li>Step 7: Click on the <strong>\u201cCreate\u201d<\/strong> button. Creating an ASP.NET Core gRPC project will result in your project being created.<\/li>\n\n\n\n<li>Step 8: Run the application with <strong>\u201cCtrl+F5\u201d<\/strong> combination. It will run the ASP.NET project without the debugger.<\/li>\n\n\n\n<li>Step 9: You will see a dialog box similar to the below snippet. The lack of an installed SSL certificate displays it. Click on <strong>\u201cYes\u201d<\/strong> to continue.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"496\" height=\"208\" src=\"https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2023\/10\/iis-express-ssl-certificate.png\" alt=\"iis express ssl certificate\" class=\"wp-image-14230\" srcset=\"https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2023\/10\/iis-express-ssl-certificate.png 496w, https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2023\/10\/iis-express-ssl-certificate-300x126.png 300w\" sizes=\"auto, (max-width: 496px) 100vw, 496px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Step 10: Again, you will see a new dialog box, whether you want to trust the development certificate. Click on <strong>Yes<\/strong> if you trust it. Otherwise, you can install your SSL certificate.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">For learning purposes, click on <strong>\u201cYes\u201d<\/strong> and continue.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"419\" height=\"390\" src=\"https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2023\/09\/cert-sercurity-warning.png\" alt=\"CERT Security Warning\" class=\"wp-image-13409\" srcset=\"https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2023\/09\/cert-sercurity-warning.png 419w, https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2023\/09\/cert-sercurity-warning-300x279.png 300w\" sizes=\"auto, (max-width: 419px) 100vw, 419px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">As a result of clicking Yes on this dialog box, Visual Studio will initiate a Kestrel Server, opening a browser. It will navigate you to \u201c<strong>http:\/\/localhost:port<\/strong> .&#8221;Here, the port can be any random port assigned to run the application.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Step 11: Analyze the gRPC service logs; you will see a similar output to the following snippet. It defines that the service is listening on the assigned port, configured in <strong>Properties\/launchSettings.json<\/strong>.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>info: Microsoft.Hosting.Lifetime&#91;0]\n      Now listening on: https:\/\/localhost:&lt;port&gt;\ninfo: Microsoft.Hosting.Lifetime&#91;0]\n      Application started. Press Ctrl+C to shut down.\ninfo: Microsoft.Hosting.Lifetime&#91;0]\n      Hosting environment: Development<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Step 12: Analyze the below-listed project files. It will help you thoroughly understand the code and file structure used for <strong>creating a gRPC<\/strong> server.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">The files to examine include:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Services folder:<\/strong> It will save the Greeter service implementation.<\/li>\n\n\n\n<li><strong>Protos\/greet.proto:<\/strong> It will define the gRPC Greeter and will also create server assets.<\/li>\n\n\n\n<li><strong>appSettings.json:<\/strong> This file will store the Kestrel server configuration.<\/li>\n\n\n\n<li><strong>Program.cs:<\/strong> It will have the app behavior code and gRPC service entry point details.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-phase-2-developing-a-grpc-client\">Phase 2: Developing a gRPC Client<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Step 1: <strong>Create a new instance\/project<\/strong> using the Visual Studio IDE.<\/li>\n\n\n\n<li>Step 2: Left-click on <strong>\u201cCreate a new project\u201d<\/strong> and choose <strong>\u201cConsole Application\u201d<\/strong> for the client.<\/li>\n\n\n\n<li>Step 3: Click on <strong>\u201cNext\u201d<\/strong>.<\/li>\n\n\n\n<li>Step 4: Provide the project name as <strong>\u201cGrpcGreeterClient\u201d<\/strong> and move forward.<\/li>\n\n\n\n<li>Step 5: Similar to server project configuration, choose <strong>\u201c.NET 6.0 (long-term support)\u201d<\/strong> and hit on the Create button.<\/li>\n\n\n\n<li>Step 6: Once your gRPC project is created, you need to add some packages. Open the NuGet package manager from the <strong>Tools &gt;&gt; NuGet Package Manager &gt;&gt; Package Manager Console<\/strong>.<\/li>\n\n\n\n<li>Step 7: <strong>Execute<\/strong> the following <strong>command<\/strong> on the console to change the directory.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>Command: cd GrpcGreeterClient<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Step 8: Run the following commands in the <strong>GrpcGreeterClient<\/strong> directory.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>Install-Package Grpc.Net.Client\nInstall-Package Google.Protobuf\nInstall-Package Grpc.Tools<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The successful execution of these commands will install the following packages:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Grpc.Net.Client: It installs the .NET Core client.<\/li>\n\n\n\n<li>Google.Protobuf: It provides the protobuf message APIs.<\/li>\n\n\n\n<li>Grpc.Tools: It provides the tools for supporting protobuf.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Furthermore, if you are not comfortable with using the console, you can utilize the Manage <a href=\"https:\/\/positiwise.com\/blog\/understanding-nuget-packages\">NuGet packages<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can right-click on the project name from the <strong>Solution Explorer<\/strong> section to view and select the <strong>Manage NuGet Package<\/strong> option. Once it opens, go to the <strong>browse<\/strong> tab and enter the <strong>package name<\/strong> individually. Click on the <strong>install<\/strong> button, and all your packages will be installed on your gRPC project.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Step 9: Under the gRPC client project, create a new folder with the name <strong>&#8220;Protos<\/strong>.&#8221;<\/li>\n\n\n\n<li>Step 10: Open the <strong>gRPC Greeter<\/strong> service (Server project) and copy the <strong>Protos\\greet.proto<\/strong> file. Further, paste that copied file into the Protos folder of a client project.<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Step 11: After successful copying, open the file in the client project and <strong>update the namespace<\/strong> as provided below.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>option csharp_namespace = \"GrpcGreeterClient\";<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Step 12: From the Solution Explorer, right-click on Project and choose the <strong>\u201cEdit project file\u201d<\/strong> option.<\/li>\n\n\n\n<li>Step 13: <strong>Add a new item group<\/strong> in the file by copying the following XML code.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;ItemGroup&gt;\n  &lt;Protobuf Include=\"Protos\\greet.proto\" GrpcServices=\"Client\" \/&gt;\n&lt;\/ItemGroup&gt;<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-phase-3-developing-a-grpc-greeter-client\">Phase 3: Developing a gRPC Greeter Client<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Step 1: Open the <strong>Program.cs<\/strong> file of the gRPC client project and modify the code per the snippet below.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>using System.Threading.Tasks;\nusing Grpc.Net.Client;\nusing GrpcGreeterClient;\n\n\/\/ The port number must match the port of the gRPC server.\nusing var channel = GrpcChannel.ForAddress(\"https:\/\/localhost:7042\");\nvar client = new Greeter.GreeterClient(channel);\nvar reply = await client.SayHelloAsync(\n                  new HelloRequest { Name = \"GreeterClient\" });\nConsole.WriteLine(\"Greeting: \" + reply.Message);\nConsole.WriteLine(\"Press any key to exit...\");\nConsole.ReadKey();<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">In the above code, we have chosen <strong>port number 7042<\/strong> and also defined <strong>HTTPS<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In addition, the GrpcChannel will provide all the details, initiating and establishing a connection with the gRPC service. Also, the client will call the <strong>\u201cSayHello\u201d<\/strong> method, and its result will be as below.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ The port number must match the port of the gRPC server.\nusing var channel = GrpcChannel.ForAddress(\"https:\/\/localhost:7042\");\nvar client = new Greeter.GreeterClient(channel);\nvar reply = await client.SayHelloAsync(\n                  new HelloRequest { Name = \"GreeterClient\" });\nConsole.WriteLine(\"Greeting: \" + reply.Message);\nConsole.WriteLine(\"Press any key to exit...\");\nConsole.ReadKey();<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-phase-4-testing-the-grpc-server-and-client-communication\">Phase 4: Testing the gRPC Server and Client Communication<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Now, the only task left is to test the gRPC client and server. To test your ASP.NET Core gRPC services, undergo the below procedure.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Step 1: Open the <strong>appsettings.Development.json<\/strong> file and modify it per the following code.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>{\n  \"Logging\": {\n    \"LogLevel\": {\n      \"Default\": \"Information\",\n      \"Microsoft.AspNetCore\": \"Warning\"\n      ,\"Microsoft.AspNetCore.Hosting\": \"Information\",\n      \"Microsoft.AspNetCore.Routing.EndpointMiddleware\": \"Information\"\n    }\n  }\n}<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Step 2: Start the server and client project simultaneously using the <strong>Ctrl+F5<\/strong> combination.<\/li>\n\n\n\n<li>Step 3: View the output and logs on the Console. The client will send its name to the gRPC server and receive a &#8220;<strong>Hello client-name<\/strong>&#8221; message. You will see &#8220;<strong>Hello GreeterClient<\/strong>&#8221; as an output for our written code.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>Greeting: Hello GreeterClient\nPress any key to exit...<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">In addition, analyze the logs for detailed insights about communication between the client and the server.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>info: Microsoft.Hosting.Lifetime&#91;0]\n      Now listening on: https:\/\/localhost:&lt;port&gt;\ninfo: Microsoft.Hosting.Lifetime&#91;0]\n      Application started. Press Ctrl+C to shut down.\ninfo: Microsoft.Hosting.Lifetime&#91;0]\n      Hosting environment: Development\ninfo: Microsoft.Hosting.Lifetime&#91;0]\n      Content root path: C:\\GH\\aspnet\\docs\\4\\Docs\\aspnetcore\\tutorials\\grpc\\grpc-start\\sample\\GrpcGreeter\ninfo: Microsoft.AspNetCore.Hosting.Diagnostics&#91;1]\n      Request starting HTTP\/2 POST https:\/\/localhost:&lt;port&gt;\/Greet.Greeter\/SayHello application\/grpc\ninfo: Microsoft.AspNetCore.Routing.EndpointMiddleware&#91;0]\n      Executing endpoint 'gRPC - \/Greet.Greeter\/SayHello'\ninfo: Microsoft.AspNetCore.Routing.EndpointMiddleware&#91;1]\n      Executed endpoint 'gRPC - \/Greet.Greeter\/SayHello'\ninfo: Microsoft.AspNetCore.Hosting.Diagnostics&#91;2]\n      Request finished in 78.32260000000001ms 200 application\/grpc<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Here, the gRPC project is completed. Now, you can take reference from the project and implement gRPC services in your ASP.NET Core applications.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-why-prefer-microsoft-dotnet-framework-developer-for-grpc-configuration\">Why Prefer Microsoft Dotnet Framework Developer for gRPC Configuration<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">For the development of enterprise software, one should always prefer to hire developers from a reputed <a href=\"https:\/\/positiwise.com\/technologies\/dot-net-development\">.NET development company<\/a>. They hold the expertise and experience in curating applications enduring rise in productivity, improvement in collaboration, and automation to business procedures.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In addition, such companies help you onboard professional developers and start working on your project within 24 to 48 hours. Moreover, you also get the benefit of 24\/7 support service, 100% transparency, agile development methodology, and affordable prices.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Whether you need gRPC configuration or any other .NET development service, always interview developers before finalizing them. Check their expertise based on technical, communication, and problem-solving factors. As a result, you will have a dedicated and perfect team to achieve your objectives.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-concluding-up\">Concluding Up<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">gRPC is highly used in ASP.NET Core applications for improving performance and supporting smooth communication between server and client machines. To implement it in your applications, you should understand its fundamentals. With the procedure provided above, you can learn how to configure gRPC services for both the server and client side.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Further, referencing the mentioned process, you can install the required packages in your ASP.NET core app to run gRPC services. But, if you are an enterprise looking for gRPC services, you should <a href=\"https:\/\/positiwise.com\/hire\/hire-dot-net-core-developers\">hire dedicated ASP.NET Core developers<\/a>. Such engineers are experts in .NET programming, understand your needs, and provide software that offers accurate results.<\/p>\n  <div class=\"related-post slider\">\r\n        <div class=\"headline\">Related Posts<\/div>\r\n    <div class=\"post-list owl-carousel\">\r\n\r\n            <div class=\"item\">\r\n            <div class=\"thumb post_thumb\">\r\n    <a  title=\".Net Core vs. Java \u2013 Which One You Should Use for Your Projects?\" href=\"https:\/\/positiwise.com\/blog\/net-core-vs-java-technology\">\r\n\r\n      <img loading=\"lazy\" decoding=\"async\" width=\"1200\" height=\"800\" src=\"https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2021\/12\/web-security-partner-1.jpg\" class=\"attachment-full size-full wp-post-image\" alt=\".Net Core vs. Java \u2013 Which One You Should Use for Your Projects?\" srcset=\"https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2021\/12\/web-security-partner-1.jpg 1200w, https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2021\/12\/web-security-partner-1-300x200.jpg 300w, https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2021\/12\/web-security-partner-1-1024x683.jpg 1024w, https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2021\/12\/web-security-partner-1-768x512.jpg 768w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/>\r\n\r\n    <\/a>\r\n  <\/div>\r\n\r\n  <a class=\"title post_title\"  title=\".Net Core vs. Java \u2013 Which One You Should Use for Your Projects?\" href=\"https:\/\/positiwise.com\/blog\/net-core-vs-java-technology\">\r\n        .Net Core vs. Java \u2013 Which One You Should Use for Your Projects?  <\/a>\r\n\r\n        <\/div>\r\n              <div class=\"item\">\r\n            <div class=\"thumb post_thumb\">\r\n    <a  title=\"Precise Road Map for ASP.NET Developers\" href=\"https:\/\/positiwise.com\/blog\/roadmap-for-asp-dot-net-developers\">\r\n\r\n      <img loading=\"lazy\" decoding=\"async\" width=\"1021\" height=\"621\" src=\"https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2022\/01\/dealership-1200x800-1.jpg\" class=\"attachment-full size-full wp-post-image\" alt=\"Hire ASP.NET Developers - A Precise Road Map to Employ ASP.NET Developers\" srcset=\"https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2022\/01\/dealership-1200x800-1.jpg 1021w, https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2022\/01\/dealership-1200x800-1-300x182.jpg 300w, https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2022\/01\/dealership-1200x800-1-768x467.jpg 768w\" sizes=\"auto, (max-width: 1021px) 100vw, 1021px\" \/>\r\n\r\n    <\/a>\r\n  <\/div>\r\n\r\n  <a class=\"title post_title\"  title=\"Precise Road Map for ASP.NET Developers\" href=\"https:\/\/positiwise.com\/blog\/roadmap-for-asp-dot-net-developers\">\r\n        Precise Road Map for ASP.NET Developers  <\/a>\r\n\r\n        <\/div>\r\n              <div class=\"item\">\r\n            <div class=\"thumb post_thumb\">\r\n    <a  title=\".NET Core vs Node.js: The Difference Explained by Web Expert\" href=\"https:\/\/positiwise.com\/blog\/net-core-vs-node-js\">\r\n\r\n      <img loading=\"lazy\" decoding=\"async\" width=\"1021\" height=\"621\" src=\"https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2022\/01\/NET-Core-VS-Node-js-jpg.webp\" class=\"attachment-full size-full wp-post-image\" alt=\"NET-Core-VS-Node-js\" srcset=\"https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2022\/01\/NET-Core-VS-Node-js-jpg.webp 1021w, https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2022\/01\/NET-Core-VS-Node-js-300x182.webp 300w, https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2022\/01\/NET-Core-VS-Node-js-768x467.webp 768w\" sizes=\"auto, (max-width: 1021px) 100vw, 1021px\" \/>\r\n\r\n    <\/a>\r\n  <\/div>\r\n\r\n  <a class=\"title post_title\"  title=\".NET Core vs Node.js: The Difference Explained by Web Expert\" href=\"https:\/\/positiwise.com\/blog\/net-core-vs-node-js\">\r\n        .NET Core vs Node.js: The Difference Explained by Web Expert  <\/a>\r\n\r\n        <\/div>\r\n      \r\n  <\/div>\r\n\r\n  <script>\r\n      <\/script>\r\n  <style>\r\n    .related-post {}\r\n\r\n    .related-post .post-list {\r\n      text-align: left;\r\n          }\r\n\r\n    .related-post .post-list .item {\r\n      margin: 5px;\r\n      padding: 0px;\r\n          }\r\n\r\n    .related-post .headline {\r\n      font-size: 2rem !important;\r\n      color: #212529 !important;\r\n          }\r\n\r\n    .related-post .headline {\r\nmargin-top: 0;\r\npadding-left: 1%;\r\n}.related-post .post-list .item .post_thumb {\r\n      max-height: 220px;\r\n      margin: 0px 0px 10px 0px;\r\n      padding: 0px;\r\n      display: block;\r\n          }\r\n\r\n    .related-post .post-list .item .post_title {\r\n      font-size: 1rem;\r\n      color: #212529;\r\n      margin: 10px 0px;\r\n      padding: 0px;\r\n      display: block;\r\n      text-decoration: none;\r\n          }\r\n\r\n    .related-post .post-list .item .post_excerpt {\r\n      font-size: 13px;\r\n      color: #3f3f3f;\r\n      margin: 10px 0px;\r\n      padding: 0px;\r\n      display: block;\r\n      text-decoration: none;\r\n          }\r\n\r\n    .related-post .owl-dots .owl-dot {\r\n          }\r\n\r\n      <\/style>\r\n      <script>\r\n      jQuery(document).ready(function($) {\r\n        $(\".related-post .post-list\").owlCarousel({\r\n          items: 3,\r\n          responsiveClass: true,\r\n          responsive: {\r\n            0: {\r\n              items: 1,\r\n            },\r\n            768: {\r\n              items: 2,\r\n            },\r\n            1200: {\r\n              items: 3,\r\n            }\r\n          },\r\n                      rewind: true,\r\n                                loop: true,\r\n                                center: true,\r\n                                autoplay: true,\r\n            autoplayHoverPause: true,\r\n                                nav: true,\r\n            navSpeed: 1000,\r\n            navText: ['<i class=\"fas fa-chevron-left\"><\/i>', '<i class=\"fas fa-chevron-right\"><\/i>'],\r\n                                dots: true,\r\n            dotsSpeed: 1200,\r\n                                                    rtl: false,\r\n          \r\n        });\r\n      });\r\n    <\/script>\r\n  <\/div>\r\n","protected":false},"excerpt":{"rendered":"<p>Quick Overview:The blog provides an insight into the gRPC (google Remote Procedure Call) with a brief definition and [&hellip;]<\/p>\n  <div class=\"related-post slider\">\r\n        <div class=\"headline\">Related Posts<\/div>\r\n    <div class=\"post-list owl-carousel\">\r\n\r\n            <div class=\"item\">\r\n            <div class=\"thumb post_thumb\">\r\n    <a  title=\".Net Core vs. Java \u2013 Which One You Should Use for Your Projects?\" href=\"https:\/\/positiwise.com\/blog\/net-core-vs-java-technology\">\r\n\r\n      <img width=\"1200\" height=\"800\" src=\"https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2021\/12\/web-security-partner-1.jpg\" class=\"attachment-full size-full wp-post-image\" alt=\".Net Core vs. Java \u2013 Which One You Should Use for Your Projects?\" decoding=\"async\" loading=\"lazy\" srcset=\"https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2021\/12\/web-security-partner-1.jpg 1200w, https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2021\/12\/web-security-partner-1-300x200.jpg 300w, https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2021\/12\/web-security-partner-1-1024x683.jpg 1024w, https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2021\/12\/web-security-partner-1-768x512.jpg 768w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/>\r\n\r\n    <\/a>\r\n  <\/div>\r\n\r\n  <a class=\"title post_title\"  title=\".Net Core vs. Java \u2013 Which One You Should Use for Your Projects?\" href=\"https:\/\/positiwise.com\/blog\/net-core-vs-java-technology\">\r\n        .Net Core vs. Java \u2013 Which One You Should Use for Your Projects?  <\/a>\r\n\r\n        <\/div>\r\n              <div class=\"item\">\r\n            <div class=\"thumb post_thumb\">\r\n    <a  title=\"Precise Road Map for ASP.NET Developers\" href=\"https:\/\/positiwise.com\/blog\/roadmap-for-asp-dot-net-developers\">\r\n\r\n      <img width=\"1021\" height=\"621\" src=\"https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2022\/01\/dealership-1200x800-1.jpg\" class=\"attachment-full size-full wp-post-image\" alt=\"Hire ASP.NET Developers - A Precise Road Map to Employ ASP.NET Developers\" decoding=\"async\" loading=\"lazy\" srcset=\"https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2022\/01\/dealership-1200x800-1.jpg 1021w, https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2022\/01\/dealership-1200x800-1-300x182.jpg 300w, https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2022\/01\/dealership-1200x800-1-768x467.jpg 768w\" sizes=\"auto, (max-width: 1021px) 100vw, 1021px\" \/>\r\n\r\n    <\/a>\r\n  <\/div>\r\n\r\n  <a class=\"title post_title\"  title=\"Precise Road Map for ASP.NET Developers\" href=\"https:\/\/positiwise.com\/blog\/roadmap-for-asp-dot-net-developers\">\r\n        Precise Road Map for ASP.NET Developers  <\/a>\r\n\r\n        <\/div>\r\n              <div class=\"item\">\r\n            <div class=\"thumb post_thumb\">\r\n    <a  title=\"A Descriptive Guide to .NET Framework\" href=\"https:\/\/positiwise.com\/blog\/a-descriptive-guide-to-dot-net-framework\">\r\n\r\n      <img width=\"1021\" height=\"621\" src=\"https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2022\/01\/a-descriptive-guide-to-dot-net-framework.jpg\" class=\"attachment-full size-full wp-post-image\" alt=\"A Descriptive Guide to .NET Framework\" decoding=\"async\" loading=\"lazy\" srcset=\"https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2022\/01\/a-descriptive-guide-to-dot-net-framework.jpg 1021w, https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2022\/01\/a-descriptive-guide-to-dot-net-framework-300x182.jpg 300w, https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2022\/01\/a-descriptive-guide-to-dot-net-framework-768x467.jpg 768w\" sizes=\"auto, (max-width: 1021px) 100vw, 1021px\" \/>\r\n\r\n    <\/a>\r\n  <\/div>\r\n\r\n  <a class=\"title post_title\"  title=\"A Descriptive Guide to .NET Framework\" href=\"https:\/\/positiwise.com\/blog\/a-descriptive-guide-to-dot-net-framework\">\r\n        A Descriptive Guide to .NET Framework  <\/a>\r\n\r\n        <\/div>\r\n      \r\n  <\/div>\r\n\r\n  <script>\r\n      <\/script>\r\n  <style>\r\n    .related-post {}\r\n\r\n    .related-post .post-list {\r\n      text-align: left;\r\n          }\r\n\r\n    .related-post .post-list .item {\r\n      margin: 5px;\r\n      padding: 0px;\r\n          }\r\n\r\n    .related-post .headline {\r\n      font-size: 2rem !important;\r\n      color: #212529 !important;\r\n          }\r\n\r\n    .related-post .headline {\r\nmargin-top: 0;\r\npadding-left: 1%;\r\n}.related-post .post-list .item .post_thumb {\r\n      max-height: 220px;\r\n      margin: 0px 0px 10px 0px;\r\n      padding: 0px;\r\n      display: block;\r\n          }\r\n\r\n    .related-post .post-list .item .post_title {\r\n      font-size: 1rem;\r\n      color: #212529;\r\n      margin: 10px 0px;\r\n      padding: 0px;\r\n      display: block;\r\n      text-decoration: none;\r\n          }\r\n\r\n    .related-post .post-list .item .post_excerpt {\r\n      font-size: 13px;\r\n      color: #3f3f3f;\r\n      margin: 10px 0px;\r\n      padding: 0px;\r\n      display: block;\r\n      text-decoration: none;\r\n          }\r\n\r\n    .related-post .owl-dots .owl-dot {\r\n          }\r\n\r\n      <\/style>\r\n      <script>\r\n      jQuery(document).ready(function($) {\r\n        $(\".related-post .post-list\").owlCarousel({\r\n          items: 3,\r\n          responsiveClass: true,\r\n          responsive: {\r\n            0: {\r\n              items: 1,\r\n            },\r\n            768: {\r\n              items: 2,\r\n            },\r\n            1200: {\r\n              items: 3,\r\n            }\r\n          },\r\n                      rewind: true,\r\n                                loop: true,\r\n                                center: true,\r\n                                autoplay: true,\r\n            autoplayHoverPause: true,\r\n                                nav: true,\r\n            navSpeed: 1000,\r\n            navText: ['<i class=\"fas fa-chevron-left\"><\/i>', '<i class=\"fas fa-chevron-right\"><\/i>'],\r\n                                dots: true,\r\n            dotsSpeed: 1200,\r\n                                                    rtl: false,\r\n          \r\n        });\r\n      });\r\n    <\/script>\r\n  <\/div>\r\n","protected":false},"author":3,"featured_media":14242,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_eb_attr":"","footnotes":""},"categories":[7],"tags":[],"class_list":["post-14225","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dot-net-development"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Implement gRPC with ASP.NET Core<\/title>\n<meta name=\"description\" content=\"Tutorial on implementing gRPC in ASP.NET Core apps. Covers generating gRPC code, creating controllers, and calling services from clients.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/positiwise.com\/blog\/implement-grpc-with-asp-net-core\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Implement gRPC with ASP.NET Core\" \/>\n<meta property=\"og:description\" content=\"Tutorial on implementing gRPC in ASP.NET Core apps. Covers generating gRPC code, creating controllers, and calling services from clients.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/positiwise.com\/blog\/implement-grpc-with-asp-net-core\" \/>\n<meta property=\"og:site_name\" content=\"Positiwise\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/positiwise\/\" \/>\n<meta property=\"article:published_time\" content=\"2023-10-25T07:07:18+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-08-05T12:01:49+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2023\/10\/grpc-with-asp-net-core.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1021\" \/>\n\t<meta property=\"og:image:height\" content=\"621\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Parag Mehta\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@positiwise\" \/>\n<meta name=\"twitter:site\" content=\"@positiwise\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Parag Mehta\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/positiwise.com\\\/blog\\\/implement-grpc-with-asp-net-core#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/positiwise.com\\\/blog\\\/implement-grpc-with-asp-net-core\"},\"author\":{\"name\":\"Parag Mehta\",\"@id\":\"https:\\\/\\\/positiwise.com\\\/blog\\\/#\\\/schema\\\/person\\\/b4b3d9970ea94f5914a615f70345353a\"},\"headline\":\"How to Implement gRPC with ASP.NET Core\",\"datePublished\":\"2023-10-25T07:07:18+00:00\",\"dateModified\":\"2024-08-05T12:01:49+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/positiwise.com\\\/blog\\\/implement-grpc-with-asp-net-core\"},\"wordCount\":1688,\"publisher\":{\"@id\":\"https:\\\/\\\/positiwise.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/positiwise.com\\\/blog\\\/implement-grpc-with-asp-net-core#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/positiwise.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/10\\\/grpc-with-asp-net-core.jpg\",\"articleSection\":[\".NET Development\"],\"inLanguage\":\"en-US\",\"copyrightYear\":\"2022\",\"copyrightHolder\":{\"@id\":\"https:\\\/\\\/positiwise.com\\\/blog\\\/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/positiwise.com\\\/blog\\\/implement-grpc-with-asp-net-core\",\"url\":\"https:\\\/\\\/positiwise.com\\\/blog\\\/implement-grpc-with-asp-net-core\",\"name\":\"How to Implement gRPC with ASP.NET Core\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/positiwise.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/positiwise.com\\\/blog\\\/implement-grpc-with-asp-net-core#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/positiwise.com\\\/blog\\\/implement-grpc-with-asp-net-core#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/positiwise.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/10\\\/grpc-with-asp-net-core.jpg\",\"datePublished\":\"2023-10-25T07:07:18+00:00\",\"dateModified\":\"2024-08-05T12:01:49+00:00\",\"description\":\"Tutorial on implementing gRPC in ASP.NET Core apps. Covers generating gRPC code, creating controllers, and calling services from clients.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/positiwise.com\\\/blog\\\/implement-grpc-with-asp-net-core#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/positiwise.com\\\/blog\\\/implement-grpc-with-asp-net-core\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/positiwise.com\\\/blog\\\/implement-grpc-with-asp-net-core#primaryimage\",\"url\":\"https:\\\/\\\/positiwise.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/10\\\/grpc-with-asp-net-core.jpg\",\"contentUrl\":\"https:\\\/\\\/positiwise.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/10\\\/grpc-with-asp-net-core.jpg\",\"width\":1021,\"height\":621,\"caption\":\"gRPC with ASP.NET Core\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/positiwise.com\\\/blog\\\/implement-grpc-with-asp-net-core#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/positiwise.com\\\/blog\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Implement gRPC with ASP.NET Core\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/positiwise.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/positiwise.com\\\/blog\\\/\",\"name\":\"Positiwise\",\"description\":\"Providing Full-cycle Software Development Services\",\"publisher\":{\"@id\":\"https:\\\/\\\/positiwise.com\\\/blog\\\/#organization\"},\"alternateName\":\"Positiwise Software Pvt Ltd\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/positiwise.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/positiwise.com\\\/blog\\\/#organization\",\"name\":\"Positiwise\",\"alternateName\":\"Positiwise Software Pvt Ltd\",\"url\":\"https:\\\/\\\/positiwise.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/positiwise.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/positiwise.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/logo.png\",\"contentUrl\":\"https:\\\/\\\/positiwise.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/logo.png\",\"width\":202,\"height\":29,\"caption\":\"Positiwise\"},\"image\":{\"@id\":\"https:\\\/\\\/positiwise.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/positiwise\\\/\",\"https:\\\/\\\/x.com\\\/positiwise\",\"https:\\\/\\\/github.com\\\/positiwise\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/positiwise\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/positiwise.com\\\/blog\\\/#\\\/schema\\\/person\\\/b4b3d9970ea94f5914a615f70345353a\",\"name\":\"Parag Mehta\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/072ea4a638415a77610a840228d51b8225ad88856ed34d69cbe1fcd638390535?s=96&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/072ea4a638415a77610a840228d51b8225ad88856ed34d69cbe1fcd638390535?s=96&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/072ea4a638415a77610a840228d51b8225ad88856ed34d69cbe1fcd638390535?s=96&r=g\",\"caption\":\"Parag Mehta\"},\"description\":\"Parag Mehta, the CEO and Founder of Positiwise Software Pvt Ltd has extensive knowledge of the development niche. He is implementing custom strategies to craft highly-appealing and robust applications for its clients and supporting employees to grow and ace the tasks. He is a consistent learner and always provides the best-in-quality solutions, accelerating productivity.\",\"sameAs\":[\"https:\\\/\\\/www.linkedin.com\\\/in\\\/paragcmehta\"],\"url\":\"https:\\\/\\\/positiwise.com\\\/blog\\\/author\\\/parag-mehta\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Implement gRPC with ASP.NET Core","description":"Tutorial on implementing gRPC in ASP.NET Core apps. Covers generating gRPC code, creating controllers, and calling services from clients.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/positiwise.com\/blog\/implement-grpc-with-asp-net-core","og_locale":"en_US","og_type":"article","og_title":"How to Implement gRPC with ASP.NET Core","og_description":"Tutorial on implementing gRPC in ASP.NET Core apps. Covers generating gRPC code, creating controllers, and calling services from clients.","og_url":"https:\/\/positiwise.com\/blog\/implement-grpc-with-asp-net-core","og_site_name":"Positiwise","article_publisher":"https:\/\/www.facebook.com\/positiwise\/","article_published_time":"2023-10-25T07:07:18+00:00","article_modified_time":"2024-08-05T12:01:49+00:00","og_image":[{"width":1021,"height":621,"url":"https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2023\/10\/grpc-with-asp-net-core.jpg","type":"image\/jpeg"}],"author":"Parag Mehta","twitter_card":"summary_large_image","twitter_creator":"@positiwise","twitter_site":"@positiwise","twitter_misc":{"Written by":"Parag Mehta","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/positiwise.com\/blog\/implement-grpc-with-asp-net-core#article","isPartOf":{"@id":"https:\/\/positiwise.com\/blog\/implement-grpc-with-asp-net-core"},"author":{"name":"Parag Mehta","@id":"https:\/\/positiwise.com\/blog\/#\/schema\/person\/b4b3d9970ea94f5914a615f70345353a"},"headline":"How to Implement gRPC with ASP.NET Core","datePublished":"2023-10-25T07:07:18+00:00","dateModified":"2024-08-05T12:01:49+00:00","mainEntityOfPage":{"@id":"https:\/\/positiwise.com\/blog\/implement-grpc-with-asp-net-core"},"wordCount":1688,"publisher":{"@id":"https:\/\/positiwise.com\/blog\/#organization"},"image":{"@id":"https:\/\/positiwise.com\/blog\/implement-grpc-with-asp-net-core#primaryimage"},"thumbnailUrl":"https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2023\/10\/grpc-with-asp-net-core.jpg","articleSection":[".NET Development"],"inLanguage":"en-US","copyrightYear":"2022","copyrightHolder":{"@id":"https:\/\/positiwise.com\/blog\/#organization"}},{"@type":"WebPage","@id":"https:\/\/positiwise.com\/blog\/implement-grpc-with-asp-net-core","url":"https:\/\/positiwise.com\/blog\/implement-grpc-with-asp-net-core","name":"How to Implement gRPC with ASP.NET Core","isPartOf":{"@id":"https:\/\/positiwise.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/positiwise.com\/blog\/implement-grpc-with-asp-net-core#primaryimage"},"image":{"@id":"https:\/\/positiwise.com\/blog\/implement-grpc-with-asp-net-core#primaryimage"},"thumbnailUrl":"https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2023\/10\/grpc-with-asp-net-core.jpg","datePublished":"2023-10-25T07:07:18+00:00","dateModified":"2024-08-05T12:01:49+00:00","description":"Tutorial on implementing gRPC in ASP.NET Core apps. Covers generating gRPC code, creating controllers, and calling services from clients.","breadcrumb":{"@id":"https:\/\/positiwise.com\/blog\/implement-grpc-with-asp-net-core#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/positiwise.com\/blog\/implement-grpc-with-asp-net-core"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/positiwise.com\/blog\/implement-grpc-with-asp-net-core#primaryimage","url":"https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2023\/10\/grpc-with-asp-net-core.jpg","contentUrl":"https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2023\/10\/grpc-with-asp-net-core.jpg","width":1021,"height":621,"caption":"gRPC with ASP.NET Core"},{"@type":"BreadcrumbList","@id":"https:\/\/positiwise.com\/blog\/implement-grpc-with-asp-net-core#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/positiwise.com\/blog"},{"@type":"ListItem","position":2,"name":"How to Implement gRPC with ASP.NET Core"}]},{"@type":"WebSite","@id":"https:\/\/positiwise.com\/blog\/#website","url":"https:\/\/positiwise.com\/blog\/","name":"Positiwise","description":"Providing Full-cycle Software Development Services","publisher":{"@id":"https:\/\/positiwise.com\/blog\/#organization"},"alternateName":"Positiwise Software Pvt Ltd","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/positiwise.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/positiwise.com\/blog\/#organization","name":"Positiwise","alternateName":"Positiwise Software Pvt Ltd","url":"https:\/\/positiwise.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/positiwise.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2023\/07\/logo.png","contentUrl":"https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2023\/07\/logo.png","width":202,"height":29,"caption":"Positiwise"},"image":{"@id":"https:\/\/positiwise.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/positiwise\/","https:\/\/x.com\/positiwise","https:\/\/github.com\/positiwise","https:\/\/www.linkedin.com\/company\/positiwise"]},{"@type":"Person","@id":"https:\/\/positiwise.com\/blog\/#\/schema\/person\/b4b3d9970ea94f5914a615f70345353a","name":"Parag Mehta","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/072ea4a638415a77610a840228d51b8225ad88856ed34d69cbe1fcd638390535?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/072ea4a638415a77610a840228d51b8225ad88856ed34d69cbe1fcd638390535?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/072ea4a638415a77610a840228d51b8225ad88856ed34d69cbe1fcd638390535?s=96&r=g","caption":"Parag Mehta"},"description":"Parag Mehta, the CEO and Founder of Positiwise Software Pvt Ltd has extensive knowledge of the development niche. He is implementing custom strategies to craft highly-appealing and robust applications for its clients and supporting employees to grow and ace the tasks. He is a consistent learner and always provides the best-in-quality solutions, accelerating productivity.","sameAs":["https:\/\/www.linkedin.com\/in\/paragcmehta"],"url":"https:\/\/positiwise.com\/blog\/author\/parag-mehta"}]}},"_links":{"self":[{"href":"https:\/\/positiwise.com\/blog\/wp-json\/wp\/v2\/posts\/14225","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/positiwise.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/positiwise.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/positiwise.com\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/positiwise.com\/blog\/wp-json\/wp\/v2\/comments?post=14225"}],"version-history":[{"count":14,"href":"https:\/\/positiwise.com\/blog\/wp-json\/wp\/v2\/posts\/14225\/revisions"}],"predecessor-version":[{"id":17371,"href":"https:\/\/positiwise.com\/blog\/wp-json\/wp\/v2\/posts\/14225\/revisions\/17371"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/positiwise.com\/blog\/wp-json\/wp\/v2\/media\/14242"}],"wp:attachment":[{"href":"https:\/\/positiwise.com\/blog\/wp-json\/wp\/v2\/media?parent=14225"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/positiwise.com\/blog\/wp-json\/wp\/v2\/categories?post=14225"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/positiwise.com\/blog\/wp-json\/wp\/v2\/tags?post=14225"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}