随笔分类 -  net core

net core
.net 框架引用asp.net core某些包提示已弃用,此包是旧版本且不再受到维护,因此已被弃用。如何处理!
摘要:我们看到一些特定功能的包只更新到了2.2.2版本 比如最常用的Microsoft.AspNetCore.Http这个类库,提示已弃用,我以为是换其他包了 最后我们在微软官网文档里找到了答案: 随着 .NET Core 3.0 发布,许多 ASP.NET Core 程序集不再作为包发布到 NuGet。 阅读全文

posted @ 2023-08-14 11:01 永恒一生 阅读(4793) 评论(2) 推荐(7)

.net core webApi接受不到UploadFile的文件?
摘要:.net core webApi接受不到UploadFile的文件? uni.uploadFile 设置正常。 后台接受不到Form最后查询跨域问题。 app.UseCors("AllowAllOrigins"); 放在app.Map后面,或者放在app.Run()上面 阅读全文

posted @ 2023-02-01 10:42 永恒一生 阅读(197) 评论(0) 推荐(0)

git 语句操作命令
摘要:先 git status 查看有哪些需要更新 git add . 把更新文件添加到状态里 git commit -a -m 日期 添加到本地仓库 git push 提交数据到远程 阅读全文

posted @ 2022-11-30 14:04 永恒一生 阅读(45) 评论(0) 推荐(0)

.net 7 获取所有缓存键的问题?
摘要:这里是群友提供听说是issue提的问题,高手回答的。var coherentState = _cache.GetType().GetField("_coherentState", BindingFlags.NonPublic | BindingFlags.Instance); var coheren 阅读全文

posted @ 2022-11-30 09:02 永恒一生 阅读(211) 评论(0) 推荐(0)

IIS设置了歌词为text/plain格式,但是.net core项目还是访问不了,404,是应.net core里没有支持
摘要:IIS设置了歌词为text/plain格式,但是.net core项目还是访问不了,404,是应.net core里没有支持 在StartUp静态文件支持里添加上就可以了。 var provider = new FileExtensionContentTypeProvider(); provider 阅读全文

posted @ 2022-10-10 11:53 永恒一生 阅读(80) 评论(0) 推荐(0)

System.Net.Sockets.SocketException:“在其上下文中,该请求的地址无效。”
摘要:System.Net.Sockets.SocketException:“在其上下文中,该请求的地址无效。” 因为launchSettings.json里面配置的http地址失效。 阅读全文

posted @ 2022-07-11 11:46 永恒一生 阅读(4419) 评论(0) 推荐(0)

Error while validating the service descriptor 'ServiceType
摘要:An error occurred while accessing the Microsoft.Extensions.Hosting services. Continuing without the application service provider. Error: Some services 阅读全文

posted @ 2022-02-18 21:12 永恒一生 阅读(1866) 评论(0) 推荐(0)

IOptions取bind值,总是取不到
摘要:今天遇到一键烦心事,IOptions取值总是取不到,以为微软出了问题。 最后发现我定义了两个类,同名,绑定了A,调用了B 阅读全文

posted @ 2022-01-13 15:39 永恒一生 阅读(83) 评论(0) 推荐(0)

HTTP Error 500.0 - ASP.NET Core IIS hosting failure (in-process)
摘要:HTTP Error 500.0 - ASP.NET Core IIS hosting failure (in-process) 如果出现类似问题,应该是发布的时候,目标运行设置的不对,设置成了可移植了,把他设置成win-64,windows专用的就应该好了。 阅读全文

posted @ 2021-11-29 20:49 永恒一生 阅读(5936) 评论(0) 推荐(1)

.net core 5.0部署到IIS出现500.30错误,
摘要:.net core 5.0部署到IIS出现500.30错误,怎么都找不到原因,最后原来是iis启动了32位模式 把32位模式关闭了,就可以了 32位模式关闭 32位模式关闭 32位模式关闭 32位模式关闭 阅读全文

posted @ 2021-06-22 10:01 永恒一生 阅读(1677) 评论(0) 推荐(0)

Unable to create an object of type ''. For the different patterns supported at design t
摘要:Unable to create an object of type 'XXXXXXXXXX'. For the different patterns supported at design time, see https://go.microsoft.com/fwlink/?linkid=8517 阅读全文

posted @ 2020-06-08 11:12 永恒一生 阅读(2102) 评论(0) 推荐(0)

.net core若在使用中遇到所使用“XXX”版本标识高于引用版本
摘要:若在使用中遇到所使用“XXX”版本标识高于引用版本 这是你本身使用的版本和你引用的类库或者包里面的版本冲突。唯一解决办法,找找包含这个dll的类库,然后把他换成对应你项目的版本,就能解决 阅读全文

posted @ 2020-04-07 06:29 永恒一生 阅读(1585) 评论(0) 推荐(0)

.net core 的datediff 类
摘要:SqlServerDbFunctionsExtensions 阅读全文

posted @ 2020-03-28 16:56 永恒一生 阅读(751) 评论(0) 推荐(0)

.net core初始视图模板目录,
摘要:C:\Users\duoenet\.nuget\packages\microsoft.visualstudio.web.codegenerators.mvc\3.1.1\Templates C:\Users\duoenet\.nuget\packages\microsoft.visualstudio 阅读全文

posted @ 2020-03-06 11:40 永恒一生 阅读(260) 评论(0) 推荐(0)

.net core 学习路线图 - 转
摘要:.net core 学习路线图 - 转 阅读全文

posted @ 2020-01-22 11:02 永恒一生 阅读(370) 评论(0) 推荐(0)