2022年10月17日 星期一

開發環境網站遇到 SSL 憑證無效

錯誤訊息: AuthenticationException: The remote certificate is invalid because of errors in the certificate chain: NotTimeValid
解法: 
確認是否 localhost 憑證有效 : 設定 > 網際網路選項 > 內容 > 憑證
刪除 c:\Users\[username]\AppData\Roaming\ASP.NET\https\ 裡面所有檔案,然後重啟專案,若有配合 vue 則連同 vue 的 npm 一起重啟,此時檔案會重新產生

沒有留言:

自訂權限驗證機制

// 使用 filter [Route("api/[controller]")] [ApiController] [Authorize] [TypeFilter(typeof(CustomAsyncAuthorizationFilter))] public c...