.NET Programming

Articles

Migrate from AutoMapper to Mapster using GenAI Coding Tool

2025-09-02

Resolve JWT Validation Error - IDX10511: Signature validation failed in .NET

2025-07-02

Error: database static dir ... does not match our static dir ... database configuration mismatch

2025-01-09

Semantic Kernel with Local LLMs in C#/.NET

2024-05-21

Resolve error MSB4126: The specified solution configuration "Debug|x64" is invalid

2024-05-19

Install .NET 8 and 9 SDKs on a Non-System Drive

2024-04-28

Danger: Bypass SSL Interception Proxy Server Certificate Validation in .NET or Python HTTP Requests

2024-01-05

InvalidOperationException: A second operation was started on this context instance before a previous operation completed

2023-09-05

Load Fonts as Glyph in .NET

2022-03-26

Cross-Platform .NET 6 Image Processing Libraries

2022-01-15

Query JSON via JMESPath in .NET

2021-12-21

About --idempotent Flag in dotnet ef migrations script

2021-09-18

.NET - Transform XML Data with XSLT

2021-09-11

Fix Error CryptographicException: The payload was invalid.

2021-08-24

Read Embedded Assembly Resource Files in .NET

2021-08-13

EntityFramework Core: Generate Migration Scripts in a Separate Project

2021-05-15

The Entity Framework tools version '3.1.7' is older than that of the runtime '5.0.3'.

2021-03-08

EntityFramework Core - Update Only One Field

2021-02-14

EntityFramework Core - Connect to MySQL

2021-01-23

Connect to MySQL in .NET 5

2021-01-23

Get Started on .NET 5 with Apache Spark

.NET for Apache Spark 1.0 was officially released on 14th Oct 2020. This version was released together with .NET Core 3.0. Since .NET for Apache Spark is written with .NET Standards, it should work with .NET 5 too. This articles how to use .NET 5 with Apache Spark.

2020-12-23

.NET Standard for C# 9.0

2020-09-28

LINQ to SQL - Select N Random Records

2020-09-22

Machine Learning with .NET in Jupyter Notebooks

2020-01-02

Set AttachDbFilename as Relative Path in .NET Core

2018-07-08

SQLite in .NET Core with Entity Framework Core

2018-06-29

Logging configuration in .NET core

.NET core introduces a logging API that works with a number of logging frameworks. The built-in providers are configurable and extensible to support different level loggings.

2017-10-15

Sending Emails in .NET Core Applications

Sending emails are common in applications. For example, when user registers, we need to send account activation emails. This post summarize the approaches we can use to send emails in .NET Core 1.x and 2.x.

2017-10-15

Resolve the Issues in Upgrading Entity Framework to Version 6.1

2015-01-13

[ASP.NET]强类型DataSet + ObjectDataSource + GridView + Access数据库 百万级数据实现高性能分页

在我的上一篇博文中,我讲解了主题 [ASP.NET]强类型DataSet、ObjectDataSource、GridView、FormView快速实现数据分页展示、添加、修改和删除 。本文将继续上一篇博文,讲述如何在GridView中实现高性能的分页;之所以会提出这样的问题,是因为在上一篇文章中的ObjectDataSource+强类型DataSet+GridView,无论页面每一页显示多少条数据,数据表中的所有数据都会加载到内存中,如果数据达到百万级、千万级以上,这样的分页的性能我们可想而知。

2010-11-18

[ASP.NET]在虚拟目录中禁止web.config继承IIS根目录的web.config的配置

在我们的ASPNET虚拟目录应用中,有时会出现一些异常,比如在根目录的web.config中添加了HttpHandler以及HttpModule(如一些UrlRewiter重写组件、自己的全局HttpModule等)在虚拟目录运行时就会提示找不到找不到指定的文件的异常。解决方法是在根目录的web.config中针对根路径通过location配置这些module和handler等, 并且在location设置允许子目录重写,以及是否被子集应用程序继承设置为false,如下把<system.web> </system.web>包含在<location></location>结点内部:

2010-10-18

浅谈正则表达式匹配嵌套HTML标签

2010-06-09

[.NET] C#连接Oracle数据库方法

2009-12-02

Access中的Inner join, Left join, Right join 嵌套连接查询语法

2009-11-06

Socket通信中文字符乱码问题解决方法

2009-05-13

如何用TcpListener监听本机的多个IP地址

2009-05-13

.NET Remoting 基础学习教程(一)

.NET Remoting 可以用于处理激活、分布式验证、生存期和调用环境等方面的工作。它与Xml Web Service不同,在Xml Web Service中对象是抽象的,客户部需要知道服务器对象的类型,且与.net Remoting 不同,它是独立于平台的。.net Remoting 可以用于访问另一个应用程序域中的对象,无论两者处于同一进程还是不同的进程或者不同的系统中,都可以进行相互间的访问。示意图如下:

2009-05-09

[C#] ASP.NET 上传图片添加半透明图片或者文字水印的方法(二)

在上一篇文章中讲到了关于C#上传图片添加文字水印的方法,这个章节中则是添加半透明的图片水印的方法。下面是ImageWatermarkPainter类的实现.

2009-03-11

[C#] ASP.NET 上传图片添加半透明图片或者文字水印的方法(一)

主要用到System.Drawing 命名空间下的相关类,如Brush、Image、Bitmap、Graphics等等类Image类可以从图片文件创建Image的实例,Bitmap可以从文件也可以从已有的Image对象创建实例,而Graphics类则是封装了对图像的相关操作,可以理解为一个绘图的面板,在这个面板里你可以添加文字,添加背景等等很多常规绘图软件具备的功能。

2009-03-11