MapRazorComponents was causing 'Assembly already defined' error.
Fallback to MapFallbackToFile for static admin/index.html serving.
- Removed MapRazorComponents registration from Program.cs
- Keep MapFallbackToFile for SPA routing
- HTML with MudBlazor/admin.css loads correctly via fallback
Verified locally: HTTP 200, all assets present.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Restore admin/index.html with all required stylesheets and scripts:
* MudBlazor CSS/JS
* Material Icons
* Google Fonts
* Admin CSS
* Loading spinner and error UI
- Remove unsupported Portal MapFallbackToFile that referenced non-existent portal/index.html
This fixes the incomplete page rendering (542 bytes → proper HTML size).
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Keep only Admin WASM client registration with correct namespace:
- TaxBaik.WasmClient.Components.Admin.App
- TaxBaik.WasmClient._Imports
Remove Portal client registration since Portal.Client is not configured
for WASM rendering.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Problem:
- app.Run() after app services are disposed
- Catch block tried to access app.Services.CreateScope()
- Result: System.ObjectDisposedException
Solution:
- Use await app.RunAsync() instead of app.Run()
- Remove Telegram error notification from catch block
- Services are disposed after app exits, so notifications must be background tasks
Impact:
✓ App startup succeeds
✓ Sitemap and RSS feed work
✓ Admin login functional
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
The request reached the end of the pipeline - critical fix.
Added root path mapping to redirect to /taxbaik/
This ensures the root endpoint is handled.
Emergency deployment to fix production 500 error.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
URGENT FIX:
The request reached the end of the pipeline without executing the endpoint
Root cause:
- UseBlazorFrameworkFiles was positioned AFTER UseRouting
- This caused WASM files to not be intercepted properly
- Result: 500 error on all requests, admin login completely broken
Solution:
Correct order (ASP.NET Core pipeline):
1. UsePathBase
2. UseResponseCompression
3. UseBlazorFrameworkFiles (WASM files) ← MUST be BEFORE UseRouting
4. UseStaticFiles (static assets)
5. UseSession
6. UseRouting ← Now in correct position
7. UseExceptionHandler
8. UseRateLimiter, UseAuthentication, UseAuthorization, UseAntiforgery
9. Map* (endpoints)
10. MapFallbackToFile (SPA fallback, LAST)
Critical: Middleware order is pipeline execution order.
UseBlazorFrameworkFiles must run BEFORE routing to intercept WASM requests.
This fixes:
✓ 500 InvalidOperationException
✓ Admin login page WASM loading
✓ All static WASM files (_framework/)
✓ Portal login page
✓ Razor Pages (Sitemap, RSS)
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Changes:
- Rss.cshtml: Fixed Razor/XML syntax by using StringBuilder
- Feed.cshtml: Alias for /feed.xml
- Both pages use RssModel (BlogService)
- robots.txt: Added feed references
Fix:
- Removed @page duplicate directive
- Used StringBuilder for proper XML generation
- Avoided Razor XML tag nesting issues
- Both /rss.xml and /feed.xml now available
URLs:
✓ https://www.taxbaik.com/taxbaik/rss.xml
✓ https://www.taxbaik.com/taxbaik/feed.xml
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Order is critical:
1. UseBlazorFrameworkFiles (middleware)
2. MapControllers/MapFastEndpoints (specific routes)
3. MapRazorPages (Sitemap.cshtml matches here)
4. MapFallbackToFile (catch-all last)
This prevents /taxbaik/sitemap.xml from being caught by admin fallback.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Problem:
- UseBlazorFrameworkFiles/UseStaticFiles were AFTER Map* routes
- This caused 'request reached end of pipeline' 500 error
Solution:
- Move app.Use* (middleware) BEFORE app.Map* (routing)
- Blazor framework files now properly served at /admin/_framework
- Portal SPA fallback working correctly
Middleware order is critical:
1. app.Use* (processing order)
2. app.Map* (routing rules)
3. app.Run() (final endpoint)
Fixes: 500 error on /admin/_framework/blazor.webassembly.js
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- @page "/sitemap.xml" (explicitly named route)
- Accessible at /taxbaik/sitemap.xml for search engines
- Matches robots.txt sitemap reference
- Dynamic content from DB on every request
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Delete wwwroot/sitemap.xml (static file blocking dynamic)
- Sitemap.cshtml now generates fresh URLs from DB on every request
- Includes blog posts, FAQ, announcements, contact pages
- Portal and admin pages remain excluded from robots.txt
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Change from AddInteractiveWebAssemblyRenderMode() to AddInteractiveServerRenderMode()
- Project structure doesn't support WebAssembly hosting model yet
- Server render mode uses existing Blazor Server infrastructure
- Fixes 404 errors and infinite loading screen
This is a temporary fix to restore admin functionality.
WebAssembly migration can be done in a separate phase with proper project restructuring.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Add AddAdditionalAssemblies(typeof(TaxBaik.Web.Components.Admin._Imports).Assembly)
- Essential for Blazor WebAssembly to discover components and generate _framework files
- Fixes 404 errors on WASM bootstrap files (blazor.webassembly.js, dotnet.wasm, etc)
This resolves the infinite loading screen after admin login.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Load Google Fonts asynchronously using media="print" + onload
- Add noscript fallback for non-JavaScript environments
- Prevents blocking Blazor WASM initialization
This fixes the loading screen freeze issue where fonts
from Google CDN were blocking WASM bootstrap completion.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Changed test message from "문의합니다." (5 chars) to
"사업자 세무 관련해서 문의드립니다." (18 chars) to comply
with the new 10-character minimum message length validation.
All tests now pass: 26/26 ✓
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Add SameSite=Lax to session cookie
- Add SecurePolicy=SameAsRequest for proxy compatibility
- Explicitly configure Antiforgery cookie with same settings
- Resolves antiforgery token validation failures on HTTPS
This fixes the "required antiforgery cookie is not present" error
that occurs when behind Nginx reverse proxy with HTTPS.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Add [Required], [StringLength], [RegularExpression] to all fields
- Name: Required, max 100 characters
- Phone: Required, Korean phone number regex validation
- Email: Optional, email format validation
- ServiceType: Optional, max 50 characters
- Message: Required, 10-5000 characters
- Status (UpdateInquiryDto): Required
- AdminMemo: Optional, max 1000 characters
Provides automatic validation at DTO layer via DataAnnotations.
All error messages are user-friendly in Korean.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Backend: MinMessageLength=10, MaxMessageLength=5000
- Frontend: Real-time character counter
- Frontend: Client-side validation before submission
- Frontend: Error messages for length violations
- Applied to both Submit and Update operations
Prevents empty or excessively long messages while maintaining
user-friendly feedback on character count.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Add comprehensive Korean phone number regex validation
- Support all area codes: 02, 031-064, 070, 0505-0509
- Support all mobile carriers: 010-019
- Intelligent formatting based on area code (2-3 digits)
- Client-side JavaScript: real-time formatting + validation
- Backend C#: robust validation + formatting for storage
Handles all Korean phone number formats:
- Landline: 02-123-4567, 031-1234-5678
- Mobile: 010-1234-5678
- VoIP: 070-1234-5678, 0505-1234-5678
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- 10-digit numbers: XXXX-XXX-XXXX (4-3-3) - landline format
- 11-digit numbers: XXX-XXXX-XXXX (3-4-4) - mobile format
Apply consistent formatting on both frontend and backend.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Add real-time phone number formatting (XXX-XXXX-XXXX pattern)
- Validate phone length (10-11 digits) before form submission
- Show validation error message to user
- Only numeric input allowed with auto-formatting
- Improves UX: users see formatted result immediately
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Accept phone numbers with or without hyphens/spaces (01012345678, 010-1234-5678, etc)
- Auto-format to standard 010-XXXX-XXXX or 010-XXXX-XXXXX format on backend
- Remove strict regex validation that forced user input format
- Better UX: accept user input as-is and normalize in backend
Closes issue with phone number validation being too strict.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>