2025年4月14日 星期一

IIS At least one other site is using the same HTTPS binding and the binding is configured

一台Server IIS使用多網站憑證問題
At least one other site is using the same HTTPS binding and the binding is configured
解決方式
勾選Require Server Name Indication
中文版請參考下方參考資料
參考資料
IIS 多站台使用 HTTPS 憑證的設定方式

2025年4月1日 星期二

npm : 因為這個系統上已停用指令碼執行,所以無法載入

1.開啟PowerShell
2.執行
get-executionpolicy
3.如為Restricted執行
set-executionpolicy remotesigned
4.如有例外改執行
Set-ExecutionPolicy -Scope CurrentUser RemoteSigned
參考資料
VSCode 執行 npm install 失敗

2025年3月21日 星期五

SQL Server 無法修改強制執行密碼原則

新增SQL使用者時,強制密碼原則未勾選時錯誤
"The CHECK_POLICY and CHECK_EXPIRATION options cannot be turned OFF when MUST_CHANGE is ON"
USE Master
GO
ALTER LOGIN UserName WITH PASSWORD = 'password'
GO
ALTER LOGIN UserName WITH
      CHECK_POLICY = OFF,
      CHECK_EXPIRATION = OFF;
參考資料
Can't Alter Login

2025年3月3日 星期一

SQL Server provider: Named Pipes Provider, error: 40

這問題新手時常遇到所以大概解法
1.開啟 Sql Server Configuation Manager,啟用具名管道
2.防火牆設定輸入規則1433 port
通常這樣就解決了,但我問題還是沒解決
後來詢問主機廠商才知道1433 port常被駭,所以主機商先鎖了,所以需要在Server上使用另一個Port
以下為解決方法
1.開啟 Sql Server Configuation Manager,修改TCP/IP > 改port > 重啟服務
2.防火牆設定輸入規則"自訂的"port
最後專案或程式碼修改連線字串
連線字串比較特別,例如自訂的port為9527,原"192.168.1.100",要改成"192.168.1.100,9527"