
.nercore
弱水三千 只取一瓢饮
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
如何生成token,是使用token
如何生成token和获取token中的值原创 2022-08-23 17:08:09 · 1140 阅读 · 0 评论 -
.net core 获取配置文件中的值
配置文件如:appsettings.json{ "Logging": { "LogLevel": { "Default": "Information", "Microsoft": "Warning", "Microsoft.Hosting.Lifetime": "Information" } }, "ConnectionStrings": { "ProductQualityContext_SERVER_CONN": "Server=原创 2021-07-23 17:17:58 · 573 阅读 · 0 评论 -
swagger 避免被检查出来文档泄露漏洞
配置好swagger以后在加一个中间件,避免被检查出来文档泄露漏洞public class SwaggerBasicAuthMiddleware { private readonly RequestDelegate next; public SwaggerBasicAuthMiddleware(RequestDelegate next) { this.next = next; } publ原创 2021-03-15 16:49:23 · 4093 阅读 · 0 评论 -
.netcore3.1 mvc 根据路径下载
根据路径下载 public IActionResult DownloadFile() { //string filePath = AppDomain.CurrentDomain.BaseDirectory.Replace("\\", "/") + model.Path;//"Excel/123.zip";//以字符流的形式下载文件 string filePath = Directory.GetCurrentDirectory().Repla原创 2020-10-10 09:15:08 · 735 阅读 · 0 评论 -
The instance of entity type ‘AwordDeclare’ cannot be tracked because another instance with the same
InvalidOperationException: The instance of entity type ‘AwordDeclare’ cannot be tracked because another instance with the same key value for {‘Id’} is already being tracked. When attaching existing entities, ensure that only one entity instance with a give原创 2020-08-11 10:10:49 · 1268 阅读 · 0 评论