Category : ocelot

I am running in Local using Docker an Ocelot API gateway (https://localhost:5010) service that calls a Dot net core API (https://localhost:5003). I used self signed certificates and both services are secure: To make it work locally I add in Ocelot.Development.json: "DownstreamPathTemplate": "/ActivityTypes", "DownstreamScheme": "https", "DownstreamHostAndPorts": [ { "Host": "xplora.api", "Port": "443" } ], "UpstreamPathTemplate": "/ActivityTypes", ..

Read more

I am having difficulties with Ocelot 16.0.1. Everything was working perfectly on docker. After one update, things went down to hill. Basically, Ocelot not able to find path requested even though it is exists in the target service. Startup.cs public Startup(IWebHostEnvironment env) { var builder = new Microsoft.Extensions.Configuration.ConfigurationBuilder(); builder.SetBasePath(env.ContentRootPath) .AddJsonFile("appsettings.json") .AddJsonFile("configuration." + env.EnvironmentName + ".json", ..

Read more

I built a simple microservice "CatalogController" with vs2019 which will handle requests on /api/catalog that looks like this using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; namespace CatalogAPI.Services.Controllers { [Route("api/[controller]")] public class CatalogController : Controller { [HttpGet] public IEnumerable<string> Get() { return new string[] { "Google Pixel", "Apple iPhone", "OnePlus Nord", ..

Read more

My .NET Core API is using eureka server as a discovery client , in which when I dockerized the web API then running/debugging the project as a Docker shows me this exception at (app.UseDiscoveryClient()) in Configure method. My Startup file is : [Start-Up] [Exception] PS: Reputation is less than 10 anyone set images ! Source: ..

Read more

We have developed two ASP.NET CORE (5.0) microservices and deployed them inside docker http://localhost:28621/stock http://localhost:62362/user Both are easily accessible from browser. We have used ocelot gateway for API gateway. When we deployed it inside docker we got following error warn: Ocelot.DownstreamRouteFinder.Middleware.DownstreamRouteFinderMiddleware[0] requestId: 0HM8658EF6KHC:00000002, previousRequestId: no previous request id, message: DownstreamRouteFinderMiddleware setting pipeline errors. IDownstreamRouteFinder returned ..

Read more

I am trying to estabilish an HTTPS communication between two containers (that I run with docker-compose) with a .NET Core Ocelot Gateway and a .NET Core Web API service inside. I’ve managed to make the applications work both in HTTP and HTTPS when executing them directly from Visual Studio and in HTTP when using compose ..

Read more

I’m trying to use Ocelot (Api gateway) + consul + my web api (.Net 5) via HTTPS in docker; ocelot – v17.0.0 consul – latest https://hub.docker.com/_/consul my service – ASP.NET 5 Web Api Trust HTTPS certificate from Windows Subsystem for Linux source: https://docs.microsoft.com/en-us/aspnet/core/security/enforcing-ssl?view=aspnetcore-5.0&tabs=visual-studio#trust-https-certificate-from-windows-subsystem-for-linux MY_SECRET_PROJECT_PATHLicenseServiceWebApi> dotnet dev-certs https –clean Cleaning HTTPS development certificates from the machine. ..

Read more

I am creating an ApiGateway with ocelot that consume an Api service in net core. The ApiGateway and ApiService are deployed on docker with docker compose of this way: Docker-compose: tresfilos.webapigateway: image: ${DOCKER_REGISTRY-}tresfilosapigateway build: context: . dockerfile: tresfilos.ApiGateway/ApiGw-Base/Dockerfile tresfilos.users.service: image: ${DOCKER_REGISTRY-}tresfilosusersservice build: context: . dockerfile: tresfilos.Users.Service/tresfilos.Users.Service/Dockerfile Docker-compose.override: tresfilos.webapigateway: environment: – ASPNETCORE_ENVIRONMENT=Development – IdentityUrl=http://identity-api ports: – ..

Read more