原创 Secure 連接Linux之後,中文亂碼

解決方法: 首先在選項中設置字符編碼爲UTF-8 然後在全局選項中找到Securefx的配置文件 進入到該目錄中,選擇“Sessions”; 在“Sessions”中找到鏈接地址(如:192.168.70.61.ini)的ini文件

原创 .net core 使用socket的tcp,接收http請求並響應

static void Main(string[] args) { WebServer.Start(); Console.Read();

原创 .net core 使用控制檯開發簡單的web服務器,接收http請求並響應請求

static void Main(string[] args) { WebServer.Start(); Console.Read();

原创 .net core 使用 Response.SendFileAsync 返回圖片

public Task GetImg() { return Response.SendFileAsync("1.png");//還支持png/txt/json等 }

原创 .net core 2.1 AOP 切面編程,MVC和控制檯例子

先來個MVC版本的 1:Nuget引入 AspectCore.Extensions.DependencyInjection 2:Startup 類中設置IServiceProvider public IServiceProvider pr

原创 .netcore 2.1 緩存 MemoryCache 使用,MVC、控制檯

MVC版 1:Startup類 public void ConfigureServices(IServiceCollection services) {     。。。忽略     services.AddMemoryCache();//

原创 .net core 容器中取值的2種方式

1:在構造函數中注入實現  如: IArticleService _articleService; public ArticleController(IArticleService articleService) {     _artic

原创 .net core:使用 NSSM 把.net core程序部署成爲windows 服務

1:訪問:http://www.nssm.cc/download 2:點擊下載並解壓 3:發佈應用程序 4:打開控制檯=》切換到nssm的安裝目錄 5:輸入命令:nssm install 服務名稱 Path:C:\Pro

原创 .net core 中間件的使用

1:Startup 類 Configure 方法添加中間件 public void Configure(IApplicationBuilder app, IHostingEnvironment env) {

原创 Centos 7.x 安裝 Net Core 運行環境

Net Core 環境安裝 Step1:安裝 dotnet 產品提要 要開始安裝 .NET,您需要註冊 Microsoft 簽名密鑰並添加 Microsoft 產品提要。每臺機器只需要做一次。 打開命令提示符並運行以下命令 sudo rp

原创 編譯錯誤 在編譯向該請求提供服務所需資源的過程中出現錯誤。請檢查下列特定錯誤詳細信息並適當地修改源代碼

說明: 在編譯向該請求提供服務所需資源的過程中出現錯誤。請檢查下列特定錯誤詳細信息並適當地修改源代碼變異器錯誤消息:編譯器失敗,錯誤代碼爲-2146232576 解決:註釋掉下面的代碼