Entrambi gli script di deployment sono stati aggiornati alla versione 1.3 con tutte le correzioni applicate.
| Feature | Deploy-ApiServer.ps1 | Deploy-WebDashboard.ps1 | Match |
|---|---|---|---|
| Versione | 1.3 | 1.3 | ? 100% |
| UTF-8 Encoding | ? | ? | ? |
| Guard Variable | DeployApiServerRunning |
DeployWebDashboardRunning |
? |
| Assert-Admin | ? | ? | ? |
| Unicode Icons | ? (???) | ? (???) | ? |
| Has-Command | ? | ? | ? |
| IIS PSDrive Detection | ? Tutte le funzioni | ? Tutte le funzioni | ? |
| ServerManager Fallback | ? | ? | ? |
| Loop Protection | ? | ? | ? |
| State Checking | ? | ? | ? |
| Sleep dopo Stop | 500ms | 500ms | ? |
| Backup Automatico | ? | ? | ? |
| SSL Binding Method | Set-ItemProperty | Set-ItemProperty | ? |
| Convert-ThumbprintToBytes | ? | ? | ? |
| Finally Block | ? | ? | ? |
| Success Message | ? | ? | ? |
| Build Status | ? Successful | ? Successful | ? |
| Elemento | API Server | Web Dashboard |
|---|---|---|
| Site Name | SecureBootDashboard.Api | SecureBootDashboard.Web |
| App Pool | SecureBootDashboard.Api | SecureBootDashboard.Web |
| Host Header | api.yourdomain.com | dashboard.yourdomain.com |
| DLL Name | SecureBootDashboard.Api.dll | SecureBootDashboard.Web.dll |
| Logs | api-*.log | web-*.log |
| Path | API Server | Web Dashboard |
|---|---|---|
| Physical | C:\inetpub\SecureBootDashboard.Api | C:\inetpub\SecureBootDashboard.Web |
| Source | .\SecureBootDashboard.Api\bin\Release\net10.0\publish | .\SecureBootDashboard.Web\bin\Release\net10.0\publish |
Set-WebConfigurationProperty -PSPath "IIS:\Sites\$SiteName" `
-Filter "system.webServer/security/requestFiltering/requestLimits" `
-Name "maxAllowedContentLength" -Value 104857600 # 100 MBSet-WebConfigurationProperty -PSPath "IIS:\Sites\$SiteName" `
-Filter "system.webServer/security/requestFiltering/requestLimits" `
-Name "maxAllowedContentLength" -Value 52428800 # 50 MB
# + Static content caching (7 days)
# + HTTP to HTTPS redirect (optional)- Nessuna funzione specifica aggiuntiva
Set-ApplicationConfiguration- Crea appsettings.Production.json template
- Configura ASPNETCORE_ENVIRONMENT
- Specifico per Razor Pages
Access URLs:
Health: https://api.yourdomain.com/health
Swagger: https://api.yourdomain.com/swagger
API Base: https://api.yourdomain.com/apiAccess URL:
https://dashboard.yourdomain.com- UTF-8 console encoding
- Re-execution guard
- Infinite loop protection
- Admin elevation check
- WebAdministration detection
- IISAdministration fallback
- IIS: PSDrive checking
- ServerManager API usage
| Function | API | Web | Purpose |
|---|---|---|---|
| Assert-Admin | ? | ? | Check admin rights |
| Write-Step | ? | ? | Section headers |
| Write-Success | ? | ? | Success messages |
| Write-Info | ? | ? | Info messages |
| Test-Prerequisites | ? | ? | System checks |
| Has-Command | ? | ? | Command availability |
| New-ApplicationPool | ? | ? | Create app pool |
| Copy-*Files | ? | ? | Deploy files |
| Convert-ThumbprintToBytes | ? | ? | SSL cert helper |
| New-*Website | ? | ? | Create website |
| Set-WebConfiguration | ? | ? | Configure IIS |
| Start-WebSite | ? | ? | Start services |
| Test-WebSite | ? | ? | Verify deployment |
| Show-Summary | ? | ? | Display results |
- Try-catch-finally blocks
- Meaningful error messages
- Stack trace on failure
- Guard cleanup guaranteed
| Parameter | API | Web | Default API | Default Web |
|---|---|---|---|---|
| SiteName | ? | ? | SecureBootDashboard.Api | SecureBootDashboard.Web |
| AppPoolName | ? | ? | SecureBootDashboard.Api | SecureBootDashboard.Web |
| PhysicalPath | ? | ? | C:\inetpub...\Api | C:\inetpub...\Web |
| HostHeader | ? | ? | api.yourdomain.com | dashboard.yourdomain.com |
| HttpsPort | ? | ? | 443 | 443 |
| HttpPort | ? | ? | 80 | 80 |
| SslCertificateThumbprint | ? | ? | (optional) | (optional) |
| SourcePath | ? | ? | ...\Api...\publish | ...\Web...\publish |
| EnableHttpRedirect | ? | ? | switch | switch |
| CreateHttpBinding | ? | ? | switch | switch |
| WhatIf | ? | ? | switch | switch |
-
Initialization
- Set UTF-8 encoding
- Check guard variable
- Set guard variable
-
Prerequisite Checks
- Verify admin rights
- Check IIS installed
- Check IIS modules
- Check ASP.NET Core Module
- Check source files
- Check SSL certificate (optional)
-
Application Pool
- Create or reuse app pool
- Configure runtime (No Managed Code)
- Configure identity
- Configure startup settings
-
File Deployment
- Stop app pool
- Create backup
- Copy new files
- Create logs directory
-
Website Creation
- Remove existing (optional)
- Create new website
- Configure bindings
- Bind SSL certificate
-
Configuration
- Set request limits
- Configure compression
- Configure logging
- Configure caching (Web only)
- Configure app settings (Web only)
-
Startup
- Start app pool
- Start website
- Wait for initialization
-
Verification
- Test endpoint
- Report status
-
Summary
- Display configuration
- Show access URLs
- List next steps
- Show troubleshooting info
-
Cleanup
- Clear guard variable
- Display success message
- Exit cleanly
| Metric | Value | Status |
|---|---|---|
| PowerShell Version | 5.1+ | ? |
| .NET Core Support | 10.0 | ? |
| Unicode Support | Full | ? |
| Error Handling | Complete | ? |
| Loop Protection | Yes | ? |
| State Validation | Yes | ? |
| Build Status | Success | ? |
| Syntax Errors | 0 | ? |
| Documentation | Complete | ? |
| Version | 1.3 | ? |
.\scripts\Deploy-ApiServer.ps1 `
-HostHeader "api.yourdomain.com" `
-SslCertificateThumbprint "THUMBPRINT".\scripts\Deploy-WebDashboard.ps1 `
-HostHeader "dashboard.yourdomain.com" `
-SslCertificateThumbprint "THUMBPRINT"-WhatIf # Dry run
-CreateHttpBinding # Add HTTP binding
-EnableHttpRedirect # Redirect HTTP?HTTPS
-PhysicalPath "custom" # Custom install path
-HttpsPort 8443 # Custom HTTPS port- ? All fixes applied
- ? Production ready
- ? Fully documented
- ? Build successful
- ? Tested and verified
- ? All fixes applied
- ? Production ready
- ? Fully documented
- ? Build successful
- ? Tested and verified
- ? 100% feature parity (core features)
- ? Identical error handling
- ? Identical loop protection
- ? Identical module support
- ? Appropriate differences (by design)
DEPLOY_APISERVER_INFINITE_LOOP_FIX.mdDEPLOY_APISERVER_INFINITE_LOOP_FIX_QUICKREF.mdDEPLOY_APISERVER_UTF8_ENCODING_FIX.mdEMERGENCY_STOP_INFINITE_LOOP.md
DEPLOY_WEBDASHBOARD_FIXES_TODO.mdDEPLOY_WEBDASHBOARD_APPLY_FIXES.mdDEPLOY_WEBDASHBOARD_FIXES_APPLIED.mdDEPLOY_WEBDASHBOARD_STATUS_IT.mdDEPLOY_WEBDASHBOARD_COMPLETE.md
DEPLOY_SCRIPTS_COMPARISON_V1.3.md(questo file)
Entrambi gli script sono ora alla versione 1.3 con:
- ? Tutte le correzioni applicate
- ? Parità funzionale completa
- ? Differenze appropriate per scopo
- ? Documentazione completa
- ? Pronti per produzione
Status: ? Production Ready Match Core Features: ? 100% Quality: ? Enterprise Grade