Add missing directory creation to fix certificate export issue. - #593
Merged
Damian Edwards (DamianEdwards) merged 1 commit intoDec 2, 2024
Conversation
9 tasks
Author
Maksim (yellow444)
marked this pull request as ready for review
November 27, 2024 04:48
Member
|
Thanks for this. I actually found this too when updating the Node sample to use the dev cert as you can see at: https://github.com/dotnet/aspire-samples/blob/cc0d6b4c28d1f664e74eeccb911c7f23c2950510/samples/Shared/DevCertHostingExtensions.cs#L103-L108 I'll merge this in and when I circle back to the Keycloak sample I'll update it to use the now committed shared logic. |
Damian Edwards (DamianEdwards)
merged commit Dec 2, 2024
e20ba38
into
microsoft:damianedwards/keycloak-sample
David Pine (IEvangelist)
pushed a commit
that referenced
this pull request
Jul 30, 2026
…st-uri, protobufjs) Clears 14 Dependabot alerts via verified clean single-entry lockfile swaps (deps unchanged, parent ranges satisfied, integrity cross-verified vs npmjs SHA-1): - brace-expansion 5.0.5 -> 5.0.7 x9 roots (#590,#592,#593,#594,#595,#596,#597,#598,#599) - brace-expansion 2.1.1 -> 2.1.2 aspire-with-node/api (#655) - brace-expansion 2.0.3 -> 2.1.2 and 1.1.13 -> 1.1.16 aspire-with-node/frontend (#658,#657) - fast-uri 3.1.3 -> 3.1.4 AspireJavaScript.React (#626) - protobufjs 7.6.4 -> 7.6.5 polyglot-task-queue/api (#615) Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
David Pine (IEvangelist)
pushed a commit
that referenced
this pull request
Jul 31, 2026
…st-uri, protobufjs) Clears 14 Dependabot alerts via verified clean single-entry lockfile swaps (deps unchanged, parent ranges satisfied, integrity cross-verified vs npmjs SHA-1): - brace-expansion 5.0.5 -> 5.0.7 x9 roots (#590,#592,#593,#594,#595,#596,#597,#598,#599) - brace-expansion 2.1.1 -> 2.1.2 aspire-with-node/api (#655) - brace-expansion 2.0.3 -> 2.1.2 and 1.1.13 -> 1.1.16 aspire-with-node/frontend (#658,#657) - fast-uri 3.1.3 -> 3.1.4 AspireJavaScript.React (#626) - protobufjs 7.6.4 -> 7.6.5 polyglot-task-queue/api (#615) Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
David Pine (IEvangelist)
pushed a commit
that referenced
this pull request
Aug 3, 2026
…st-uri, protobufjs) Clears 14 Dependabot alerts via verified clean single-entry lockfile swaps (deps unchanged, parent ranges satisfied, integrity cross-verified vs npmjs SHA-1): - brace-expansion 5.0.5 -> 5.0.7 x9 roots (#590,#592,#593,#594,#595,#596,#597,#598,#599) - brace-expansion 2.1.1 -> 2.1.2 aspire-with-node/api (#655) - brace-expansion 2.0.3 -> 2.1.2 and 1.1.13 -> 1.1.16 aspire-with-node/frontend (#658,#657) - fast-uri 3.1.3 -> 3.1.4 AspireJavaScript.React (#626) - protobufjs 7.6.4 -> 7.6.5 polyglot-task-queue/api (#615) Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR addresses issue #416 related to an error that occurs during certificate export when the specified directory does not exist. The issue was caused by the lack of a check or creation step for the directory before attempting to export the certificate.
Root Cause
When exporting the certificate, the CertificateManager throws a System.InvalidOperationException if the target directory is missing. The error message highlights that the directory does not exist and emphasizes the need for careful permission settings when creating it.
Fix
Impact
This change prevents the InvalidOperationException and ensures smooth certificate export without requiring manual intervention to create the directory. It also aligns the process with best practices for error handling and directory management.
Testing
Additional Notes
This fix improves usability and reliability when working with certificate export functionalities. Feedback and further suggestions are welcome!