mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-11 21:10:32 +01:00
Aspire external resource stubbing #725
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @weitzhandler on GitHub (Nov 12, 2025).
Hi,
I'm working on an Aspire solution with multiple projects.
I want to take control of the entire
DistributedApplicationcluster (I useDistributedApplicationTestingBuilder.CreateAsyncto create it), so that whenever a webpage is requested from the web that falls under the configured criteria (e.g. via matchers etc.), it should return the customized response.Is this possible with the current implementation?
@weitzhandler commented on GitHub (Nov 17, 2025):
This worked, however it only works for HTTP:
Consumer API Program.cs:
As soon as the URL is changed to HTTPS,
GetAsyncthrows the following exception:System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception.
Stack trace:
Inner exception:
System.Security.Authentication.AuthenticationException: Cannot determine the frame size or a corrupted frame was received.
Stack trace:
@weitzhandler commented on GitHub (Nov 18, 2025):
What I ended up doing is I added a delegating handler in the client side (only if environment is development) that changes the URL scheme to
httpand changes port to non-secure if needed.@weitzhandler commented on GitHub (Nov 19, 2025):
@StefH
Any ways to use WM with HTTPS?