顯示具有 C# 標籤的文章。 顯示所有文章
顯示具有 C# 標籤的文章。 顯示所有文章

2023年2月14日 星期二

Windows Server 2016 TLS 1.2

 

.NET C# Version: 4.0.30319.42000

SSO AAD 取得 access_token 錯誤

Results:Bad Request {"error":"invalid_request","error_description":"AADSTS1002016: You are using TLS version 1.0, 1.1 and/or 3DES cipher which are deprecated to improve the security posture of Azure AD. 

PowerShell ISE 檢查

https://www.alitajran.com/wp-content/uploads/scripts/Get-TLS.ps1

PowerShell ISE 啟用 TLS 1.2 (只啟用 .NET 4.X  和 Server, Client)

https://www.alitajran.com/wp-content/uploads/scripts/Set-ExchangeTLS.ps1


參考:https://www.alitajran.com/how-to-enable-tls-on-windows-server/

2023年1月17日 星期二

ASP.NET Core IIS HTTP Error 500.31

IIS 來架設 .NET Core 的站台,需要安裝 .NET Core Hosting Bundle 才能執行

檢查安裝在 IIS 上的 .NET Core Hosting Bundle 版本

HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Updates\

Hosting Bundle 各版本下載位置:https://dotnet.microsoft.com/download


安裝後重裝服務

net stop was /y

net start w3svc


在開發時可以看目前用的 core 版本


參考:

https://blog.poychang.net/how-to-check-dotnet-core-iis-hosting-bundle-version/

https://dotblogs.com.tw/jakeuj/2021/05/10/DotNetCoreHostingBundleIIS