随笔分类 - .Net Core
摘要:错误提示 HTTP Error 500.36 - ASP.NET Core IIS hosting failure (out-of-process) The out of process request handler, aspnetcorev2_outofprocess.dll, could no
阅读全文
摘要:错误提示: 解决方法 检查一下nuget引用包 是否更新了版本,如果升级或者降级了版本,需要将新的dll文件更新一下
阅读全文
摘要:1、代码版本 .Net Core 版本 2.2 2、目录结构 3、定义中间件 新建一个类 CustomerExceptionMiddleware.cs /// <summary> /// 全局异常捕获 /// </summary> public class CustomerExceptionMidd
阅读全文
摘要:1、代码版本 .Net Core 版本 2.2 2、自定义异常捕获类 新建一个类 CustomerExceptionFilter.cs 继承 Microsoft.AspNetCore.Mvc.Filters.IAsyncExceptionFilter 接口 /// <summary> /// 自定义
阅读全文
摘要:1、错误现象 1.1、写完一个测试API,Ctrl+F5运行,提示错误: Failed to load API definition.(如下图) 1.2、点击 http://localhost:5162/swagger/v1/swagger.json,根据错误提示,不明确的一个方法 2、解决方案 2
阅读全文
摘要:1、添加 NuGet 包 Microsoft.Extensions.Configuration 2、通过注入获取 Configuration 注意:注入获取的必须提前在 StartUp 里面提前注册 public class Startup { public IConfiguration Confi
阅读全文
摘要:写在前面 1、源码(.Net Core 2.2) git地址:https://github.com/yizhaoxian/CoreIdentityServer4Demo.git 2、相关章节 2.1、《IdentityServer4 (1) 客户端授权模式(Client Credentials)》
阅读全文
摘要:写在前面 1、源码(.Net Core 2.2) git地址:https://github.com/yizhaoxian/CoreIdentityServer4Demo.git 2、相关章节 2.1、《IdentityServer4 (1) 客户端授权模式(Client Credentials)》
阅读全文
摘要:写在前面 1、源码(.Net Core 2.2) git地址:https://github.com/yizhaoxian/CoreIdentityServer4Demo.git 2、相关章节 2.1、《IdentityServer4 (1) 客户端授权模式(Client Credentials)》
阅读全文
摘要:写在前面 1、源码(.Net Core 2.2) git地址:https://github.com/yizhaoxian/CoreIdentityServer4Demo.git 2、相关章节 2.1、《IdentityServer4 (1) 客户端授权模式(Client Credentials)》
阅读全文
摘要:写在前面 1、源码(.Net Core 2.2) git地址:https://github.com/yizhaoxian/CoreIdentityServer4Demo.git 2、相关章节 2.1、《IdentityServer4 (1) 客户端授权模式(Client Credentials)》
阅读全文
摘要:客户端请求提示 Keyset is missing 解决办法 添加以下代码 services.AddIdentityServer(options => { options.Events.RaiseErrorEvents = true; options.Events.RaiseInformationE
阅读全文
摘要:在.Net Core 2.2 版本中使用 Area, 发现配置第一个(Admin) MapAreaRoute 路由可以匹配多个 {Controller}/{Action} 路由设置 app.UseMvc(routes => { //routes.MapRoute( // name: "areas",
阅读全文
摘要:一、注册身份验证服务 StartUp.ConfigureServices() //策略授权 services.AddAuthorization(options => { options.AddPolicy("Admin", po => po.RequireRole("Admin")); option
阅读全文
摘要:asp .net core 使用 epplus 导出excel
阅读全文

浙公网安备 33010602011771号