-
Notifications
You must be signed in to change notification settings - Fork 862
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
Cannot use .NET Core AWSSDK with WASM #1895
Comments
This issue is broader than just signing requests. Here are a list of the System.Security.Cryptography lib api used in aws-sdk-net that are not currently supported in WASM: To generate this list yourself and explore specific details, follow these steps:
Open the aws-sdk-net/sdk/AWSSDK.NetStandard.sln in Visual Studio. Examine each file for references to the Cryptography library. For each file, comment out the using reference and then look at each reference that code analysis indicates has an error. Compare that reference to the list of api currently supported in the WASM version of the Cryptography library. https://docs.microsoft.com/en-us/dotnet/core/compatibility/cryptography/5.0/cryptography-apis-not-supported-on-blazor-webassembly Any reference not currently supported by the WASM version of the Cryptography library will throw an exception when used in a Blazor client. Perhaps you guys could have a heart-to-heart with the .NET team about this. |
I'm interested in this too. Looks like the runtime issue is here: dotnet/runtime#40074 looks like it got bumped to .NET 7 Perhaps bouncycastle could be used? The portable version might work: https://github.com/novotnyllc/bc-csharp I realize changing to anything else is non-trivial. |
We have noticed this issue has not received attention in 1 year. We will close this issue for now. If you think this is in error, please feel free to comment and reopen the issue. |
Reopening while troubleshooting a scenario from an internal user now that .NET 7 has launched. Targeting .NET 7 (and configuring CORS for my bucket) I am now able to run the following in a Blazor WebAssembly app.
Needing |
@ashovlin -- thanks for sharing/point this work around [this is super exciting given my desire to use the AWS SDK with a Blazor WASM app]! I was able to reproduce this exactly on my end with updating the CORS policy on my target bucket and retrieving data from an object in a bucket, as well as with ListObjectsV2Async. However, if I try some other S3 operations that are not specific to a bucket (which one can enable CORS on -- e.g. ListBuckets) - I get a CORS error. Is this expected? |
AWS SDK uses HmacSHA256 or HmacSHA1 for signing requests depending on the configuration which are not available in WASM
Microsoft plans to introduce HMACSHA* algorithms in .NET 7.
Describe the Feature
Use an alternative signing method for WASM
Is your Feature Request related to a problem?
It would be extremely useful to have AWSSDK .NET Core functions available from Blazor WebAssembly
Proposed Solution
Offer an alternative signing algorithm
Describe alternatives you've considered
Additional Context
Environment
This is a 🚀 Feature Request
The text was updated successfully, but these errors were encountered: