.NET InvalidOperationException: Cannot consume scoped service from singleton
在.NET windows服务里注入DBContext时会报错:.NET InvalidOperationException: Cannot consume scoped service from singleton。
2024-05-20 1386 0
Git报错 fatal : fetch-pack: invalid index-pack output
"Git fatal: fetch-pack: invalid index-pack output" 错误通常表示 Git 在尝试从远程仓库拉取数据时在解压索引文件时遇到问题。这可能由多种原因引起,通常与网络问题、存储损坏或 Git 仓库本身的问题有关。以下是一些可能导致此错误的原因以及相应的解决方法。
2024-02-06 3172 0
System.UriFormatException: Invalid URI: The Uri string is too long.
System.UriFormatException: Invalid URI: The Uri string is too long.这个错误通常出现是因为 URI(统一资源标识符)字符串的长度超出了系统或库的限制。这可能会在试图创建或处理非常长的 URI 字符串时发生,比如在构建网址或处理大量查询参数时。
2023-12-01 1468 0
.NET Core HttpClient报错The character set provided in ContentType is invalid. Cannot read content as string using an invalid character set.
使用HttpClinet下载网页时得到了HttpResponseMessage并且状态是200,但是调用ReadAsStringAsync方法时报错:The character set provided in ContentType is invalid. Cannot read content as string using an invalid character set.
2023-03-13 2699 0
System.InvalidOperationException:“Unable to configure HTTPS endpoint.异常处理
.NET Core网站按F5运行时,在Program.cs里运行到app.Run()的时候报错:System.InvalidOperationException:“Unable to configure HTTPS endpoint. No server certificate was specified, and the default developer certificate could not be found or is out of date.
2023-01-13 3183 0