![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
.NetCore
jxl15680701016
这个作者很懒,什么都没留下…
展开
-
Unable to resolve service for type 'Microsoft.AspNetCore.Cors.Infrastructure.ICorsService'
当跨域串为空时报错提示如下:InvalidOperationException: Unable to resolve service for type 'Microsoft.AspNetCore.Cors.Infrastructure.ICorsService' while attempting to activate 'Microsoft.AspNetCore.Cors.Infrastruc...原创 2020-04-01 15:35:47 · 4427 阅读 · 1 评论 -
NetCore CodeFirst 生成sqlserver 数据库踩得坑
刚接触CORE,学习了一些基础知识,然后跟着教程学习,一路采坑...谨以此文备忘环境VS2017 +SQLSERVER1.首先新建一个.net core项目,文件=>新建=>项目=>ASP.NET CORE WEB 应用程序;2.选择web 应用程序,然后确认,项目新建好了3.通过NuGet 添加相关引用的包并且在project.json 中添加配置引用 EntityFramew...原创 2018-06-21 00:46:57 · 1943 阅读 · 0 评论 -
跨域请求asp.net core webapi 接口,返回自定义header
这个简单的问题对于初学core的我来说还是折腾了好久,然后加了一个群问了一下,终于解决了,感谢大神的指点;官方api:总结:阅读官方的api文档很重要啊,惭愧啊;然后以此备忘吧。我在header里面返回自定义参数count,startup.cs配置如下: app.UseCors(builder => { ...原创 2018-08-20 15:05:50 · 9026 阅读 · 2 评论 -
asp.net core 部署到linux docker 一直不成功,The specified framework 'Microsoft.AspNetCore.App', version '2.2.
asp.net core 部署到linux docker 一直不成功,待解决,有大神遇到过的吗?报错如下图:以前的Dockerfile :解决方法: 修改 Dockerfile ,如下修改Dockerfile之后,执行下面的命令终于跑起来了docker build -t dockerdemo2 ./docker run -it -p 8080:808...原创 2019-06-13 10:33:35 · 5909 阅读 · 0 评论 -
EF Core 查询再保存报错
使用EF CORE查询再保存时报错:System.InvalidOperationException:“The instance of entity type 'VManager' cannot be tracked because another instance with the same key value for {'Id'} is already being tracked. Whe...原创 2019-07-12 14:18:28 · 2089 阅读 · 1 评论