随笔分类 -  dotnet core

摘要:框架:.Net 6 、webapi package:GitLabApiClient 定义body参数DTO,不同event有不同的参数,具体可参考gitlab文档:https://docs.gitlab.com/ee/user/project/integrations/webhook_events. 阅读全文
posted @ 2024-03-12 15:07 Cody& 阅读(33) 评论(0) 推荐(0) 编辑
摘要:项目以net8建立为例子(net6也通用),使用Autofac实现构造函数注入、属性注入两种。 Autofac (第三方) 1、引用以下package Autofac Autofac.Extensions.DependencyInjection Microsoft.Extensions.Depend 阅读全文
posted @ 2024-02-25 11:09 Cody& 阅读(1231) 评论(0) 推荐(0) 编辑
摘要:错误信息:(java编译文件版本与运行环境版本不一致导致) Using the .NET Core version of the Scanner for MSBuild Post-processing started. Calling the SonarScanner CLI... Error: L 阅读全文
posted @ 2024-01-18 16:22 Cody& 阅读(264) 评论(0) 推荐(0) 编辑
摘要:在for循环里,有8w数据,结果需要10+分钟才遍历完(生产环境下),结果发现导致耗时的代码如下 try { ritem.Qty = Convert.ToDecimal(value); } catch(Exception e) { Logger.Info(e.ToString()); ritem.Q 阅读全文
posted @ 2023-12-21 14:29 Cody& 阅读(129) 评论(0) 推荐(0) 编辑
摘要:在html的select元素添加了onchange事件,changeContent方法也在当前html下。 <select id="changeLanguage" class="form-control input-lg" asp-for="language" asp-items="Model.su 阅读全文
posted @ 2023-12-06 09:16 Cody& 阅读(109) 评论(0) 推荐(0) 编辑
摘要:引入包 <PackageReference Include="Emgu.CV" Version="4.8.1.5350" /> <PackageReference Include="Emgu.CV.runtime.ubuntu.20.04-x64" Version="4.5.5.4823" /> D 阅读全文
posted @ 2023-11-24 14:35 Cody& 阅读(373) 评论(0) 推荐(0) 编辑
摘要:在ubuntu(18.04)运行OpenCvSharp4(4.6.0)报错如下: Microsoft.AspNetCore.Server.Kestrel[13] Connection id "0HMJAMSQJ3RO8", Request id "0HMJAMSQJ3RO8:00000005": A 阅读全文
posted @ 2022-07-23 10:50 Cody& 阅读(2584) 评论(0) 推荐(0) 编辑
摘要:按照文档设置启用了压缩,https://docs.microsoft.com/zh-cn/aspnet/core/blazor/host-and-deploy/webassembly?view=aspnetcore-6.0 ,但还是加载.dll文件(如下图),加载资源大小跟未压缩一样 解决方法: 需 阅读全文
posted @ 2021-12-26 10:43 Cody& 阅读(346) 评论(0) 推荐(1) 编辑
摘要:调试看出在执行dotnet.6.0.0.fof53xxcmn.js时出现ReferenceError: Cant find variable: globalThis错误 加入下面代码即可 <script> !function(t){function e(){var e=this||self;e.gl 阅读全文
posted @ 2021-12-23 17:06 Cody& 阅读(574) 评论(0) 推荐(0) 编辑
摘要:解法: 1、在代码中放入字体(拿取window下的相关字体),或放在一个公共的地方 2、在dockerfile加入,将字体复制到容器/usr/share/fonts/下面即可 FROM *****aspnet:5.0 ENV ASPNETCORE_ENVIRONMENT=Development EN 阅读全文
posted @ 2021-12-08 10:58 Cody& 阅读(338) 评论(0) 推荐(0) 编辑
摘要:报错信息如下: System.IO.IOException: Supplied file with size 2137625 bytes exceeds the maximum of 512000 bytes. at Microsoft.AspNetCore.Components.Forms.Bro 阅读全文
posted @ 2021-06-18 13:46 Cody& 阅读(507) 评论(0) 推荐(0) 编辑
摘要:net 5 使用DinkToPdf生成PDF发生以下错误信息。 在本地 window 上运行是没问题的,在linux docker 上部署就出现问题。 在docker上的报错信息: AggregateException: One or more errors occurred. (Unable to 阅读全文
posted @ 2021-05-30 13:35 Cody& 阅读(2638) 评论(0) 推荐(0) 编辑
摘要:c# 在使用HttpClient 请求api时,出现以下错误: System.AggregateException: One or more errors occurred. (A task was canceled.) > System.Threading.Tasks.TaskCanceledEx 阅读全文
posted @ 2021-04-01 13:31 Cody& 阅读(6262) 评论(0) 推荐(0) 编辑
摘要:报错详细信息如下: System.InvalidOperationException: Property 'JsonResult.SerializerSettings' must be an instance of type 'System.Text.Json.JsonSerializerOptio 阅读全文
posted @ 2021-02-03 10:38 Cody& 阅读(1255) 评论(0) 推荐(0) 编辑
摘要:1、 “HttpContent”未包含“ReadAsAsync”的定义,并且找不到可接受第一个“HttpContent”类型参数的可访问扩展方法“ReadAsAsync”(是否缺少 using 指令或程序集引用?) 方法:引用Microsoft.AspNet.WebApi.Client 2、 “IC 阅读全文
posted @ 2021-01-28 15:51 Cody& 阅读(472) 评论(0) 推荐(0) 编辑
摘要:1、将.csproj文件 <TargetFramework>net5.0</TargetFramework> 2、连接oracle,open时报错:The type initializer for 'OracleInternal.ServiceObjects.OracleConnectionImpl 阅读全文
posted @ 2021-01-20 14:10 Cody& 阅读(399) 评论(0) 推荐(0) 编辑
该文被密码保护。
posted @ 2020-12-22 17:04 Cody& 阅读(0) 评论(0) 推荐(0) 编辑
摘要:dotnet core 3.1的程式在IIS运行的好好的,把它弄到jenkins部署,程式连接的数据库有Oracle、postgresql、sqlserver。 下面问题出现报错原因是SQL Server版本(2008 R2 (RTM))太低原因。 首先测试报了以下错误: A connection 阅读全文
posted @ 2020-11-30 09:59 Cody& 阅读(560) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示