Error: Operation is not supported on this platform in ASP.NET Core 2.0 application
See original GitHub issueRestClient client;
client = new RestClient(Configuration.APIUrl);
client.Authenticator = new HttpBasicAuthenticator(Configuration.Username, Configuration.Password);
RestRequest request = new RestRequest(Configuration.EndPoints.Clients, Method.GET);
IRestResponse<ClientResult> response = client.Execute<ClientResult>(request);
if (response.StatusCode != System.Net.HttpStatusCode.OK)
{
if (response.ErrorException != null)
{
throw new Exception(response.ErrorMessage); // Error: Operation is not supported on this platform
}
}
Expected Behavior
Get the actual result in json, same call is working fine with HttpClient and in Postman
Actual Behavior
Error: Operation is not supported on this platform
Steps to Reproduce the Problem
Simple rest call setup
Specifications
ASP.NET Core 2.0 console application
StackTrace
```
at System.Net.SystemWebProxy.GetProxy(Uri destination)
at System.Net.ServicePointManager.ProxyAddressIfNecessary(Uri& address, IWebProxy proxy)
at System.Net.ServicePointManager.FindServicePoint(Uri address, IWebProxy proxy)
at System.Net.HttpWebRequest.get_ServicePoint()
at RestSharp.Http.ConfigureWebRequest(String method, Uri url)
at RestSharp.Http.GetStyleMethodInternal(String method)
at RestSharp.RestClient.Execute(IRestRequest request, String httpMethod, Func`3 getResponse)
```
Issue Analytics
- State:
- Created 6 years ago
- Comments:16 (8 by maintainers)
Top Results From Across the Web
Operation is not supported on this platform" in a .NET Core ...
I made a POST request that works well with 106.2.2. Actual Behavior. I received the same "Operation is not supported on this platform."...
Read more >System.PlatformNotSupportedException in .NET Core 2.0
I'm trying to compile an application made in .NET Core 2.0 but every time I try to login the post method throws the...
Read more >Operation is not supported on this platform - Microsoft Q&A
the "Operation is not supported on this platform" error means the function was ported to .net core, but requires O/S support and was...
Read more >.NET core vs .NET framework
NET Core is used to create server applications that run on Windows, Linux and Mac. It does not currently support creating desktop applications...
Read more >.NET Core 3 Reporting - "Operation is not supported on this ...
I'm migrating my solution to net core 3, when I try to edit a report or print a report, it gives me an...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I can verify that 106.0.0-alpha0284 solves the problem. However, it is still present in later builds; e.g. 106.2.0-alpha0060.
No proxy server @alexeyzimarev. I’m on a Mac using Visual Studio for Mac. I copied the details to a new issue.