Skip to content
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

DotNet 8 Client Side rendering fails #1701

Closed
genifycom opened this issue Mar 19, 2024 · 3 comments
Closed

DotNet 8 Client Side rendering fails #1701

genifycom opened this issue Mar 19, 2024 · 3 comments
Labels
bug This issue is a bug. closing-soon This issue will automatically close in 4 days unless further comments are made. module/lambda-client-lib response-requested Waiting on additional info and feedback. Will move to close soon in 7 days.

Comments

@genifycom
Copy link

Describe the bug

Ref doc https://learn.microsoft.com/en-us/aspnet/core/blazor/components/integration?view=aspnetcore-8.0

I created a Lambda C# Application with the Server Side Rendering (/welcome) which works fine.
Then I extended it to use the client side rendering (/counter) which works fine when deployed locally, but when run in AWS lambda, blazor.web.js gets a 403 (so does the {APPNAME}.styles.css).

I have LambdaFullAccecss for the IAM role.

How do we get Client Side Rendering working in a Razor Web App in Lambda?

Expected Behavior

To behave as per running locally.

Current Behavior

https://xxxxx.execute-api.us-east-1.amazonaws.com/_framework/blazor.web.js gives a 403 (forbidden)

Reproduction Steps

bv_la_ssr8.zip
Sample project included. Runs in Visual Studio 17.9.3 locally.
When deployed to Lambda (using AWS Toolkit 1.49.0.0) /counter route fails to load blazor.web.js

Possible Solution

Unknown

Additional Information/Context

No response

AWS .NET SDK and/or Package version used

Standard .NET Core sample as per Microsoft

Targeted .NET Platform

.NET Core 8

Operating System and version

Windows 11

@genifycom genifycom added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Mar 19, 2024
@ashishdhingra
Copy link
Contributor

@genifycom Good morning. Thanks for opening the issue. Could you please let us know the publishing or deployment steps you used to deploy your Blazor Web app in Lambda (you mentioned Razor web app, but you are also using Blazor)?
Also refer API Gateway Rest API - 403 Errors Serving Static Content to see if that helps. Is the stage name included in the generated URLs for JS and CSS files?

Thanks,
Ashish

@ashishdhingra ashishdhingra added response-requested Waiting on additional info and feedback. Will move to close soon in 7 days. and removed needs-triage This issue or PR still needs to be triaged. labels Mar 19, 2024
Copy link
Contributor

This issue has not received a response in 5 days. If you want to keep this issue open, please just leave a comment below and auto-close will be canceled.

@github-actions github-actions bot added the closing-soon This issue will automatically close in 4 days unless further comments are made. label Mar 30, 2024
Copy link
Contributor

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. closing-soon This issue will automatically close in 4 days unless further comments are made. module/lambda-client-lib response-requested Waiting on additional info and feedback. Will move to close soon in 7 days.
Projects
None yet
Development

No branches or pull requests

2 participants