.net Core

[.net core] custom health check probe

2022-02-27 C.H. Ling 0

Probing is one of the method to monitor application to indicate its healthiness. In previous article that it was mentioned on adding health check in application. This article will introduce in deep on create custom […]

.net Core

[ASP.net Core] 加入NLog作logger

2018-12-28 C.H. Ling 0

上篇寫了利用Log4net 做記錄及其現時的限制, 現在會使用NLog 進行記錄. NLog 是一套建於.net 平台的logging framework, 與log4net 比較, 最大好處是NLog的效能比較快及可以concurrent 讀寫, 而log4net 則在programming language 上較廣泛, 可以在相同xml config 下於不同平台執行. 是次示範會在.net Core 中利用NLog 進行檔案及資料庫記錄. 而資料庫則會以SQL server 作示範.

.net Core

[ASP.net Core] 將AppSettings 設定儲存於JSON 檔中.

2018-12-27 C.H. Ling 0

在ASP.net Core 中並沒有如.net framework 中預設設定於web.config 或app.config 中, 須要人手設定, 雖然有少許不便, 但換來了更lightweight 又更有彈性的部署. 示範中會以將EF 中的connection string 修改存於JSON 檔, 令其更configurable. 因為會涉及profile 設定, 所以亦會在此亦會分享.net core 中profiling 的相關設定.