[研究]Visual Studio Installer 2022 不再提供了
2025-12-05
Visual Studio 2022 v17.14 下載網址
https://learn.microsoft.com/zh-tw/visualstudio/releases/2022/release-notes?tabs=allfeatures#17.14.21
(完)
[研究]Visual Studio Installer 2022 不再提供了
2025-12-05
Visual Studio 2022 v17.14 下載網址
https://learn.microsoft.com/zh-tw/visualstudio/releases/2022/release-notes?tabs=allfeatures#17.14.21
(完)
[研究]Visual Studio Build Tools 2022 與 Visual Studio 2022 Enterprise 工作負載比較
2025-12-05
續
[研究]Jenkins + fortify 要用 MSBuild 推薦如何安裝 ?
https://shaurong.blogspot.com/2025/12/jenkins-fortify-msbuild.html
**********
因為 Visual Studio Build Tools 2026 好像尚未出,故以 Visual Studio Build Tools 2022 來比較。
網址:https://visualstudio.microsoft.com/zh-hant/downloads/?q=build+tools
直接下載網址:https://aka.ms/vs/17/release/vs_BuildTools.exe
https://learn.microsoft.com/zh-tw/visualstudio/releases/2022/release-notes?tabs=allfeatures#17.14.21
Visual Studio Build Tools 2022 工作負載
Visual Studio Build Tools 2022 工作負載【網頁程式開發建置工具】
Visual Studio 2022 Enterprise 工作負載【ASP.NET與網頁程式開發】
(完)
[研究]Jenkins + fortify 要用 MSBuild 推薦如何安裝 ?
2025-12-05
環境:Visual Studio 2022 + ASP.NET + WebForm + Web Application + C# + SQL Server 2019 + SQL Server Management Studio (SSMS) 20.2
********************************************************************************
1️⃣ MSBuild 的取得方式
| 方式 | 適用情境 | 優缺點 |
|---|---|---|
| Visual Studio(完整 IDE) | 若本地開發或需要 GUI | 安裝完整,佔用大,更新麻煩 |
| Visual Studio Build Tools(建議) | Jenkins Server、CI/CD 專用 | 安裝輕量、只包含 MSBuild、必要 SDK,無 GUI |
| .NET SDK(例如 2022 / 2023) | 針對 .NET Core / .NET 5/6/7 專案 | 適合 SDK 專案,但舊版 WebForm/Framework 專案可能不支援 |
| Workload | 說明 | Fortify/MSBuild 需求 |
|---|---|---|
| .NET desktop build tools | 包含 MSBuild、.NET Framework SDK、C# / VB 編譯器 | ✅ 必須 |
| ASP.NET and web development | 如果有 WebForms 專案 | ✅ 建議選 |
| NuGet package manager | 支援 restore | ✅ 選 |
| C++ build tools | 可選 | ❌ Fortify 不需要 |
3.安裝時注意:
3️⃣ 環境變數設定
安裝完 Build Tools 之後:
MSBuild 路徑通常位於:
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\MSBuild.exe |
建議把這個路徑加入 Jenkins 執行環境:
系統環境變數 PATH
或 Jenkins Global Tool Configuration → MSBuild
4️⃣ Jenkins + MSBuild 配置建議
方法 A:Global Tool
方法 B:直接使用完整路徑
"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\MSBuild.exe" "%WORKSPACE%\WebApplication1\WebApplication1.sln" /t:Build /p:Configuration=Release |
5️⃣ NuGet restore
Fortify SCA 需要所有依賴可解析,所以建議:
D:\BuildTool\nuget.exe restore "%WORKSPACE%\WebApplication1\WebApplication1.sln" |
6️⃣ Fortify SCA 使用建議
✅ 總結建議
相關
[研究]ASP.NET + WebForm + SQL Server 開發,安裝勾選建議?
2025-12-04
環境:Visual Studio 2022 + ASP.NET + WebForm + Web Application + C# + SQL Server 2019 + SQL Server Management Studio (SSMS) 20.2
ASP.NET + WebForm + SQL Server 開發,安裝勾選建議?
① 網頁伺服器 → 一般 HTTP 功能
| 功能 | 是否需要 | 說明 |
|---|---|---|
| HTTP 錯誤 | ✔ 必要 | ASP.NET 會使用自訂錯誤頁 |
| 預設文件 | ✔ 必要 | 預設讀取 default.aspx |
| 靜態內容 | ✔ 必要 | 載入 JS / CSS / 圖檔 |
| 瀏覽目錄 | ❌ 不建議 | 通常不應讓使用者看到目錄 |
| HTTP 重新導向 | ✔ 常用 | 301/302 轉址 |
| WebDAV 發佈 | ❌ 禁用 | 高風險,不需要 WebDAV |
② 安全性(需依網站需求,但常用如下)
| 功能 | 是否需要 | 說明 |
|---|---|---|
| 要求篩選 (Request Filtering) | ✔ 必要 | 防止惡意請求(預設即建議啟用) |
| 基本驗證 | ❌ 除非需求 | 網站使用 Forms Auth 時不需要 |
| Windows 驗證 | ❌ 依需求 | 若為內部 AD 驗證才勾 |
| IP 及網域限制 | ✔ 建議 | 若有管理後台,可限制來源 IP |
| URL 授權 | ✔ 若使用 | 可限制 URL ACL,但 WebForms 通常使用 Web.config 授權 |
不勾選(安全性高風險):IIS 用戶端憑證、集中式 SSL、摘要式驗證、用戶端憑證對應驗證
③ 狀況及診斷(視 Debug 需求)
| 功能 | 是否需要 | 說明 |
|---|---|---|
| HTTP 記錄 | ✔ 必要 | 基本 IIS log |
| 要求監視器 | ✔ 建議 | 分析長延遲請求 |
| 追蹤(Tracing) | ❌ 生產環境不要 | 會暴露太多資訊 |
| 自訂記錄 / ODBC 記錄 | ❌ 不建議 | 通常無用且拖慢性能 |
④ 效能
| 功能 | 是否需要 | 說明 |
|---|---|---|
| 靜態內容壓縮 | ✔ 建議 | 減少流量,前端效能好 |
| 動態內容壓縮 | ✔ 建議 | 支援 ASPX 壓縮,節省頻寬 |
⑤ 應用程式開發(WebForms 必要)
| 功能 | 是否需要 | 說明 |
|---|---|---|
| .NET 擴充性 4.7 | ✔ 必要 | WebForms .NET Framework 執行必備 |
| ASP.NET 4.7 | ✔ 必要 | WebForms 正式執行環境 |
| ISAPI 擴充程式 | ✔ 必要 | ASP.NET 需使用 |
| ISAPI 篩選器 | ✔ 必要 | ASP.NET Pipeline |
| CGI | ❌ 不需要 | 若無 Perl/PHP 不要開 |
| WebSocket 通訊協定 | ❌ 依需求 | WebForms 大多不需要 |
| 伺服器端包含 | ❌ 不需要 | 不使用 SSI 時不用開 |
| 應用程式初始化 | ✔ 建議 | 可讓 AppPool 啟動時 Preload |
注意:若你專案不是 .NET 3.5,就不要開啟 .NET 3.5 / ASP.NET 3.5 以降低攻擊面。
⑥ 管理工具(管理必備)
| 功能 | 是否需要 | 說明 |
|---|---|---|
| IIS 管理主控台 | ✔ 必要 | 顯示 IIS GUI |
| IIS 管理指令碼及工具 | ✔ 建議 | 方便使用 appcmd |
| 管理服務 | ❌ 依需求 | 若需遠端 IIS 管理才勾 |
| IIS6 管理相容性 (全套) | ❌ 除非舊程式需要 | 新架構不需 IIS6 metabase |
❌ 明確不建議勾選(提高風險且無必要)
| 項目 | 原因 |
|---|---|
| 瀏覽目錄 | 容易洩漏檔案 |
| WebDAV 發行 | 高風險,容易被攻擊 |
| 基本驗證 / 摘要式驗證 | 非必要,安全性較低 |
| 用戶端憑證對應驗證 | 不需要 |
| 追蹤(Tracing) | 生產環境不安全 |
| CGI | 不需要 |
| FTP服務 / FTP擴充性 | 不建議在同台 IIS 使用 FTP |
| IIS6 相關 | 不用 Metabase 就不需 |
📌 最常用標準 WebForms 伺服器配置(推薦直接照這表啟用)
✔ 你應該勾的(推薦列表)
❌ 不要勾的(能關就關)
相關
[研究]Visual Studio 的「 Incredibuild - 建置加速」用途?
2025-12-04
下圖,Visual Studio 2019的 Incredibuild - 建置加速
| 角色 | 用途 |
|---|---|
| Coordinator | 控制整個分散式編譯的任務排程(可安裝在一台 Server) |
| Agent(含 Helper Agent) | 提供可用 CPU 核心(建置工作在此執行) |
| Visual Studio Extension | 讓開發者可透過 VS 啟用 Incredibuild |
| 專案類型 | 未使用 | 使用後 |
|---|---|---|
| UE4(大型 C++) | 30–60 分鐘 | 5–15 分鐘 |
| 大型 C# + MSBuild | 8–12 分鐘 | 約 2–6 分鐘 |
| Android NDK | 20–40 分鐘 | 5–12 分鐘 |
| 問題 | 答案 |
|---|---|
| Visual Studio 2019 的 Incredibuild 是做什麼? | 分散式平行編譯,加速建置 |
| 要不要額外安裝? | 要,VS 只裝介面,需要 Incredibuild 主程式 |
| 加速效果? | C++ 明顯,大型 C# 中度,小型專案有限 |
| 對 Fortify/Jenkins 有幫助嗎? | 幾乎沒有 |
[研究]新機用 Visual Studio 2019 的 VisualStudioSetup.exe 會變成安裝 Visual Studio 2022 了
2025-12-04
Visual Studio 2019 產品生命週期和服務
https://learn.microsoft.com/zh-tw/visualstudio/releases/2019/servicing-vs2019
版本 16.11 終止支援 2029 年 4 月
Visual Studio 2019 – Microsoft Lifecycle
https://learn.microsoft.com/zh-tw/lifecycle/products/visual-studio-2019
清單 開始日期 主要支援結束日期 延伸支援結束日期
Visual Studio 2019 2019年4月2日 2024年4月9日 2029年4月10日
(完)
[研究]Symantec EDR 對效能預估影響百分比 ?
2025-12-04
EDR(Endpoint Detection & Response)= 端點偵測與回應系統
Symantec EDR 對效能預估影響百分比 ?
ChatGPT
(1) 一般辦公用 Windows PC(文書 / 上網 / Outlook)
| 資源 | 平均影響 | 峰值(短時間) |
|---|---|---|
| CPU | +1% ~ +5% | 可達 10%(檔案大量開啟、更新或病毒碼更新時) |
| RAM | +150 ~ 300 MB | 約 400 MB |
| 磁碟 I/O | +3% ~ +8% | 10%(寫入行為事件時) |
| 資源 | 平均影響 | 峰值 |
|---|---|---|
| CPU | +5% ~ +12% | 15%~20%(大量 small file I/O) |
| RAM | +200 ~ 400 MB | 500 MB |
| 磁碟 I/O | +10% ~ 20% | 30%(大量編譯或容器 I/O) |
| 伺服器角色 | CPU 平均影響 | I/O 影響 | 說明 |
|---|---|---|---|
| AD / DC | +5% ~ 10% | 10%~20% | EDR 對大量 LDAP / Sysvol I/O 會有影響 |
| Web Server(IIS) | +3% ~ 8% | 8%~15% | 頻繁寫 log、ASP.NET 即時編譯會被監控 |
| File Server | +10% ~ 25% | 20%~40% | 空前大:大量檔案開啟/寫入/讀取均會被監控 |
| DB Server(SQL Server) | < 5%(若有正確排除) | < 10% | 若未排除 DB 資料夾則會產生重大 I/O 開銷 |
| 類型 | 預估影響 |
|---|---|
| VM CPU / RAM 本身 | +5% ~ +15%(CPU scheduling 放大) |
| Host 整體 | +3% ~ 8% |
[研究]Jenkins 的 "執行 Windows 批次指令" 開始執行前,就花了 7 小時,如何加速 ?
2025-12-03
環境:Visual Studio 2022 + ASP.NET + WebForm + Web Application + C# + SQL Server 2019 + SQL Server Management Studio (SSMS) 20.2
********************************************************************************
經過時間 00:07:30.04 <=== 發現 Jenkins 的 "執行 Windows 批次指令" 開始執行前,就花了 7 小時 40 分,如何加速 ?
建置成功。 "D:\Jenkins\workspace\Fortify_WebApplication1\WebApplication1\WebApplication1.sln" (預設目標) (1) -> "D:\Jenkins\workspace\Fortify_WebApplication1\WebApplication1\WebApplication1\WebApplication1.csproj" (預設目標) (2) -> (AspNetPreCompile 目標) -> ASPNETCOMPILER : warning CS1685: 預先定義的類型 'System.ObsoleteAttribute' 在全域別名的多個組件中都有定義; 使用 'c:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\mscorlib.dll' 中的定義 [D:\Jenkins\workspace\Fortify_WebApplication1\WebApplication1\WebApplication1\WebApplication1.csproj] 1 個警告 0 個錯誤 經過時間 00:07:30.04 [Fortify_WebApplication1] $ cmd /c call C:\Users\ADMINI~1\AppData\Local\Temp\jenkins4235466723566878775.bat |
ChatGPT (敝人摘要)
del /q /f /s "C:\Users\ADMINI~1\AppData\Local\Temp\*.*"
********************************************************************************
Jenkins 組態畫面這些參數用途 ? 移除會否更快 ?
Build a Visual Studio project or solution using MSBuild Command Line Arguments ? /p:DeployOnBuild=true /p:PublishProfile=FolderProfileDev |
ChatGPT
1️⃣ /p:DeployOnBuild=true
用途:
對速度的影響:
2️⃣ /p:PublishProfile=FolderProfileDev
🔹 總結建議
可以移除。
相關
[研究]sourceanalyzer.exe 的 -Xmx 建議值?
2025-12-03
虛擬機
請問 sourceanalyzer.exe 的 -Xmx 建議值?
********************************************************************************
ChatGPT
1️⃣ Fortify 官方建議
Fortify SCA 官方建議:
參考來源:Fortify SCA Installation and Administration Guide 25.x
https://www.microfocus.com/documentation/fortify-software-security-center/
2️⃣ 調整建議(你的環境)
你的 VM 有 24 GB RAM,還要同時跑 SQL Server / Jenkins / Gitea,建議保留給 OS 和其他服務至少 8~10 GB,所以給 sourceanalyzer.exe 的 -Xmx 不宜設定過高。
建議設定:-Xmx12G ~ 14G
如果專案非常大、分析時間過長,可以逐步增加到 16G,但不要超過 16~18G,否則可能造成系統 swap 或其他服務不穩定。
3️⃣ 設定範例
sourceanalyzer.exe -b MyProject -Xmx12G -clean
sourceanalyzer.exe -b MyProject -Xmx12G MySourceCode
注意:-Xmx 單位是 MB 或 GB,Fortify 25.x 可以直接使用 G。
✅ 小結
| 專案大小 | 建議 -Xmx |
|---|---|
| 小型 <100k LoC | 4~8G |
| 中型 100k~500k LoC | 8~12G |
| 大型 >500k LoC | 12~16G |
********************************************************************************
檢測總檔案數:7500,程式碼總行數:1200000 的 -Xmx 建議值?
ChatGPT
相關
[研究]Jenkins 觸發 Fortify SCA (SAST) 25.4 掃描的組態指令效能改善
2025-12-03、2025-12-04、2025-12-05修正
環境:Visual Studio 2022 + ASP.NET + WebForm + Web Application + C# + SQL Server 2019 + SQL Server Management Studio (SSMS) 20.2
********************************************************************************
ChatGPT
【執行Windows批次指令】原來指令
D:\BuildTool\nuget.exe restore .\WebApplication1\WebApplication1.sln if "%GIT_COMMIT%" NEQ "%version%" ( sourceanalyzer.exe -b %JOB_NAME% -clean sourceanalyzer.exe -b %JOB_NAME% -exclude "**\*.js" -Dcom.fortify.sca.fileextensions.sql=TSQL msbuild /t:rebuild %WORKSPACE%\WebApplication1\WebApplication1.sln sourceanalyzer.exe -b %JOB_NAME% -scan -verbose -Xmx14G -format "fpr" -f "%WORKSPACE%\report.fpr" ReportGenerator.bat -template %FORTIFY_TEMPLATE% -format "pdf" -f "%WORKSPACE%\report.pdf" -source "%WORKSPACE%\report.fpr" ) |
說明
D:\BuildTool\nuget.exe restore .\WebApplication1\WebApplication1.sln |
if "%GIT_COMMIT%" NEQ "%version%" |
sourceanalyzer.exe -b %JOB_NAME% -clean |
sourceanalyzer.exe -b %JOB_NAME% -exclude "**\*.js" -Dcom.fortify.sca.fileextensions.sql=TSQL msbuild /t:rebuild %WORKSPACE%\PMSWeb\PMSWeb.sln |
|
sourceanalyzer.exe -b %JOB_NAME% -incremental
|
sourceanalyzer.exe -b %JOB_NAME% -scan -verbose -Xmx14G -format "fpr" -f "%WORKSPACE%\report.fpr" |
ReportGenerator.bat -template %FORTIFY_TEMPLATE% -format "pdf" -f "%WORKSPACE%\report.pdf" -source "%WORKSPACE%\report.fpr" |
********************************************************************************
綜合結果
del /q /f /s "C:\Users\ADMINI~1\AppData\Local\Temp\*.*" 2>nul
D:\BuildTool\nuget.exe restore .\WebApplication1\WebApplication1.sln
if "%GIT_COMMIT%" NEQ "%version%" (
REM 清除舊的 build session (可視需求保留增量掃描)
sourceanalyzer.exe -b %JOB_NAME% -clean
REM 建置並收集程式碼,排除指定檔案/目錄
sourceanalyzer.exe -b "%JOB_NAME%" ^
-exclude "**\*.js" ^
-exclude "**\packages\**" ^
-exclude "**\bin\**" ^
-exclude "**\obj\**" ^
-exclude "**\Asset\**" ^
-exclude "**\Content\**" ^
-exclude "**\Scripts\**" ^
-exclude "**\doc\**" ^
-exclude "**\docs\**" ^
-exclude "**\docx\**" ^
-exclude "**\node_modules\**" ^
-exclude "**\dist\**" ^
-exclude "**\build\**" ^
-exclude "**\*.pdf" ^
-exclude "**\*.sql" ^
-exclude "**\*.zip" ^
-exclude "**\*.ods" ^
-exclude "**\*.xlsx" ^
-exclude "**\*.dll" ^
-exclude "**\*.pdb" ^
-exclude "**\App_Data\*.mdb" ^
-exclude "**\App_Data\*.xlsx" ^
-Dcom.fortify.sca.fileextensions.sql=TSQL ^
msbuild /t:build "%WORKSPACE%\PMSWeb\PMSWeb.sln"
REM 執行掃描,使用增量掃描加速
sourceanalyzer.exe -b %JOB_NAME% -scan -incremental -Xmx14G -format "fpr" -f "%WORKSPACE%\new.fpr"
REM 產生 PDF 報告
ReportGenerator.bat -template %FORTIFY_TEMPLATE% -format "pdf" -f "%WORKSPACE%\Assessment_all.pdf" -source "%WORKSPACE%\new.fpr"
)
|
2>nul 會忽略錯誤(像是檔案被鎖定)。
不會列出路徑,不會卡住。
缺點:del 會在遇到被鎖定檔案時仍顯示錯誤訊息,但不會停止。
這比 for /f dir 快得多,因為不需要列舉全部檔案。
注意,所有換行必須加 ^,最後一行的 msbuild 前面不需 ^
注意,
-exclude "**\Content\**"
-exclude "**\Scripts\**"
如果是 WebForm,通常沒問題
但如果靠 script bundling 產生 .js / css,有些重要檔案可能被排除。
********************************************************************************
Jenkins 執行到下面這行前,
del /q /f /s "C:\Users\ADMINI~1\AppData\Local\Temp\*.*" 2>nul |
C:\Users\Administrator\AppData\Local\Temp\jenkinsXXXXXX.bat |
相關
[研究]HTML、CSC表格內外框線
2025-12-03
環境:Visual Studio 2022 + ASP.NET + WebForm + Web Application + C# + SQL Server 2019 + SQL Server Management Studio (SSMS) 20.2
********************************************************************************
某 <table border="1"> 只會產生 表格外框 的線,但內部 不會有格線,解決方法。
方式 1:使用 border-collapse: collapse 搭配 CSS 邊框
<table style="border-collapse: collapse; border: 1px solid black;">
<tr>
<th style="border: 1px solid black;">欄位1</th>
<th style="border: 1px solid black;">欄位2</th>
</tr>
<tr>
<td style="border: 1px solid black;">資料1</td>
<td style="border: 1px solid black;">資料2</td>
</tr>
</table>
|
方式 2:用全局 CSS 樣式(建議)
<style>
table {
border-collapse: collapse; /* 合併邊框 */
border: 1px solid black; /* 表格外框 */
}
th, td {
border: 1px solid black; /* 每個儲存格邊框 */
padding: 5px; /* 內距,看起來不擠 */
}
</style>
<table>
<tr>
<th>欄位1</th>
<th>欄位2</th>
</tr>
<tr>
<td>資料1</td>
<td>資料2</td>
</tr>
</table>
|
方式 3:用 id(只影響那一個 table)
HTML
|
方式 4:用 class(可套用到多個表格)
<style>
.bordered-table {
border-collapse: collapse;
border: 1px solid black;
}
.bordered-table th,
.bordered-table td {
border: 1px solid black;
padding: 5px;
}
</style>
<table class="bordered-table">
<tr>
<th>欄位1</th>
<th>欄位2</th>
</tr>
<tr>
<td>資料1</td>
<td>資料2</td>
</tr>
</table>
|
(完)
相關
[研究]ASP.NET WebForm 用 IIS GUI 判斷使用的 .NET Framework 版本? 32 bits 或 64位元?
2025-12-02
環境:Visual Studio 2022 + ASP.NET + WebForm + Web Application + C# + SQL Server 2019 + SQL Server Management Studio (SSMS) 20.2
********************************************************************************
ChatGPT
1️⃣ 判斷應用程式使用的 .NET Framework 版本
注意:IIS GUI 只能顯示 CLR 版本,而不能精確顯示小版本(如 4.7.2 或 4.8),要看精確版本仍需程式判斷。
在 IIS GUI 沒有直接顯示 OS 位元數,但可以透過:
伺服器管理員 (Server Manager) → 系統資訊 查看作業系統版本和位元數。
或者在 命令提示字元 輸入:
systeminfo | findstr /B /C:"OS 名稱" /C:"系統類型" |
會顯示:
系統類型: x64-based PC → 64-bit OS
系統類型: x86-based PC → 32-bit OS
🔹 小結
| 判斷項目 | IIS GUI 路徑 | 說明 |
|---|---|---|
| .NET Framework 版本 | AppPool → Advanced Settings → .NET CLR Version | v2.0 / v4.0 |
| 應用程式位元數 | AppPool → Advanced Settings → Enable 32-Bit Applications | True = 32-bit, False = 隨 OS |
| OS 位元數 | 系統資訊或 systeminfo 指令 | x64 / x86 |
相關
[研究]ASP.NET Webform 取得 Request Id 或 Response Id 儲存到的 Log Table ?
2025-12-02
環境:Visual Studio 2022 + ASP.NET + WebForm + Web Application + C# + SQL Server 2019 + SQL Server Management Studio (SSMS) 20.2
********************************************************************************
✅ 一、WebForm 沒有內建 RequestId,需要自行產生
ASP.NET Core 才有內建 HttpContext.TraceIdentifier。
ASP.NET WebForm (.NET Framework) 沒有預設 RequestId,所以我們要 自行產生 GUID 或類似唯一值,並在整個 Request 生命周期保持一致。
最常見方式:
每一個 Request 進入 Pipeline 時產生 RequestId
儲存在 HttpContext.Items 中(僅在該 Request 有效)
Log 時從 HttpContext.Items 取得
✅ 二、在 Global.asax 產生 RequestId(推薦做法)
Global.asax
protected void Application_BeginRequest(object sender, EventArgs e)
{
string requestId = Guid.NewGuid().ToString();
HttpContext.Current.Items["RequestId"] = requestId;
}
|
✅ 三、在任何 .aspx.cs 取得 RequestId
Page_Load / Button_Click / 任何地方
string requestId = HttpContext.Current.Items["RequestId"]?.ToString(); |
、、、(略)
**********
其實說穿了,ChatGPT 只是讓 table 中每一筆資料有一個唯一的值而已,用 SQL Server 的 識別 IDENTITY(1,1) 即可。而 Request Id 和 Response Id 其實用同一個欄位即可。
(完)
[研究]3xx MB 的 .sql 用SSMS匯入 SQL Server (32 GB) 出現記憶體不足
2025-12-01
Microsoft SQL Server Management Studio
無法執行指令碼。
其他资讯:
Insufficient memory to continue the execution of the program. (mscorlib)
省複製 顯示詳細資料 確定
Insufficient memory to continue the execution of the program. (mscorlib)
程式位置:
System Runtime InteropServices.Marshal.AllocCo.TaskMem(Int32 cb)
Microsoft.SqUerver Management UI UI VSIntegration Shell TexEutfer.GetText(Unt32 startPostion, Int32 chars)
Microsoft SolServer Management UI YSInte gration Shell TextBuffer.get Text)
Micoosoft.SqlServer Management UI.UI.YSIntegration ShellCode WundowControl GetSelected TextSpen)
Microsoft.So Server.Management UI VSInte gration Edidors ScriptidorControl GetSelected TextSpan)
R Miczoout SoNerver Management Ul USIntegrateshon EdiScopthondReiptAndResmlbaditorContol OnExExecSonpt(Obect sendes, Eventkra)
**********
ChatGPT
你遇到的錯誤是 SSMS 在匯入大型 .sql 檔案時出現的記憶體不足 (Insufficient memory),即使你電腦有 32 GB RAM,也可能發生,原因和背景如下:
1️⃣ SSMS 與大型 SQL 檔案的限制
2️⃣ 其他潛在因素
3️⃣ 解決方案 / 替代方法
sqlcmd -S <ServerName> -d <DatabaseName> -U <User> -P <Password> -i "C:\path\to\file.sql"
💡 重點結論
(完)
[研究]GridView顯示到豪秒
2025-11-25
環境:Visual Studio 2022 + ASP.NET + WebForm + Web Application + C# + SQL Server 2019 + SQL Server Management Studio (SSMS) 20.2
資料表 LogTime 欄位資料型態 datetime2(3)
GridView 的 <asp:BoundField> 無法自行格式化 datetime 到毫秒。
要顯示到毫秒,必須改用 TemplateField + Eval("欄位","格式字串")。
.aspx
<asp:TemplateField HeaderText="事件時間" SortExpression="LogTime">
<ItemTemplate>
<%# Eval("LogTime", "{0:yyyy-MM-dd HH:mm:ss.fff}") %>
</ItemTemplate>
</asp:TemplateField>
|
(完)
相關
[研究]Windows 11 26H1 英文專業測試版
2025-11-24
28000.1.251103-1709.BR_RELEASE_CLIENTPRO_OEMRET_X64FRE_EN-US.iso
4.92 GB (5,285,885,952 位元組)
(完)