学海无涯

导航

2022年9月25日 #

常用工具

摘要: https://jwt.ms/ 解码令牌 通用数据库工具 https://dbeaver.io/ crontab执行时间计算 https://cron.ciding.cc/ 草料二维码生成工具 https://cli.im/ 深信服 VPN 阅读全文

posted @ 2022-09-25 14:09 宁静致远. 阅读(21) 评论(0) 推荐(0)

当API服务端options.Authority ="http://localhost:5001" 报错误

摘要: //验证传入的令牌以确保它来自受信任的颁发者 //验证令牌是否可以与此 api 一起使用(又名受众) //将身份验证服务添加到 DI(依赖注入)并将身份验证中间件添加到管道 builder.Services.AddAuthentication("Bearer") .AddJwtBearer("Bea 阅读全文

posted @ 2022-09-25 11:29 宁静致远. 阅读(109) 评论(0) 推荐(0)

IdentityServer4 快速入门

摘要: IdentityServer4 阅读全文

posted @ 2022-09-25 10:06 宁静致远. 阅读(21) 评论(0) 推荐(0)

2022年9月24日 #

安装项目模板IdentityServer4.Templates

摘要: 打开PowseShell执行以下命令 dotnet new -i IdentityServer4.Templates 阅读全文

posted @ 2022-09-24 18:36 宁静致远. 阅读(72) 评论(0) 推荐(0)

客户端URL路径组织模式

摘要: namespace WebMVC.Infrastructure; public static class API { public static class Purchase { public static string AddItemToBasket(string baseUri) => $"{b 阅读全文

posted @ 2022-09-24 11:36 宁静致远. 阅读(39) 评论(0) 推荐(0)

Service模块读取AppSettings.json

摘要: 创建对应的映射类: public class AppSettings { //public Connectionstrings ConnectionStrings { get; set; } public string PurchaseUrl { get; set; } public string 阅读全文

posted @ 2022-09-24 11:33 宁静致远. 阅读(34) 评论(0) 推荐(0)

使用ConnectionMultiplexer访问Redis

摘要: appsettins.json 中的 Redis 连接字符串 "ConnectionStrings": { "DefaultConnection": "Server=DESKTOP-DABHN6U\\MSSQLSERVER2014;uid=sa;pwd=Lz38275292;database=New 阅读全文

posted @ 2022-09-24 10:26 宁静致远. 阅读(660) 评论(0) 推荐(0)

2022年9月23日 #

为Docker开通防火墙端口

摘要: 在文件 add-firewall-rules-for-sts-auth-thru-docker 上点右键,使用PowerShell运行.(文件 在163邮箱的:Docker工具) 阅读全文

posted @ 2022-09-23 17:32 宁静致远. 阅读(123) 评论(0) 推荐(0)

windows 10更改WSL Docker镜像目录

摘要: 现在Docker Desktop默认使用WSL 2来运行,而不是以前的Hyper-V。 WSL WSL:适用于 Linux 的 Windows 子系统。 Windows版本(Windows 10)WSL 2 版本 docker 默认程序安装到c盘,数据存放于 C:\Users\当前用户名\AppDa 阅读全文

posted @ 2022-09-23 15:16 宁静致远. 阅读(1462) 评论(0) 推荐(1)

Linux 命令

摘要: 查看 Docker 当前使用的 Linux 版本,在 PowerShell 终端执行以下命令: wsl --list --running 重启 WSL 2 分发Linux,注意重启后,Docker 也要跟着重启 wsl --shutdown 阅读全文

posted @ 2022-09-23 11:54 宁静致远. 阅读(30) 评论(0) 推荐(0)