主頁 > .NET開發 > 15分鐘從零開始搭建支持10w+用戶的生產環境(四)

15分鐘從零開始搭建支持10w+用戶的生產環境(四)

2020-09-14 15:09:21 .NET開發

上一篇文章,介紹了這個架構中,WebServer的選擇,以及整個架構中擴展時的思路,

原文地址:15分鐘從零開始搭建支持10w+用戶的生產環境(三)

五、架構實踐

前邊用了三篇文章,詳細介紹了這個架構的各個部分的選擇以及安裝,

這篇文章,我會用一個Demo專案,從開發到部署,包括MongoDB資料的訪問,用這種方式過一遍這個架構,

Demo專案,我們用Dotnet Core開發,我們選擇最新版的Dotnet Core 3.1做為系統的主框架,

開發環境用MacOS + VS Code,生產環境用云服務器,

第一步:環境檢查和搭建

  1. 先看看各個環境的版本情況

生產環境:

$ cat /proc/version
Linux version 4.9.0-12-amd64 ([email protected]) (gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1) ) #1 SMP Debian 4.9.210-1 (2020-01-20)

$ lsb_release -a
No LSB modules are available.
Distributor ID:    Debian
Description:    Debian GNU/Linux 9.12 (stretch)
Release:    9.12
Codename:    stretch

開發環境:

$ cat /System/Library/CoreServices/SystemVersion.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>ProductBuildVersion</key>
    <string>19E287</string>
    <key>ProductCopyright</key>
    <string>1983-2020 Apple Inc.</string>
    <key>ProductName</key>
    <string>Mac OS X</string>
    <key>ProductUserVisibleVersion</key>
    <string>10.15.4</string>
    <key>ProductVersion</key>
    <string>10.15.4</string>
    <key>iOSSupportVersion</key>
    <string>13.4</string>
</dict>
</plist>
  1. 安裝Dotnet Core 3.1

Dotnet Core官方下載地址:https://aka.ms/dotnet-download

Mac上邊是以前裝好的,看一下:

$ dotnet --info
.NET Core SDK (reflecting any global.json):
 Version:   3.1.201
 Commit:    b1768b4ae7

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  10.15
 OS Platform: Darwin
 RID:         osx.10.15-x64
 Base Path:   /usr/local/share/dotnet/sdk/3.1.201/

Host (useful for support):
  Version: 3.1.3
  Commit:  4a9f85e9f8

.NET Core SDKs installed:
  3.1.201 [/usr/local/share/dotnet/sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.App 3.1.3 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 3.1.3 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

生產環境上邊,安裝步驟如下:

$ wget -O- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.asc.gpg
$ sudo mv microsoft.asc.gpg /etc/apt/trusted.gpg.d/
$ wget https://packages.microsoft.com/config/debian/9/prod.list
$ sudo mv prod.list /etc/apt/sources.list.d/microsoft-prod.list
$ sudo chown root:root /etc/apt/trusted.gpg.d/microsoft.asc.gpg
$ sudo chown root:root /etc/apt/sources.list.d/microsoft-prod.list
$ sudo apt-get update
$ sudo apt-get install apt-transport-https
$ sudo apt-get update
$ sudo apt-get install dotnet-sdk-3.1

安裝很簡單,這要感謝Microsoft,沒有誤導,也不需要刨坑,

安裝完檢查一下:

$ dotnet --info
.NET Core SDK (reflecting any global.json):
 Version:   3.1.201
 Commit:    b1768b4ae7

Runtime Environment:
 OS Name:     debian
 OS Version:  9
 OS Platform: Linux
 RID:         debian.9-x64
 Base Path:   /usr/share/dotnet/sdk/3.1.201/

Host (useful for support):
  Version: 3.1.3
  Commit:  4a9f85e9f8

.NET Core SDKs installed:
  3.1.201 [/usr/share/dotnet/sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.App 3.1.3 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 3.1.3 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

命令寫順手了,沒有分SDK和Runtime,正常應用時,生產環境可以只裝Runtime,命令是在最后裝Dotnet的一步,用以下命令:

$ sudo apt-get install aspnetcore-runtime-3.1
$ sudo apt-get install dotnet-runtime-3.1
  1. 生產環境安裝MongoDB

詳細步驟參見:15分鐘從零開始搭建支持10w+用戶的生產環境(二)

  1. 生產環境安裝Jexus

詳細步驟參見:15分鐘從零開始搭建支持10w+用戶的生產環境(三)

第二步:開發環境創建Demo專案

  1. 找個目錄,創建解決方案(這一步不是必須,不過我習慣這么做,總要有個解決方案來存放工程):
% dotnet new sln -o demo
The template "Solution File" was created successfully.

這一步完成后,會在當前目錄建立一個新目錄demo,同時,在demo目錄下創建檔案demo.sln,

  1. 在demo目錄下,建立工程:
% dotnet new webapi -o demo
The template "ASP.NET Core Web API" was created successfully.

Processing post-creation actions...
Running 'dotnet restore' on demo/demo.csproj...
  Restore completed in 16.79 ms for /demo/demo/demo.csproj.

Restore succeeded.
  1. 把新建的工程加到解決方案中:
% dotnet sln add demo/demo.csproj 
Project `demo/demo.csproj` added to the solution.
  1. 檢查一下現在的目錄和檔案結構:

其中有一個WeatherForecast,包含兩個檔案:WeatherForecast.cs和WeatherForecastController.cs,是創建工程時自帶的演示類,

現在我們運行一下工程,可以用VSC的「運行」,也可以命令列:

% dotnet run

運行Demo工程,

運行后,從瀏覽器訪問:http://localhost:5000/WeatherForecast,會得到一串演示資料,這就是上面這個演示類的效果,

正式專案中,這兩個檔案要刪掉,

到這一步,基礎工程就搭好了,

我們要做一個API服務,這個服務里要有幾個API,要用到資料庫訪問,為了測驗API,我們需要裝個Swagger,當然用Postman也可以,不過我習慣用Swagger,

  1. 增加Swagger包參考,在demo.csproj的同級目錄下運行:
% dotnet add package Swashbuckle.AspNetCore

Swagger裝好后,需要在Startup.cs中注冊,

在ConfigureServices中加入以下代碼:

services.AddSwaggerGen(c =>
{
    c.SwaggerDoc("v1"new OpenApiInfo { Title = "My API", Version = "V1" });
});

在Configure中加入以下代碼:

app.UseSwagger();
app.UseSwaggerUI(c =>
{
    c.SwaggerEndpoint("/swagger/v1/swagger.json""My API V1");
});

完成后,Startup.cs的代碼:

namespace demo
{
    public class Startup
    {

        public Startup(IConfiguration configuration)
        
{
            Configuration = configuration;
        }

        public IConfiguration Configuration { get; }

        // This method gets called by the runtime. Use this method to add services to the container.
        public void ConfigureServices(IServiceCollection services)
        
{
            services.AddSwaggerGen(c =>
            {
                c.SwaggerDoc("v1"new OpenApiInfo { Title = "My API", Version = "V1" });
            });

            services.AddControllers();
        }

        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
        
{
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }

            app.UseRouting();

            app.UseAuthorization();

            app.UseSwagger();
            app.UseSwaggerUI(c =>
            {
                c.SwaggerEndpoint("/swagger/v1/swagger.json""My API V1");
            });

           app.UseEndpoints(endpoints =>
            {
                endpoints.MapControllers();
            });
        }
    }
}
  1. 增加MongoDB支持

選擇一:參考官方包MongoDB.Driver:

% dotnet add package MongoDB.Driver

后面用包提供的SDK進行開發,

選擇二:參考包Lib.Core.Mongodb.Helper:

% dotnet add package Lib.Core.Mongodb.Helper

這是我自己維護的一個Helper開源包,對官方的MongoDB.Driver做了一定程式的包裝和簡化操作,這個包目前在我公司的生產環境中用著,

這個包的開源地址:https://github.com/humornif/Lib.Core.Mongodb.Helper

參考完成后,需要在appsettings.json中增加資料庫連接串:

"MongoConnection": "mongodb://localhost:27017/admin?wtimeoutMS=2000"

完成后,appsettings.json的代碼如下:

{
  "MongoConnection""mongodb://localhost:27017/admin?wtimeoutMS=2000",
  "Logging": {
    "LogLevel": {
      "Default""Information",
      "Microsoft""Warning",
      "Microsoft.Hosting.Lifetime""Information"
    }
  },
  "AllowedHosts""*"
}
  1. 建立資料庫操作類

在工程中創建一個目錄Models,在目錄下創建一個類檔案Demo.cs:

using MongoDB.Bson;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace demo.Models
{
    public class Demo
    {

        public const string DATABASE = "DemoDB";
        public const string COLLECTION = "DemoCollection";

        public ObjectId _id { get; set; }
        public string demo_user_name { get; set; }
        public int demo_user_age { get; set; }
    }
}

在同一目錄下,再創建另一個Dto類DemoDto.cs:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace demo.Models
{
    public class DemoDto
    {

        public string demo_user_name { get; set; }
        public int demo_user_age { get; set; }
    }
}

在工程中創建另一個目錄DBContext,在目錄下創建一個對應Demo類的資料庫操作類DemoDBContext.cs:

using demo.Models;
using Lib.Core.Mongodb.Helper;
using MongoDB.Bson;
using MongoDB.Driver;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace demo.DBContext
{
    public class DemoDBContext : MongoHelper<Demo>
    {
        //創建資料庫操作索引
        protected override async Task CreateIndexAsync()
        
{
        }
        public DemoDBContext() : base(Demo.DATABASE, Demo.COLLECTION)
        
{

        }

        //保存資料到資料庫
        internal async Task<bool> saveData(DemoDto data)
        {
            Demo new_item = new Demo()
            {
                _id = ObjectId.GenerateNewId(),
                demo_user_name = data.demo_user_name,
                demo_user_age = data.demo_user_age,
            };

            bool result = await CreateAsync(new_item);
            return result;
        }

        //從資料庫查詢全部資料
        internal async Task<IEnumerable<DemoDto>> getAllData()
        {
            var fetch_data = await SelectAllAsync();

            List<DemoDto> result_list = new List<DemoDto>();
            fetch_data.ForEach(p =>
            {
                DemoDto new_item = new DemoDto()
                {
                    demo_user_name = p.demo_user_name,
                    demo_user_age = p.demo_user_age,
                };
                result_list.Add(new_item);
            });
            return result_list;
        }
    }
}

這三個類的關系是:

  • Demo類是資料類,對應MongoDB資料庫中保存的資料,Demo.DATABASE是資料庫中的DB名稱,Demo.COLLECTION是資料庫中的Collection名稱,這個類決定資料在資料庫中的保存位置和保存內容,
  • DemoDta是Dta的映射類,在正式使用時,可以用AutoMap與Demo關聯,在這個Demo中,我用它來做資料從前端到API的傳遞,
  • DemoDBContext是對Demo結構資料的資料庫操作,這個類派生自Lib.Core.MongoDB.Helper中的父類MongoHelper,所有對Demo資料的操作全在這個類中進行,

  1. 創建API控制器

在Controller目錄中,創建DemoController.cs:

using demo.DBContext;
using demo.Models;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace demo.Controllers
{
    [ApiController]
    [Route("[controller]")]
    public class DemoController : ControllerBase
    {
        [HttpPost]
        [Route("savedata")]
        public ActionResult<string> saveData(DemoDto data)
        {
            DemoDBContext dc = new DemoDBContext();
            bool result = dc.saveData(data).GetAwaiter().GetResult();

            if(result)
                return "OK";
            return "ERROR";
        }

        [HttpGet]
        [Route("getdata")]
        public IEnumerable<DemoDto> getData()
        {
            DemoDBContext dc = new DemoDBContext();
            return dc.getAllData().GetAwaiter().GetResult();
        }
    }
}

在這個控制器中,做了兩個API:

  • 基于POST的savedata,用來寫入資料到資料庫;
  • 基于GET的getdata,用來從資料庫讀取資料到前端,

資料庫的操作,呼叫了DemoDBContext中寫好的兩個資料庫操作方法,

資料庫操作的完整方法,可以參見https://github.com/humornif/Lib.Core.Mongodb.Helper的詳細說明,

  1. 檢查一下現在的工程目錄結構:

  1. 測驗運行

在VSC中點擊運行,或者命令列輸入:

% dotnet run

等程式加載完成,可以訪問http://localhost:5000/swagger,進行訪問,并測驗兩個API,

第三步:發布到生產環境

  1. 發布應用

前邊說了,開發環境是MAC,生產環境是Debian 9 x64,所以會涉及到一個跨平臺的發布,

事實上,跨平臺發布也很簡單,這個應用的目的環境是Linux-64,所以,發布命令是:

% dotnet publish -r linux-x64

發布完成后,系統會顯示發布的目錄,這個專案,發布目錄在demo/bin/Debug/netcoreapp3.1/linux-x64/publish,

  1. 打包傳到服務器,并解包到一個目錄,在這個演示中,我解包到了服務器的/var/demo,
  2. 在服務器Jexus中配置網站,

在/usr/jexus/siteconf中建立網站組態檔demo.80(檔案名可以隨便起,我的習慣是網站名稱+埠號):

######################
# Web Site: DEMO
###
#####################################

port=80
root=/ /var/demo
hosts=*    #OR your.com,*.your.com

# User=www-data

# AspNet.Workers=2  # Set the number of asp.net worker processes. Defauit is 1.

# addr=0.0.0.0
# CheckQuery=false
NoLog=true

AppHost={cmd=dotnet demo.dll; root=/var/demo; port=5000}

# NoFile=/index.aspx
# Keep_Alive=false
# UseGZIP=false

# UseHttps=true
# ssl.certificate=/x/xxx.crt  #or pem
# ssl.certificatekey=/x/xxx.key
# ssl.protocol=TLSv1.0 TLSv1.1 TLSv1.2
# ssl.ciphers=ECDHE-RSA-AES256-GCM-SHA384:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4:!DH:!DHE 

# DenyFrom=192.168.0.233, 192.168.1.*, 192.168.2.0/24
# AllowFrom=192.168.*.*
# DenyDirs=~/cgi, ~/upfiles
# indexes=myindex.aspx

# Deny asp ...
rewrite=^/.+?\.(asp|cgi|pl|sh|bash|dll)(\?.*|)$  /.deny->$1
rewrite=.*/editor/.+                             /.deny->editor
# reproxy=/bbs/ http://192.168.1.112/bbs/
# host.Redirect=abc.com www.abc.com  301
# ResponseHandler.Add=myKey:myValue
ResponseHandler.Add=X-Frame-Options:SAMEORIGIN

# Jexus php fastcgi address is '/var/run/jexus/phpsvr'
#######################################################
# fastcgi.add=php|socket:/var/run/jexus/phpsvr

# php-fpm listen address is '127.0.0.1:9000'
############################################
# fastcgi.add=php|tcp:127.0.0.1:9000

在這個演示專案里,起作用的配置其實就一行:

AppHost={cmd=dotnet demo.dll; root=/var/demo; port=5000}

這一行配置了三件事:

  • 應用的運行命令是:dotnet demo.dll
  • 應用的運行目錄是:/var/demo
  • 應用的運行埠是:5000

這樣配置就完成了,

接下來,啟動網站,在/usr/jexus中運行:

$ sudo ./jws start

網站就啟動起來了,

第四步:測驗

在本地瀏覽器中,輸入:http://server_ip/swagger,跟在開發環境測驗效果完全一樣,可以進行資料庫的寫入和讀取操作,

Done !!!

我把上面的代碼,傳到了Github上,需要了可以拉下來直接使用,

代碼地址:https://github.com/humornif/Demo-Code/tree/master/0005/demo

 


 

微信公眾號:老王Plus

掃描二維碼,關注個人公眾號,可以第一時間得到最新的個人文章和內容推送

本文著作權歸作者所有,轉載請保留此宣告和原文鏈接

轉載請註明出處,本文鏈接:https://www.uj5u.com/net/36126.html

標籤:.NET Core

上一篇:Blazor一個簡單的示例讓我們來起飛

下一篇:ASP.NET Core MVC 如何獲取請求的引數

標籤雲
其他(157675) Python(38076) JavaScript(25376) Java(17977) C(15215) 區塊鏈(8255) C#(7972) AI(7469) 爪哇(7425) MySQL(7132) html(6777) 基礎類(6313) sql(6102) 熊猫(6058) PHP(5869) 数组(5741) R(5409) Linux(5327) 反应(5209) 腳本語言(PerlPython)(5129) 非技術區(4971) Android(4554) 数据框(4311) css(4259) 节点.js(4032) C語言(3288) json(3245) 列表(3129) 扑(3119) C++語言(3117) 安卓(2998) 打字稿(2995) VBA(2789) Java相關(2746) 疑難問題(2699) 细绳(2522) 單片機工控(2479) iOS(2429) ASP.NET(2402) MongoDB(2323) 麻木的(2285) 正则表达式(2254) 字典(2211) 循环(2198) 迅速(2185) 擅长(2169) 镖(2155) 功能(1967) .NET技术(1958) Web開發(1951) python-3.x(1918) HtmlCss(1915) 弹簧靴(1913) C++(1909) xml(1889) PostgreSQL(1872) .NETCore(1853) 谷歌表格(1846) Unity3D(1843) for循环(1842)

熱門瀏覽
  • WebAPI簡介

    Web體系結構: 有三個核心:資源(resource),URL(統一資源識別符號)和表示 他們的關系是這樣的:一個資源由一個URL進行標識,HTTP客戶端使用URL定位資源,表示是從資源回傳資料,媒體型別是資源回傳的資料格式。 接下來我們說下HTTP. HTTP協議的系統是一種無狀態的方式,使用請求/ ......

    uj5u.com 2020-09-09 22:07:47 more
  • asp.net core 3.1 入口:Program.cs中的Main函式

    本文分析Program.cs 中Main()函式中代碼的運行順序分析asp.net core程式的啟動,重點不是剖析原始碼,而是理清程式開始時執行的順序。到呼叫了哪些實體,哪些法方。asp.net core 3.1 的程式入口在專案Program.cs檔案里,如下。ususing System; us ......

    uj5u.com 2020-09-09 22:07:49 more
  • asp.net網站作為websocket服務端的應用該如何寫

    最近被websocket的一個問題困擾了很久,有一個需求是在web網站中搭建websocket服務。客戶端通過網頁與服務器建立連接,然后服務器根據ip給客戶端網頁發送資訊。 其實,這個需求并不難,只是剛開始對websocket的內容不太了解。上網搜索了一下,有通過asp.net core 實作的、有 ......

    uj5u.com 2020-09-09 22:08:02 more
  • ASP.NET 開源匯入匯出庫Magicodes.IE Docker中使用

    Magicodes.IE在Docker中使用 更新歷史 2019.02.13 【Nuget】版本更新到2.0.2 【匯入】修復單列匯入的Bug,單元測驗“OneColumnImporter_Test”。問題見(https://github.com/dotnetcore/Magicodes.IE/is ......

    uj5u.com 2020-09-09 22:08:05 more
  • 在webform中使用ajax

    如果你用過Asp.net webform, 說明你也算是.NET 開發的老兵了。WEBform應該是2011 2013左右,當時還用visual studio 2005、 visual studio 2008。后來基本都用的是MVC。 如果是新開發的專案,估計沒人會用webform技術。但是有些舊版 ......

    uj5u.com 2020-09-09 22:08:50 more
  • iis添加asp.net網站,訪問提示:由于擴展配置問題而無法提供您請求的

    今天在iis服務器配置asp.net網站,遇到一個問題,記錄一下: 問題:由于擴展配置問題而無法提供您請求的頁面。如果該頁面是腳本,請添加處理程式。如果應下載檔案,請添加 MIME 映射。 WindowServer2012服務器,添加角色安裝完.netframework和iis之后,運行aspx頁面 ......

    uj5u.com 2020-09-09 22:10:00 more
  • WebAPI-處理架構

    帶著問題去思考,大家好! 問題1:HTTP請求和回傳相應的HTTP回應資訊之間發生了什么? 1:首先是最底層,托管層,位于WebAPI和底層HTTP堆疊之間 2:其次是 訊息處理程式管道層,這里比如日志和快取。OWIN的參考是將訊息處理程式管道的一些功能下移到堆疊下端的OWIN中間件了。 3:控制器處理 ......

    uj5u.com 2020-09-09 22:11:13 more
  • 微信門戶開發框架-使用指導說明書

    微信門戶應用管理系統,采用基于 MVC + Bootstrap + Ajax + Enterprise Library的技術路線,界面層采用Boostrap + Metronic組合的前端框架,資料訪問層支持Oracle、SQLServer、MySQL、PostgreSQL等資料庫。框架以MVC5,... ......

    uj5u.com 2020-09-09 22:15:18 more
  • WebAPI-HTTP編程模型

    帶著問題去思考,大家好!它是什么?它包含什么?它能干什么? 訊息 HTTP編程模型的核心就是訊息抽象,表示為:HttPRequestMessage,HttpResponseMessage.用于客戶端和服務端之間交換請求和回應訊息。 HttpMethod類包含了一組靜態屬性: private stat ......

    uj5u.com 2020-09-09 22:15:23 more
  • 部署WebApi隨筆

    一、跨域 NuGet參考Microsoft.AspNet.WebApi.Cors WebApiConfig.cs中配置: // Web API 配置和服務 config.EnableCors(new EnableCorsAttribute("*", "*", "*")); 二、清除默認回傳XML格式 ......

    uj5u.com 2020-09-09 22:15:48 more
最新发布
  • C#多執行緒學習(二) 如何操縱一個執行緒

    <a href="https://www.cnblogs.com/x-zhi/" target="_blank"><img width="48" height="48" class="pfs" src="https://pic.cnblogs.com/face/2943582/20220801082530.png" alt="" /></...

    uj5u.com 2023-04-19 09:17:20 more
  • C#多執行緒學習(二) 如何操縱一個執行緒

    C#多執行緒學習(二) 如何操縱一個執行緒 執行緒學習第一篇:C#多執行緒學習(一) 多執行緒的相關概念 下面我們就動手來創建一個執行緒,使用Thread類創建執行緒時,只需提供執行緒入口即可。(執行緒入口使程式知道該讓這個執行緒干什么事) 在C#中,執行緒入口是通過ThreadStart代理(delegate)來提供的 ......

    uj5u.com 2023-04-19 09:16:49 more
  • 記一次 .NET某醫療器械清洗系統 卡死分析

    <a href="https://www.cnblogs.com/huangxincheng/" target="_blank"><img width="48" height="48" class="pfs" src="https://pic.cnblogs.com/face/214741/20200614104537.png" alt="" /&g...

    uj5u.com 2023-04-18 08:39:04 more
  • 記一次 .NET某醫療器械清洗系統 卡死分析

    一:背景 1. 講故事 前段時間協助訓練營里的一位朋友分析了一個程式卡死的問題,回過頭來看這個案例比較經典,這篇稍微整理一下供后來者少踩坑吧。 二:WinDbg 分析 1. 為什么會卡死 因為是表單程式,理所當然就是看主執行緒此時正在做什么? 可以用 ~0s ; k 看一下便知。 0:000> k # ......

    uj5u.com 2023-04-18 08:33:10 more
  • SignalR, No Connection with that ID,IIS

    <a href="https://www.cnblogs.com/smartstar/" target="_blank"><img width="48" height="48" class="pfs" src="https://pic.cnblogs.com/face/u36196.jpg" alt="" /></a>...

    uj5u.com 2023-03-30 17:21:52 more
  • 一次對pool的誤用導致的.net頻繁gc的診斷分析

    <a href="https://www.cnblogs.com/dotnet-diagnostic/" target="_blank"><img width="48" height="48" class="pfs" src="https://pic.cnblogs.com/face/3115652/20230225090434.png" alt=""...

    uj5u.com 2023-03-28 10:15:33 more
  • 一次對pool的誤用導致的.net頻繁gc的診斷分析

    <a href="https://www.cnblogs.com/dotnet-diagnostic/" target="_blank"><img width="48" height="48" class="pfs" src="https://pic.cnblogs.com/face/3115652/20230225090434.png" alt=""...

    uj5u.com 2023-03-28 10:13:31 more
  • C#遍歷指定檔案夾中所有檔案的3種方法

    <a href="https://www.cnblogs.com/xbhp/" target="_blank"><img width="48" height="48" class="pfs" src="https://pic.cnblogs.com/face/957602/20230310105611.png" alt="" /></a&...

    uj5u.com 2023-03-27 14:46:55 more
  • C#/VB.NET:如何將PDF轉為PDF/A

    <a href="https://www.cnblogs.com/Carina-baby/" target="_blank"><img width="48" height="48" class="pfs" src="https://pic.cnblogs.com/face/2859233/20220427162558.png" alt="" />...

    uj5u.com 2023-03-27 14:46:35 more
  • 武裝你的WEBAPI-OData聚合查詢

    <a href="https://www.cnblogs.com/podolski/" target="_blank"><img width="48" height="48" class="pfs" src="https://pic.cnblogs.com/face/616093/20140323000327.png" alt="" /><...

    uj5u.com 2023-03-27 14:46:16 more