neozhu / cleanaspire

A modern .NET 9 Minimal API and Blazor WebAssembly PWA template following Clean Architecture principles for scalable and maintainable web applications. This is a new attempt to leverage the latest technologies and architectural best practices to create a highly efficient and modular project structure.
https://cleanaspire.blazorserver.com/
MIT License
36 stars 7 forks source link

Runtime Errors #6

Open 274188A opened 6 days ago

274188A commented 6 days ago

Fetch event handler is recognized as no-op. No-op fetch handler may bring overhead during navigation. Consider removing the handler if possible. assetsCache.ts:30 dotnet Loaded 21.94 MB resourcesThis application was built with linking (tree shaking) disabled. Published applications will be significantly smaller if you install wasm-tools workload. See also https://aka.ms/dotnet-wasm-features blazor.webassembly.js:1 Debugging hotkey: Shift+Alt+D (when application has focus) invoke-js.ts:242 info: System.Net.Http.HttpClient.apiservice.LogicalHandler[100] Start processing HTTP request GET https://localhost:7341/identity/profile invoke-js.ts:242 info: System.Net.Http.HttpClient.apiservice.ClientHandler[100] Sending HTTP request GET https://localhost:7341/identity/profile :50083/:1 Access to fetch at 'https://localhost:7341/identity/profile' from origin 'https://localhost:50083' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled. :7341/identity/profile:1

    Failed to load resource: net::ERR_FAILED

invoke-js.ts:242 info: Microsoft.AspNetCore.Authorization.DefaultAuthorizationService[2] Authorization failed. These requirements were not met: DenyAnonymousAuthorizationRequirement: Requires an authenticated user. invoke-js.ts:242 info: Microsoft.AspNetCore.Authorization.DefaultAuthorizationService[2] Authorization failed. These requirements were not met: DenyAnonymousAuthorizationRequirement: Requires an authenticated user. invoke-js.ts:242 info: Microsoft.AspNetCore.Authorization.DefaultAuthorizationService[2] Authorization failed. These requirements were not met: DenyAnonymousAuthorizationRequirement: Requires an authenticated user. invoke-js.ts:242 info: System.Net.Http.HttpClient.apiservice.LogicalHandler[100] Start processing HTTP request POST https://localhost:7341/login? invoke-js.ts:242 info: System.Net.Http.HttpClient.apiservice.ClientHandler[100] Sending HTTP request POST https://localhost:7341/login? signin:1 Access to fetch at 'https://localhost:7341/login?useCookies=true&useSessionCookies=false' from origin 'https://localhost:50083' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled. :7341/login?useCookies=true&useSessionCookies=false:1

    Failed to load resource: net::ERR_FAILED

invoke-js.ts:242 info: System.Net.Http.HttpClient.apiservice.LogicalHandler[100] Start processing HTTP request POST https://localhost:7341/login? invoke-js.ts:242 info: System.Net.Http.HttpClient.apiservice.ClientHandler[100] Sending HTTP request POST https://localhost:7341/login? signin:1 Access to fetch at 'https://localhost:7341/login?useCookies=true&useSessionCookies=false' from origin 'https://localhost:50083' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled. :7341/login?useCookies=true&useSessionCookies=false:1

    Failed to load resource: net::ERR_FAILED

invoke-js.ts:242 info: System.Net.Http.HttpClient.apiservice.LogicalHandler[100] Start processing HTTP request POST https://localhost:7341/login? invoke-js.ts:242 info: System.Net.Http.HttpClient.apiservice.ClientHandler[100] Sending HTTP request POST https://localhost:7341/login? signin:1 Access to fetch at 'https://localhost:7341/login?useCookies=true&useSessionCookies=false' from origin 'https://localhost:50083' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled. :7341/login?useCookies=true&useSessionCookies=false:1

    Failed to load resource: net::ERR_FAILED
neozhu commented 6 days ago

To be honest, I'm not very familiar with the runtime environment of Aspire, and I'm unsure how to perfectly resolve this cross-origin issue using Service Discovery. If you have any helpful suggestions or are willing to submit a PR, I would greatly appreciate it.

274188A commented 5 days ago

https://github.com/neozhu/cleanaspire/pull/7