在 VS IDE 的環境內建連接 Azure DevOps / TFS,但是在 Java 的環境裡面就需要手動設定,記錄一下設定步驟,提供給需要的人使用
如何使用 Microsoft.Extensions.DependencyInjection for Autofac
- 1533
- 0
- DI Container
- 2021-01-05
微軟提供的 DI Container (Microsoft.Extensions.DependencyInjection ),實作了 Microsoft.Extensions.DependencyInjection.Abstractions 抽象,讓我們也可很輕易的換成我們習慣的 DI Container,比如說,內建的 Microsoft.Extensions.DependencyInjection 沒有提供掃描 Assembly 的自動註冊,這時,在應用程式的進入點換成其它的 DI Container,比如 Autofac,就可以使用自動註冊。
只有增加使用 Autofac DI Container 的註冊,其餘的不用動,像是物件的依賴關係,取出物件方式。
如何使用 DI Container for Microsoft.Extensions.DependencyInjection
- 6074
- 0
- DI Container
- 2023-10-22
Microsoft.Extensions.DependencyInjection 是微軟實作的 DI Container,在 ASP.NET Core 大量的使用,無形之間已經成為一種開發標準,過去,還沒有使用 DI Container 時,我會使用靜態屬性來集中管理物件的生命週期,現在,集中管理物件的生命週期,我又多了一個選擇。
Microsoft.Extensions.DependencyInjection 支援 .NET Fx 4.6.1 以上
如何使用 Microsoft.Extensions.Logging for NLog
通過標準化的 Microsoft.Extensions.Logging 實現日誌紀錄
Log 是系統不可或缺的角色,有利於我們開發(偵錯)、維運,.NET Core 發展出了標準化的 Log 抽象 Microsoft.Extensions.Logging.Abstractions,未來可使用這個標準來實現 Log
通過 IIS URL Rewrite 將 Http 重新導向 Https 並排除 localhost
現在大多數的網站都需要使用 https URL,為了讓用戶仍可使用舊的 http 位置,這時可以採用轉址策略,讓用戶無痛使用,通過 IIS URL Rewrite 即可完成轉址情境。
Azure DevOps Server 2019 連接遠端 Search Service
- 468
- 0
- Azure DevOps Server 2019
- 2020-11-10
以往我是將 Search Service 和 TFS Application Tier(TFS 已改名 Azure DevOps Server) 放在同一台機器,為了不要讓搜尋影響 Azure DevOps Server Application Tier,這次我要將 Search Service 放在另外一台主機上。
解決 - Team Foundation Server 2018 升級 Azure DevOps Server 2019,出現 TF254027 的問題
升級 Azure DevOps 的過程其實挺順利的,除了設定搜尋服務,安裝程式檢查跳出了以下錯誤
"The following Windows service is installed on your computer: elasticsearch-service-x64. Remove elasticsearch-service-x64 to continue"

PS. Team Foundation 已改名為 Azure DevOps Server
如何在 Rider 設定 IdeaVim
在 VS IDE 用了 Vim 一段時間了,現在我要將 VS IDE 的 Vim 設定搬到 Rider,以下是我的設定步驟
下圖出自:https://blog.csdn.net/qq_42239765/article/details/103874859?utm_medium=distribute.pc_relevant.none-task-blog-title-3&spm=1001.2101.3001.4242
[ASP.NET Web API 2] Global Error Handler - 實作 ExceptionFilterAttribute 捕捉應用程式例外並紀錄請求參數
- 1883
- 0
- Global Error Handler
Global Error Handler 有很多的方式,這次來介紹 System.Web.Http.Filters.ExceptionFilterAttribute,用它集中管理應用程式的例外,不需要在每一個動作包裝錯誤,你可以針對不同的例外進行處理,比如,有專門的 Filter 處理交易例外