EKsumic's Blog

let today = new Beginning();

Click the left button to use the catalog.

.NET Core

41 Blogs

80k+ Reads 80836 Reads

0 likes

OR [长期更新]博客版本日志

软件名称:BlogPlatform 更新版本:Version: 1.0.1.191226_beta 更新日期:2019年12月26日 更新日志:修复了strong标签无法加粗的问题。修改了 ...

2019-12-26 04:58:32

1k+ 1907 reads

0 comments

OR 「History」About this website

This article records the whole history of the website from the idea to the realization, and specifically records the major changes of the website, which are of milestone significance for the operation of the website ...

2020-01-28 00:38:52

8k+ 8309 reads

333 comments

OR [Solutions to nginx server] Upload file reports 413 Request Entity Too Large error

You can choose to set in http{ }: client_max_body_size 20m; You can also choose to set in server{ }: client_max_body_size 20m; You can also choose to set in location{ }: client_max_body_size 20m; There is a difference between the three: Set to http{} to control the size of all ...

2021-01-03 10:44:51

881 reads

0 comments

OR How to generate the Setup file for installing Windows Form App in Visual Studio 2019?

1. Under the same solution, create a new project and select Setup Project 2. Right-click Application Folder → Add → File (Own program bin → Debug → all files) 3. Right-click Application Folder → Add → File, add uninstall program C:\Windows\System32\msiexec.exe ...

2020-11-04 23:36:07

943 reads

0 comments

OR An unhandled exception occurred while processing the request. InvalidOperationException: Invalid non-ASCII or control character in header: 0x60A8

An unhandled exception occurred while processing the request. InvalidOperationException: Invalid non-ASCII or control character in header: 0x60A8 Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpHeaders.ThrowInvalidHeaderCharacter(char ch) InvalidOperationE ...

2020-11-01 06:40:35

2k+ 2246 reads

0 comments

OR [ .NET Core 3.1 MVC ] What is @section scripts{}? And how to use it?

What is @section scripts{}? And how to use it? Your section scripts may like this: It's placed in a view page. If you run it directly, it will report an error. Yes, if you write like this, you must add a @RenderSection("scripts", required: false) to the layout page. This part of your javascript ...

2020-10-29 21:22:44

1k+ 1416 reads

0 comments

OR [SOLVED]How to use X.PagedList.Mvc.Core IN .NET Core 3.1?

Let me first try to explain the background C# code: This is a typical rewritten method. Its initial version should look like this: Why does the rewritten code become so complicated? Because it not only has a paging function, it also comes with a search function. Every time ...

2020-10-29 00:38:05

2k+ 2940 reads

0 comments

OR How to access the. Net core 3.1 MVC web program running in LAN

At the same time, please pay attention to turn off the firewall in the LAN. Of course, you can also add some LAN port rules, but this is not what I will teach in this tutorial. The reason why I want to write this tutorial is that I want to actually visit the project I just finished with ...

2020-10-25 18:03:03

1k+ 1226 reads

0 comments

OR [SOLVED]How to use cookies in .NET Core 3.1 MVC?

How to use cookies in .NET Core 3.1 MVC? You only need to write these 3 methods in the controller. (Note that it must be written in the controller.)I dare not say that this is the best way, but I want to say that it is effective. ...

2020-10-24 22:42:41

1k+ 1115 reads

0 comments

OR [SOLVED] The EF Core tools version '3.1.5' is older than that of the runtime '3.1.9'. Update the tools for the latest features and bug fixes.

The EF Core tools version '3.1.5' is older than that of the runtime '3.1.9'. Update the tools for the latest features and bug fixes. Solution: the EF core tools version needs to be updated please executed this in CMD: dotnet tool update -g dotnet-ef ...

2020-10-21 02:57:28

1k+ 1900 reads

0 comments

OR 如何使用.net core 3.1身份认证发送电子邮件

本篇博客大致上就原英文版本的说明文档,再提供一个再解释文档。 (将简化一些步骤,让你快速学会调用这个功能)然后就是基架问题了。 右击该项目→添加→新搭建基架的项目→标识→添加。 选择Account\RegisterConfirmation,数据上下文选择好,点击添加。 然后最好是更新一下数据库 ...

2020-10-17 17:10:51

1k+ 1107 reads

0 comments

OR 默认ASP.NET Core 3.x项目和Identity选项出现nvarchar和nvarchar(max)错误

场景描述: 尝试在.net core 3.1 mvc项目下使用mysql数据库,在add-migrations的时候,报错了。简述: 出现这个问题,是因为asp.net core默认是认为你用的sql server,它正尝试使用SQL Server的语法。解决方案:直接删除Migrations整个文件夹,然后 ...

2020-10-16 14:35:39

1k+ 1401 reads

0 comments

OR .NET Core连接MySQL标准连接方式

MySQL Connector/Net (.NET)标准连接方式 1、标准连接(说明,默认端口是3306。) 2、特殊的TCP/IP端口连接 本地连接应当写 至于localhost和127.0.0.1,如果可以用的话,建议写localhost,因为localhost不经过网络层、防火墙之类的,理论上性能是更高的。不过我在测试的时候 ...

2020-10-04 02:26:15

1k+ 1054 reads

0 comments

OR .NET Core如何使用MySQL?需要打什么驱动?

​ 1. 安装EF Core连接MySQL的驱动,这里有两类:  (1).Oracle官方出品:MySql.Data.EntityFrameworkCore (版本:8.0.17)  (2).其他第三方出品:Pomelo.EntityFrameworkCore.MySql (版本:2.2.0) 8.0.11版本的官方包,大概会抛出这个错误: The 'MySQLNumberTypeMapping ...

2020-10-04 02:24:46

1k+ 1419 reads

0 comments

OR [新手入门]C#关于Groupby到底如何使用?

可见group本视是一个集合,当里面的元素只有1个的时候,你还是得以foreach的方式取得name,具体实例见: 关于PCRArenaRecorder&Analyzer的概率分析相关逻辑代码 这里面已经FirstOrDefault()出来了,但还是得foreach,不然你只能得到key,得不到key所对用的内容 ...

2020-09-11 23:19:21

1k+ 1400 reads

0 comments

OR EntityFrameworkCore 中使用多个DBContext时的注意事项

如果你是想同时生成两套数据库,那是不可能的,你需要一个一个生成。 但是这并不是说你要分别建立数据库上下文,你可以同时建立多个数据库上下文,在Add-Migration的时候选择使用哪个数据库。 比如微软会提醒你: More than one DbContext was found. Specify which one to use. ...

2020-08-22 15:57:53

1k+ 1369 reads

0 comments

OR 在.NET Framework 上能使用 EntityFrameworkCore吗?

先说结论:可以。 前提.NET Framework 4.6.1+。 操作步骤: 首先下载安装包 然后是自定义的驱动包:(这里举了2个例子)新建个User类; 接着是数据库上下文 ​ 开始使用! EntityFrameworkCore  CodeFirst 的常用指令: dotnet ef migrations add CreateModel 然后喜闻乐见的看到了 ​ ...

2020-08-20 01:08:18

1k+ 1328 reads

0 comments

OR 如何让硬编码变成可编辑脚本?反射?

我们在写JavaScript程序的时候,有一个函数很有趣,eval(),这个方法非常有趣,他可以编译他内部的字符串,并将字符串按照JS代码执行,例如eval(‘alert(“message”)’),执行的结果就是弹窗打印出message这个信息。最近我在用C#写一个功能的时候的时候也遇到相似的需求 ...

2020-08-05 16:14:46

1k+ 1044 reads

0 comments

OR vs2019如何打包Winform项目?

在同一个解决方案下面,新建项目,选择Setup Project, 如果你没有Setup Project的话,需要去下载 Microsoft Visual Studio Installer Projects: https://marketplace.visualstudio.com/items?itemName=VisualStudioClient.MicrosoftVisualStudio2017InstallerProjects ...

2020-07-29 21:27:07

1k+ 1964 reads

0 comments

OR 使用Simple Mvc Sitemap产生的Sitemap的lastmod里面的日期格式错误

使用SimpleMvcSitemap产生的Sitemap的lastmod里面的日期格式错误,Google无法读取这样的Sitemap Google Console 提交Sitemap出错,日期无效: 报错: 发现无效日期。请修正日期或格式,然后重新提交。 详细信息: 父标记:url 标记:lastmod ...

2020-07-01 22:20:06

13k+ 13095 reads

963 comments

OR X.PagedList.Mvc.Core的基本用法

前台index.cshtml添加:后台Index方法(注意不要写[HttpPost]):applicationDbContext是你取到的数据,你只需要改变x.Name的内容就可以实现根据x.xxxx的字段进行搜索,例如:x.Id、x.Content…… 其它的代码除了数字10以外并不需要改动,默认是 ...

2020-07-01 21:14:35

1k+ 1270 reads

0 comments

OR 评论区被放垃圾评论怎么办?

如图所示,一般情况下,每个博客的评论区都会有验证码,这是必须做的工作。 但是你会发现,即使有验证码,hacker还是能把垃圾评论放到你的网站上,这也是为什么谷歌验证要用图片识别。 添加验证码其实不是很好的解决方案,因为 ...

2020-06-25 19:22:42

1k+ 1349 reads

0 comments

OR .NET Core 2.1 LTS版本到期会怎么样?

先说结论: 简单来讲,就是以后出BUG和安全问题,Microsoft不会再修复了。终止支持是指Microsoft不再提供修补程序,更新或在线技术帮助的日期。在此日期临近时,请确保已安装最新的可用更新*。如果没有Microsoft支持,您将不再获得可以帮助保护您的计算机免受有害病毒,间谍软件和其他可能窃取您的个人信息的恶意软件的安全更新 ...

2020-06-25 05:16:58

1k+ 1695 reads

0 comments

OR SqlException:关键字'SELECT'附近有语法错误。“)”附近有语法错误。“OFFSET”附近有语法错误。在FETCH语句中选项NEXT的用法无效

浏览器报错页面: SqlException: 关键字 'SELECT' 附近有语法错误。 “)”附近有语法错误。 “OFFSET”附近有语法错误。 在 FETCH 语句中选项 NEXT 的用法无效。 错误位置:这是一个来自.NET Core 2.1 迁移到3.1之后发生的错误,开始我是以为是数据库问题,升级了数据库之后,依旧报错。于是我选择了卸载所有数据库并重新安装SQL Server 2017 Express版本 ...

2020-06-22 16:39:04

1k+ 1699 reads

0 comments

OR .NET Core 2.1 迁移至 3.1 踩坑记录

首先,第一个大坑也是迁移到3.1到最后已经No Error才发现的: 你再也不能使用SQL Server 2008 R2了! 你再也不能使用SQL Server 2008 R2了! 你再也不能使用SQL Server 2008 R2了!这个2012 R2+可不是写着玩的,是真的必须升级数据库! 好,接着讲其它的坑:当你把Visual Studio 2019升级到16.6.2的时候,你的nuget包管理器就装不上任何包了,会一直报错,Exception from HRESULT: 0x80020009 ...

2020-06-21 14:39:57

2k+ 2038 reads

3 comments

OR .NET Core 评论区建立逻辑

材料:邮箱+验证码 一般博客评论区制作 通常情况下,我们要准备Id和ParentId两个字段, 在取数据的时候,第一步先foreach评论表钟ParentI=0的字段,这表示基本楼层, 只有当ParentId≠0,才知道这是回复给楼层的。 写.cshtml代码的话,基本逻辑是 ...

2020-06-20 00:24:26

1k+ 1334 reads

2 comments

OR やっと私のコメントエリアが完成しました!

やっと私のコメントエリアが完成しました! 本当に疲れました! この機能を実現するために、すでに24時間を超えて連続して働いています。この時間に完成できて本当によかったです。 元々は48時間以上かかると思います ...

2020-06-19 05:17:00

1k+ 1270 reads

0 comments

OR ASP .NET Core 搭配IIS+Cloudflare的真实IP问题

基本环境: .NET Core 2.1 Runtime Windows Server 2016 步骤1: 在Startup.cs文件里面添加: 步骤2: 在你的控制器里面添加: ...

2020-06-15 00:21:16

1k+ 1371 reads

0 comments

OR How to create a comment area for a website 

Basically, we need to figure out whether you want to create a comment area for a personal blog or for a forum. For personal Blog,You don't need to think about user login or registration. But the forum is on the opposite side ...

2020-06-09 10:22:50

2k+ 2180 reads

118 comments

OR How to shut up those who don't understand.

What I know about Anduin: HE is a selfless, knowledgeable and helpful person... Why did Anduin leave Bilibili? maybe…… ...

2020-06-06 02:22:32

1k+ 1873 reads

0 comments

OR .NET Core 如何发送电子邮件

.net core发送电子邮件有两种选择:SendGrid和MailKit 先说一个题外话,作为初学者,得知道一件事,.NET Framework是自带SmtpClinet用来发邮件的,并且在.NET Core也能用,但是现在SmtpClient已经被微软标记为弃用 ...

2020-05-30 01:35:01

2k+ 2086 reads

3 comments

OR .NET Core ORM建模基本须知

这一讲,主要讲你在创建Model需要知道的东西。 一 通常情况下,你的Model写在一个文件下。 以我的博客为例,我选择的是把模型放在了Blog.cs文件里面。 二 从最主要的产物开始写。 以我的博客为例,我选择先写Blog类。 三 每个类的第一个字段为Id。 以我的博客为例 ...

2020-05-27 19:18:36

1k+ 1509 reads

0 comments

OR [ORM]如何在目框架为.NET Core 2.1的时候使用EntityFrameworkCore

准备工作: 我们新建一个命令行程序, 在vscode的terminal中执行: dotnet add package Microsoft.EntityFrameworkCore.Design 如果命令执行成功,你将在csproj文件里看到 接着执行: dotnet add package Microsoft.EntityFrameworkCore.Sqlite 其实部署在客户机上独立运行程序往往都依赖Sqlite数据库,Sqlite数据库是轻量级数据库 ...

2020-05-26 20:31:49

1k+ 1587 reads

0 comments

OR [趣图]编程语言的等级

1.Minecraft:终极编程语言 2.编程等级概览 3. ...

2020-01-02 01:31:11

1k+ 1418 reads

0 comments

OR Mobile device ease of use

Easy use for mobile is a website rookie needs to pay attention to. Yes,I  have found something wrong with my website. I didn't set the viewport value. Because of this, my website on mobile looks ...

2019-12-29 06:11:31

1k+ 1391 reads

0 comments

OR .NET Core相关问题汇总

服务器存储的时间全部都是UtcTime,在读取的时候Tolocal之后,还是utcTime。 很显然前台必须要用JavaScript对时间进行一个小处理,Razor页面的ToLocal本身还是在服务器渲染的 ...

2019-12-27 00:52:22

1k+ 1375 reads

0 comments

OR 发现.NET Core相关BUG,也可以说是特性吧

HTML.Raw输出的内容,是完全原生的HTML, 当你在你的输出内容里面增加<strong>标签的时候, 如果不进行转义,那么.NET Core会自动帮你在结尾加上一个</strong>的闭合标签 ...

2019-12-26 05:13:57

1k+ 1355 reads

1 comments

OR SQL Server 2008 R2 Express的数据库备份问题

有一个重点需要对新手说一下, 首先这个方法不能远程备份,也就是连接别的数据备份别的数据库是没有用的, 它只会备份你本地的bak文件, 另外还原也必须是本地的, 而且这个bak文件很大程度上是数据的备份 ...

2019-12-26 00:33:46

1k+ 1713 reads

1 comments

QA Dotnet ef migrations add build Failed?Why?

You can't have wrong code in your whole project ...

2019-12-24 11:50:14

1k+ 1518 reads

0 comments

QA Why build this blog website?

For anyone who is eager to progress, blogging / writing / answering is a great help to their growth. Frequency and quantity don't need to be too demanding. If you have something to say, write it. If you have nothing to do, take a rest and feel free to do it. Because the moment you stick to writing, you start to benefit ...

2019-12-24 11:01:34

1k+ 1505 reads

1 comments