随笔分类 - ASP.NET Core
摘要:Filter在ASP.NET Core中允许code在指定的请求阶段前或者后执行。 Filter在ASP.NET Core方法请求管道中运行,有时被称作filter pipeline,filter pipeline在ASP.NET Core选择Action执行。 Filter 分类 每个filter
阅读全文
摘要:什么是Azure服务总线? Azure服务总线是完全托管的企业消息代理,包括消息队列和发布订阅(命名空间). Service Bus通常被用来解耦应用程序和服务,控制跨服务和应用程序间安全路由和传输数据。 本篇从实战出发介绍如何通过Service Bus发送接收及消费消息。 项目介绍:创建了5个工程
阅读全文
摘要:Ocelot supports some very rudimentary caching at the moment provider by the CacheManager project. This s an amazing project that is solving a lot of c
阅读全文
摘要:Ocelot supports claims based authorization which is run post authentication. This means if ou have a route you want to authorize you can add the follo
阅读全文
摘要:Qos quality of service Ocelot supports one Qos capability at the current time.You can set on a per Route basis if you want to use a circuit breaker wh
阅读全文
摘要:Ocelot can load balance across available downstream services for each Route. This means you can scale your downstream services and Ocelot can use them
阅读全文
摘要:In order to authenticate Routes and subsequently use any of Ocelot's claims based features such as authorization or modifying the request with values
阅读全文
摘要:Ocelot supports rate limiting of upstream requests so that your downstream services do not become overloaded. OK so to get rate limiting working for a
阅读全文
摘要:Service discovery helps you discovery,track and monitor the health of services within a network. Service discovery registers and maintains a record of
阅读全文
摘要:上一篇主要详细介绍log4net相关的一些配置项,本章意在从实战角度详解log4net在NetCore中使用。 1、创建Netcore consol application 通过Nuget package安装log4net(Microsoft.Extensions.Logging.Log4Net.A
阅读全文
摘要:本文旨在介绍log4net相关节点的配置项,下一章会会详细讲解log4net在Asp.Net core中使用。 log4net 是Apache下的一个开源项目,可以控制日志信息的输出介质并定义了多种日志信息输出模式,可以根据需要将信息输出到控制台、文本文件、windows日志数据库、邮件等。 log
阅读全文
摘要:In ASP.NET Core, background tasks can be implemented as hosted services, A hosted service is a class with background task logic that implements the IH
阅读全文
摘要:当你的应用程序需要在多语言环境下运行时,资源文件(Resource)是必不可少的,ASP.NET Core 提供了一种基于资源文件(*.resx)的多语言实现方式,详细配置如下: 1、首先在application中添加测试资源文件 2、在Startup ConfigureServices中注册本地化
阅读全文
摘要:在netcore中jwt使用场景很多,网上有很多的资料,这里不再累述,之后有机会会单独介绍,今天主要以实战为主。 1、create jwt token 1 public interface IJwtTokenService 2 { 3 string GetJwtToken(); 4 } 5 6 pu
阅读全文
摘要:Https介绍: https是一种应用层协议,本质上说它是HTTP协议的一种变种。HTTPS比HTTP协议安全,因为HTTP是明文传输,而HTTPS是加密传输,加密过程中使用了三种加密算法,分别是证书,对称加密和非对称加密。HTTPS比HTTP多了一层SSL/TLS. SSL Secure Sock
阅读全文
摘要:Ocelot是一个用.NET Core实现并且开源的API网关,功能包括:路由,请求聚合,服务验证,鉴权,限流熔断,并内置了负载均衡器与Service Fabric,Buttefly Tracing集成。这些功能都只需要简单配置就可以完成。 简单的ocelot是一堆asp.net core midd
阅读全文
摘要:Ocelot允许声明聚合路由,把多个Routes请求batch一个对象来对客户端的请求进行响应。 1、ocelot configuration { "DownstreamPathTemplate": "/api/service1", "DownstreamScheme": "https", "Dow
阅读全文
摘要:如何使用Dispatchproxy封装REST API,让API调用更简单。 1、创建HttpClientDispathProxy类继承自DispatchProxy public class HttpClientDispathProxy<TInterface> : DispatchProxy { p
阅读全文
摘要:Quartz Net 是一个强大,开源,轻量的作业调度框架,可以创建简单或复杂的作业调度来执行一个Task。 Quartz主要由3部分组成: Scheduler:调度器,根据Trigger中设置调用周期执行Job。 Trigger:触发器,设置Job执行周期。 Job:具体需要执行的业务。 本篇介绍
阅读全文