随笔分类 -  C#

C#
摘要:Debug的时候碰到这个很烦人得重新运行 工具=>选项=>常规=>调试=>常规 将启用“编辑”并继续,勾取消掉 阅读全文
posted @ 2021-04-01 11:46 VipSoft 阅读(2182) 评论(0) 推荐(0) 编辑
摘要:断点续传(上传)Java版 1. 客户每次上传前先获取一下当前文件已经被服务器接受了多少 2. 上传时设定偏移量 服务端代码如下: /// <summary> /// 断点续传,获取已上传文件大小 /// </summary> /// <returns></returns> [HttpPost] p 阅读全文
posted @ 2021-02-20 09:36 VipSoft 阅读(346) 评论(0) 推荐(0) 编辑
摘要:注意: CompressionLevel 选择 阅读全文
posted @ 2021-01-25 20:11 VipSoft 阅读(177) 评论(0) 推荐(0) 编辑
摘要:解决 C# Winform 自定义窗口,最大化遮住任务栏 的问题,可以通过获取屏幕大小来控制最大值,来实现,代码如下 Rectangle ScreenArea = System.Windows.Forms.Screen.GetWorkingArea(this); this.MaximumSize = 阅读全文
posted @ 2020-12-08 11:07 VipSoft 阅读(824) 评论(1) 推荐(0) 编辑
摘要:Winform 嵌入html,数据交互,将JS中的数据等传给winform 点击浏览器中的按钮,触发 Winform 中的方法 https://github.com/cefsharp/CefSharp C# Code namespace SharpBrowser { public partial c 阅读全文
posted @ 2020-10-22 10:17 VipSoft 阅读(3475) 评论(2) 推荐(0) 编辑
摘要:通过 itextpdf 的 HtmlConverter.convertToPdf(); 方法生成的pdf 有点让人失望,CSS啥的不起作用了,(有可能我用得不对) 后来用 wkhtmltopdf.exe 做了 网页生成PDF 效果还可以,下面是JAVA代码,C#的差不多 public static 阅读全文
posted @ 2020-10-21 08:48 VipSoft 阅读(720) 评论(0) 推荐(0) 编辑
摘要:.Net Core 3.0 续:Error unprotecting the session cookie.The payload was invalid. 出现了新的BUG warn: Microsoft.AspNetCore.Session.SessionMiddleware[7] Error 阅读全文
posted @ 2020-06-05 15:14 VipSoft 阅读(3815) 评论(4) 推荐(0) 编辑
摘要:.Net Core 3.0 warn: Microsoft.AspNetCore.Session.SessionMiddleware[7] Error unprotecting the session cookie. System.Security.Cryptography.Cryptographi 阅读全文
posted @ 2020-06-04 19:25 VipSoft 阅读(5107) 评论(0) 推荐(1) 编辑
摘要:app.UseIpRateLimiting(); #需要放在前面,否则抓去不准,还有可能会出现下列错误 本次出现这个错误,是因为 .Net Core 跨域 里面的这行:httpContext.Response.StatusCode = 204; 由于StatusCode 先给它设了 204,所以导致 阅读全文
posted @ 2020-06-04 14:07 VipSoft 阅读(3202) 评论(2) 推荐(0) 编辑
摘要:1.Demo,实际项目中不这么使用 class Program { static void Main(string[] args) { //缓存的配置 MemoryCacheOptions cacheOps = new MemoryCacheOptions() { //缓存最大为100份 //##注 阅读全文
posted @ 2020-05-16 14:37 VipSoft 阅读(1527) 评论(0) 推荐(0) 编辑
摘要:Startup.cs public class Startup { public static readonly ILoggerFactory efLogger = LoggerFactory.Create(builder => { builder.AddFilter((category, leve 阅读全文
posted @ 2020-05-15 20:54 VipSoft 阅读(2807) 评论(0) 推荐(0) 编辑
摘要:using NLog; private static Logger logger = LogManager.GetCurrentClassLogger(); //初始化日志类 NLog.config <?xml version="1.0" encoding="utf-8" ?> <nlog xmln 阅读全文
posted @ 2020-05-15 11:01 VipSoft 阅读(866) 评论(0) 推荐(0) 编辑
摘要:1.Nuget包添加引用: X.PagedList.Mvc.Core 2.View: @using VipSoft.Web.Model @model X.PagedList.IPagedList<VipSoft.Web.Model.DBEntity.Job> @using X.PagedList.M 阅读全文
posted @ 2020-05-14 19:56 VipSoft 阅读(1438) 评论(0) 推荐(0) 编辑
摘要:StartUp.cs public void Configure(IApplicationBuilder app, IWebHostEnvironment env) { app.UseEndpoints(endpoints => { endpoints.MapControllerRoute( nam 阅读全文
posted @ 2020-05-14 13:57 VipSoft 阅读(267) 评论(0) 推荐(0) 编辑
摘要:Startup.cs public void Configure(IApplicationBuilder app, IHostingEnvironment env) { app.UseCorsMiddleware(); //其它代码...... } CorsMiddleware.cs using S 阅读全文
posted @ 2020-05-12 20:56 VipSoft 阅读(460) 评论(1) 推荐(0) 编辑
摘要:仅我的代码“警告 你正在调试 XXX.dll 的发布版本。如果在启用”仅我的代码”的同时使用通过编译器优化的发布版本,调试体验会降级(例如,将不会命中断点) 停止调试 禁用仅我的代码并继续 继续调试 继续调试(不再询问) 阅读全文
posted @ 2020-04-27 14:16 VipSoft 阅读(5397) 评论(0) 推荐(0) 编辑
摘要:效果如下: 代码如下: 阅读全文
posted @ 2019-09-25 08:23 VipSoft 阅读(641) 评论(0) 推荐(0) 编辑
摘要:JAVA C# Text="{Binding realQuantity, Mode=OneWay,StringFormat={}{0:###0.####}}" 阅读全文
posted @ 2019-07-08 16:46 VipSoft 阅读(2962) 评论(2) 推荐(0) 编辑
摘要:做接口开发的时候,往往接受参数或返回值是一个XML的字符串。如下图,不方便辨识 两种方法, 1.将它保存为xxx.xml,然后用浏览器打开。这种方法稍微有些麻烦。 2.使用 UltraEdit 工具 阅读全文
posted @ 2018-09-05 08:34 VipSoft 阅读(1997) 评论(0) 推荐(0) 编辑

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