發表文章

目前顯示的是 2020的文章

sslforfree 免費憑證 For IIS 使用

https://www.sslforfree.com/ 在免費SSL平台申請SSL  會拿到三個檔案如下: ca_bundle.crt certificate.crt private.key 但這不適用於windows派的 IIS伺服器 所以必須透過轉成pfx供 IIS使用 首先先安裝openssl 並執行以下代碼: openssl pkcs12 -export -out certificate.pfx -inkey private.key -in certificate.crt -certfile ca_bundle.crt 期間會需要輸入pfx使用之密碼 請牢記,全在匯入IIS時key 入

SQL 取代部份文字

針對大量置換某個欄位內容 可以使用以下語法取代 UPDATE TABLE SET  CColumn=REPLACE (cast(CColumn as nvarchar(max)),'old word', 'new word' )  WHERE CColumn like '%old word%'

ASP.NET MVC 無法使用 Visual Studio 2019 新增 Area 新增區域

更新VS後發現無法 新增 Area 區域  以前步驟為: 專案名稱按滑鼠右鍵  選擇加入 點選區域  就可以完成,  但在 Visual Studio 2019 16.4 之後更新後位置 改變為:  專案內任何地方(方案總管內)按滑鼠右鍵  選擇加入 新增 Scaffold 項目

Apache 指令集

service httpd start 啟動 service httpd restart 重新啟動 service httpd stop 停止服務

[openssl] 憑證格式轉換 certificate convert cer to pem / pfx to pem

convert cer to pem 格式指令: openssl x509 -inform der -in certificate.cer -out certificate.pem =============================================================== convert pfx to pem 格式指令: openssl pkcs12 -in  certificate.pfx -out certificate.pem -nodes -password pass:keyinpassword

[IIS] IIS7.5、IIS8、IIS8.5 修改IIS預設上傳、下載檔案大小限制和時間限制

圖片
開啟網站的設定編輯器

C# 數值處理

無條件捨去 Math.Floor 無條件進位 Math.Ceiling 四捨五入 Math.Round

[MS SQL] j直接在 SQL Server 查詢 JSON 資料

JSON 格式已存在很久,SQL 2016以後才加入新的功能可以直接在SQL 下指令查詢: ISJSON  可測試字串是否包含有效的 JSON。 SELECT id , json_col FROM table WHERE ISJSON(json_col) > 0 JSON_VALUE  可從 JSON 字串擷取純量值。 DECLARE @jsonInfo NVARCHAR ( MAX ) SET @jsonInfo=N '{ "info":{ "type":1, "address":{ "town":"Bristol", "county":"Avon", "country":"England" }, "tags":["Sport", "Water polo"] }, "type":"Basic" }' SELECT JSON_QUERY(jsonInfo, '$.info.address' ) AS Address FROM table JSON_QUERY  可從 JSON 字串擷取物件或陣列。 JSON_MODIFY  可更新 JSON 字串中的屬性值,並傳回更新後的 JSON 字串。 來源出處: MSDN

Your PC/Device needs to be repaired 問題排除

如果遇到此錯誤 Your PC/Device needs to be repaired 請先使用開機光碟或USB開機碟 直接選擇修復 如果仍不能開機 疑難解答->高級選項->命令行 執行以下指令: