Files
EIS-dotnet/MIGRATION.md
T
biss 017cacc6f9 招生计划、资格、录取、分数线及报到公示
成绩单 HMAC 防伪验真
录取通知书 HMAC 防伪验真
防伪码常量时间比较
生产环境文书密钥强度检查
旧文书防伪码完全兼容
2026-07-22 19:12:38 +08:00

47 lines
1.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# ASP.NET Core 10 迁移
迁移采用兼容优先的渐进式方案:ASP.NET Core 作为统一入口,尚未迁移的 `/api/*` 请求暂时转发给运行在 `4174` 端口的 Node.js 服务。每完成一个功能域,就在 ASP.NET Core 中注册对应原生端点并停止转发该路径。
## 当前阶段
- [x] ASP.NET Core 10 解决方案与分层项目
- [x] 原前端静态资源无修改托管
- [x] 旧 API 兼容转发,包含 Cookie、请求体、文件下载和状态码
- [x] 存活与迁移就绪检查
- [x] 公开首页与已发布通知(原生 SQLite / MySQL 读取)
- [x] 招生公示与 HMAC 文书验真公开接口
- [ ] 登录、Session 与 TOTP
- [ ] 考生业务
- [ ] 管理后台、审批流和考务编排
- [ ] 招生录取
- [ ] Excel、文书和缓存
- [ ] 容器入口切换及 Node.js 后端移除
## 本地运行
先在一个终端运行旧 API
```powershell
$env:PORT = '4174'
npm start
```
再在另一个终端运行 ASP.NET Core 入口:
```powershell
dotnet run --project .\src\Eis.Web\Eis.Web.csproj
```
浏览器仍访问 <http://127.0.0.1:4173>。
- `GET /health/live`:只检查 ASP.NET Core 宿主。
- `GET /health/migration`:检查迁移宿主和旧 API 转发链路。
可通过配置 `LegacyNode:Enabled=false` 禁用兼容转发;此时尚未迁移的 API 会返回 `501`
完整的宿主、静态资源、JSON 转发和 Session Cookie 冒烟测试:
```powershell
pwsh.exe -NoLogo -NoProfile -NonInteractive -File .\scripts\smoke-dotnet-migration.ps1
```