Issue: PlatformNotSupportedException #75

Closed
opened 2025-12-29 14:22:01 +01:00 by adam · 4 comments
Owner

Originally created by @alexangas on GitHub (Mar 8, 2018).

Originally assigned to: @StefH on GitHub.

Hello,

Just tried creating a new console app with WireMock 1.3.4 on .NET Framework 4.6.1 using lowest NuGet dependencies. Unfortunately when running with the following code...

var server = FluentMockServer.Start();
server.Given(
        Request.Create()
    )
    .RespondWith(
        Response.Create().WithProxy("http://10.10.66.65")
    );

... this exception occurs:

System.PlatformNotSupportedException: Operation is not supported on this platform.
   at WireMock.Http.HttpClientHelper.CreateHttpClient(String clientX509Certificate2ThumbprintOrSubjectName)
   at WireMock.ResponseBuilders.Response.WithProxy(String proxyUrl, String clientX509Certificate2ThumbprintOrSubjectName)
   at WireMockNet461.Program.Main(String[] args) in C:\Users\alexangas\source\repos\WireMockNet_461\WireMockNet_461\Program.cs:line 17

I've tried every version of .NET from 4.6.1 to 4.7.1 and they have the same issue. Cannot reproduce with .NET Core. Also have tried updating all of the NuGet packages. Last version of WireMock I was using successfully was 1.0.2.11.

Originally created by @alexangas on GitHub (Mar 8, 2018). Originally assigned to: @StefH on GitHub. Hello, Just tried creating a new console app with WireMock 1.3.4 on .NET Framework 4.6.1 using lowest NuGet dependencies. Unfortunately when running with the following code... ```csharp var server = FluentMockServer.Start(); server.Given( Request.Create() ) .RespondWith( Response.Create().WithProxy("http://10.10.66.65") ); ``` ... this exception occurs: ``` System.PlatformNotSupportedException: Operation is not supported on this platform. at WireMock.Http.HttpClientHelper.CreateHttpClient(String clientX509Certificate2ThumbprintOrSubjectName) at WireMock.ResponseBuilders.Response.WithProxy(String proxyUrl, String clientX509Certificate2ThumbprintOrSubjectName) at WireMockNet461.Program.Main(String[] args) in C:\Users\alexangas\source\repos\WireMockNet_461\WireMockNet_461\Program.cs:line 17 ``` I've tried every version of .NET from 4.6.1 to 4.7.1 and they have the same issue. Cannot reproduce with .NET Core. Also have tried updating all of the NuGet packages. Last version of WireMock I was using successfully was 1.0.2.11.
adam added the question label 2025-12-29 14:22:01 +01:00
adam closed this issue 2025-12-29 14:22:01 +01:00
Author
Owner

@StefH commented on GitHub (Mar 8, 2018):

I cannot reproduce, can you take a look at the new example (WireMock.Net.StandAlone.Net461) which uses the NuGet?

@StefH commented on GitHub (Mar 8, 2018): I cannot reproduce, can you take a look at the new example (WireMock.Net.StandAlone.Net461) which uses the NuGet?
Author
Owner

@alexangas commented on GitHub (Mar 8, 2018):

I'm away from a machine right now but noticed browsing the linked commit that it's targeting 4.5.2. I didn’t try below 4.6.1 - maybe it works in that version?

@alexangas commented on GitHub (Mar 8, 2018): I'm away from a machine right now but noticed browsing the linked commit that it's targeting 4.5.2. I didn’t try below 4.6.1 - maybe it works in that version?
Author
Owner

@StefH commented on GitHub (Mar 8, 2018):

Indeed, I get same error. I'll investigate.

@StefH commented on GitHub (Mar 8, 2018): Indeed, I get same error. I'll investigate.
Author
Owner

@StefH commented on GitHub (Mar 9, 2018):

Will be solved in 1.0.3.7

@StefH commented on GitHub (Mar 9, 2018): Will be solved in 1.0.3.7
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/WireMock.Net-wiremock#75