-
Notifications
You must be signed in to change notification settings - Fork 475
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow "Blazor Web App" to run in Interactive Render Mode Webassembly in Lambda #1753
Comments
Do you need any further information on this item? |
This really is a huge problem for us. Blazor CSR can only be deployed in an S3 bucket which means we do not have the control over it like a Lambda process. AWS Lambda has been the most successful deployment strategy and we really do not want to have to give it up! |
Any further questions? |
I have finally been able to publish a Webassembly Dotnet application to Lambda but there are additional issues.
Here is an example Console log API Gateway does return the correct Content-Type as application/wasm
Can anyone suggest how to workaround these issue? Thanks |
This was solved by adding wasm extension to the list of default content types for base 64 encoding by the Lambda function. #1794 |
Comments on closed issues are hard for our team to see. |
Describe the feature
In .Net 8 if you create a "Blazor Web App" with Interactive Render Mode WebAssembly you will get two projects. The Server side rendered project (SSR) and the client WebAssembly project (CSR).
If you convert this to a Lambda Application, then it runs correctly locally. When deployed to Lambda, the SSR part works correctly (as it is all generated on the server) but the Client Webassembly part does not (CSR).
This is because the Client tries to download the WASM files and runs into an issue.
In Chrome Dev tools -> Network -> WASM
It downloads 27 wasm files correctly but when it gets to dotnet.native.wasm it fails with a 500 error.
This file is in the wwwroot/_framework directory and dotnet.native.wasm is 2.78 MB (2,917,966 bytes) in size.
I supposed it is possible that this WASM file when converted to base64 exceeds what lambda can supply in a payload.
But after this 500 error, the rest of the WASM files do not download so the client web assembly application fails.
This is hugely disappointing since this only allows Blazor Web App SSR to run in lambda which is very limiting.
Use Case
Want the lambda function to use both SSR and CSR pages so that Webassembly can be leveraged from Lambda.
Proposed Solution
Increase the lambda payload to allow Blazor CSR rendering to run correctly.
Other Information
NOTE: This is not using Blazor Server at all. Only Server side rendering and Webassembly rendering. There are no web sockets involved at all.
Acknowledgements
AWS .NET SDK and/or Package version used
All most recent non-preview version.
Targeted .NET Platform
Operating System and version
Windows 11
The text was updated successfully, but these errors were encountered: