Code Monkey home page Code Monkey logo

omid-ahmadpour / ocelot.provider.sqlserver Goto Github PK

View Code? Open in Web Editor NEW
14.0 14.0 3.0 72 KB

Ocelot.Provider.SqlServer enables dynamic route management by storing Ocelot routes in a SQL Server database, eliminating JSON files. Designed for ASP.NET, it fully supports .NET 6.0.

C# 97.53% Dockerfile 2.47%
aspnetcore dotnetcore dynamic-routes ocelot ocelot-api-gateway ocelot-gateway ocelot-provider ocelot-provider-sqlserver save-ocelot-routes

ocelot.provider.sqlserver's Introduction

Hi there,
I'm Omid Ahmadpour ๐Ÿ‘‹

Professional skills

csharp dotnet dotnet docker grpc rabbitmq azure

  • ๐Ÿ’ฌ Ask me about: .NET, C#, Clean-Architecture, Microservices, CQRS, Clean Code, DDD, Azure
  • ๐Ÿ‘ฏ Iโ€™m looking to collaborate on: .NET projects

ocelot.provider.sqlserver's People

Contributors

omid-ahmadpour avatar vahidfarahmandian avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

ocelot.provider.sqlserver's Issues

How to store Ocelot Logging history to SQL

I like to store Ocelot Logging history to SQL locally. Include RequestId. How to achieve this ? I get my Logging history in my Console.
`Hosting environment: Development
Content root path: D:\Al Azeem\OneDrive - MGUKDD\Attachments\Pratices\Gateway
Now listening on: https://localhost:7095
Now listening on: http://localhost:5149
Application started. Press Ctrl+C to shut down.
info: Microsoft.AspNetCore.Hosting.Diagnostics[1]
Request starting HTTP/2 GET https://localhost:7095/weatherforecast - -
warn: Ocelot.DownstreamRouteFinder.Middleware.DownstreamRouteFinderMiddleware[0]
requestId: 0HN0526GC2DD0:00000001, previousRequestId: No PreviousRequestId, message: 'DownstreamRouteFinderMiddleware setting pipeline errors. IDownstreamRouteFinder returned Error Code: UnableToFindDownstreamRouteError Message: Failed to match Route configuration for upstream path: /weatherforecast, verb: GET.'
warn: Ocelot.Responder.Middleware.ResponderMiddleware[0]
requestId: 0HN0526GC2DD0:00000001, previousRequestId: No PreviousRequestId, message: 'Error Code: UnableToFindDownstreamRouteError Message: Failed to match Route configuration for upstream path: /weatherforecast, verb: GET. errors found in ResponderMiddleware. Setting error response for request path:/weatherforecast, request method: GET'
info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
Request finished HTTP/2 GET https://localhost:7095/weatherforecast - - - 404 0 - 255.3270ms
info: Microsoft.AspNetCore.Hosting.Diagnostics[1]
Request starting HTTP/2 GET https://localhost:7095/gatewaycheck - -
info: Ocelot.RateLimit.Middleware.ClientRateLimitMiddleware[0]
requestId: 0HN0526GC2DD0:00000003, previousRequestId: No PreviousRequestId, message: 'EndpointRateLimiting is not enabled for /weatherforecast'
info: Ocelot.Authentication.Middleware.AuthenticationMiddleware[0]
requestId: 0HN0526GC2DD0:00000003, previousRequestId: No PreviousRequestId, message: 'No authentication needed for /gatewaycheck'
info: Ocelot.Authorization.Middleware.AuthorizationMiddleware[0]
requestId: 0HN0526GC2DD0:00000003, previousRequestId: No PreviousRequestId, message: '/weatherforecast route does not require user to be authorized'
warn: Ocelot.Requester.Middleware.HttpRequesterMiddleware[0]
requestId: 0HN0526GC2DD0:00000003, previousRequestId: No PreviousRequestId, message: '500 (Internal Server Error) status code, request uri: https://localhost:7094/weatherforecast'
info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
Request finished HTTP/2 GET https://localhost:7095/gatewaycheck - - - 500 48 text/plain;+charset=utf-8 247.8273ms
info: Microsoft.AspNetCore.Hosting.Diagnostics[1]
Request starting HTTP/2 GET https://localhost:7095/favicon.ico - -
warn: Ocelot.DownstreamRouteFinder.Middleware.DownstreamRouteFinderMiddleware[0]
requestId: 0HN0526GC2DD0:00000005, previousRequestId: No PreviousRequestId, message: 'DownstreamRouteFinderMiddleware setting pipeline errors. IDownstreamRouteFinder returned Error Code: UnableToFindDownstreamRouteError Message: Failed to match Route configuration for upstream path: /favicon.ico, verb: GET.'
warn: Ocelot.Responder.Middleware.ResponderMiddleware[0]
requestId: 0HN0526GC2DD0:00000005, previousRequestId: No PreviousRequestId, message: 'Error Code: UnableToFindDownstreamRouteError Message: Failed to match Route configuration for upstream path: /favicon.ico, verb: GET. errors found in ResponderMiddleware. Setting error response for request path:/favicon.ico, request method: GET'
info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
Request finished HTTP/2 GET https://localhost:7095/favicon.ico - - - 404 0 - 0.6857ms

`

OcRequestId's value not match to the requestID I get from logging result

`
{
"Routes": [
{

  "DownstreamPathTemplate": "/weatherforecast",
  "DownstreamScheme": "https",
  "DownstreamHostAndPorts": [
    {
      "Host": "localhost",
      "Port": 7094
    }
  ],

  "UpstreamHttpMethod": [ "Get" ],
  "UpstreamPathTemplate": "/gatewaycheck"
 

}

],
"GlobalConfiguration": {
"RequestIdKey": "OcRequestId"
}
}` OcRequestId : 0HN0BJT8LTCCO
RequestId from logging : 0HN0BJT6935JU:00000001 Why? I try to send to downstream service then I get this behaivour

Swagger For Ocelot

Hi,
I want to use swagger for ocelot and as you know it needs to some configs and read these configs from ocelot.json file how can I use your package with this package?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.