Skip to main content
Filter by
Sorted by
Tagged with
0 votes
2 answers
118 views

I'm getting multiple intermittent 'Socket Exception' error while using httpclient(IHttpClientFactory DI Implementation) . As per MS documentation, A new HttpClient instance is returned each time ...
Nishad's user avatar
  • 35
1 vote
1 answer
80 views

I have .netstandard2.0 project which is used by two projects. One is .net core project and one is .netframework4.7.1. I'm getting "PlatformNotSupportedException" for HttpClientHandler....
Nishad's user avatar
  • 35
0 votes
1 answer
42 views

The "*" are my credentials to log in, and are set to variables. When I run the code, my returned value is a string stating my conditional statement, else value. I am pretty sure I am ...
ワッツアンドレ's user avatar
0 votes
0 answers
29 views

I am using a custom server validation callback based on this example private void InitServices(IHostBuilder builder, ...) { ... builder .ConfigureServices((context, services) => { ...
RickyTad's user avatar
  • 371
0 votes
0 answers
143 views

I have a basic setup for Push Delivery, they are working fine without proxy. I tried to add a proxy setting but couldn't manage to make it work. I am using below function to deliver push notifications:...
seneill's user avatar
  • 83
1 vote
1 answer
733 views

I have a custom HttpClientHandler class which inherits from HttpClientHandler and for most scenarios it is used with the HttpClient as var client = new HttpClient(new CustomHttpClientHandler()) and it ...
Mohaned Mohamed's user avatar
2 votes
0 answers
1k views

I need to send data to a webapi which needs a certificate to authorize. This is working on .net 4.5.2 with WebRequestHandler but when I try to upgrade to dotnet 5 and using HttpClientHandler I got an ...
Shalom Dahan's user avatar
2 votes
0 answers
281 views

My client application calls an Azure App Service with HttpClient Something like this: HttpClientHandler handler = new HttpClientHandler(); if (I detect a certificate is needed) { httpClientHandler....
user2081514's user avatar
0 votes
1 answer
2k views

I'm using Xamarin, in VS 2022, class libraries targeting .NetStanderd2.1, for Android. I'd like to implement an HttpCient with custom SSL certificate validation. Here's my code: var httpClientHandler =...
balintn's user avatar
  • 1,533
0 votes
1 answer
183 views

We have written an application that connects with an external API. You need to have a Token to communicate with this api. The token have to be unique for each user. To obtain a token we need to call ...
Doomic's user avatar
  • 357
1 vote
0 answers
239 views

I have the following function written in c#: public static string FunctionName() { try { using (var httpClient = new HttpClient()) { var uri = new Uri("https://...
pr0b's user avatar
  • 377
1 vote
0 answers
3k views

I'm trying to implement a method for ServerCertificateCustomValidationCallback for an instance of HttpClientHandler class. I'm at a loss here because I don't know what to validate. I need to send a ...
Mari Faleiros's user avatar
1 vote
0 answers
339 views

issue in .net 5 that not happen in .net core 3.1 the windows authentication didn't pass to HttpClient this same code that work on .net core 3.1 : [HttpGet("getuser")] public async Task<...
kfir's user avatar
  • 21
0 votes
0 answers
704 views

I work on an existing Xamarin.Forms app, where we need to integrate API calls to external providers. For this, we use my client's custom HttpClient library. Until now, the Android HttpClient was set ...
Gold.strike's user avatar
  • 1,297
0 votes
0 answers
131 views

I have Integration Tests failing when run at once, but pass if run separately. The tests are for Service 1 which initializes dependent Service 2. Service 2 receives HttpClientHandler through DI where ...
aka17's user avatar
  • 83
1 vote
1 answer
601 views

async void GetLieu(string place) { ShowProgressDialogue("Récupération des données..."); string MonURL = "https://hubeau.eaufrance.fr/api/v1/...
michael's user avatar
  • 25
11 votes
2 answers
7k views

I have HttpClient httpClient injected from outside of my class. Inside my class I'm creating a new HttpClientHandler var handler = new HttpClientHandler() and setting its values. I need to link ...
Mariusz Ignatowicz's user avatar
1 vote
1 answer
536 views

I am using .NET Core 3.1. On Startup, I am adding the following: public void ConfigureServices(IServiceCollection services) { services.AddHttpClient<IApns, Apns>()....
Pea Kay See Es's user avatar
13 votes
2 answers
6k views

When working with a HttpClient instance and HttpClientHandler instance (.Net Framework, not using Core), is it possible to access the HttpClientHandler instance/its properties later in any way (for ...
cty's user avatar
  • 407
0 votes
1 answer
2k views

.net Standard 1.3 means -> no WebProxy library. So I have created one, here it is : public class WebProxy : IWebProxy, ISerializable { private readonly ArrayList _bypassList; ...
Nicole Milea's user avatar
1 vote
1 answer
1k views

Writing a dotnet core app. I need to log in with network credentials as the service (which happens to be a TFS on-prem server) uses those to authenticate. From my (and another team members') windows ...
ejbaum's user avatar
  • 73
10 votes
1 answer
5k views

With HttpClientHandler, we are able to set a server validation callback and return true (by writing it out or using DangerousAcceptAnyServerCertificateValidator). How can I ensure that I bypass this ...
djsoteric's user avatar
  • 326
1 vote
1 answer
597 views

I am trying to execute HttpClient.GetAsync in a loop. As per Microsoft Doc, it is recommended to use 1 instance of HttpClient. The way I'm getting HttpClient is var httpClient = ...
Alen Alex's user avatar
  • 1,011
5 votes
0 answers
3k views

Using HttpClient is not as straight forward as I would've hoped. Despite it being an IDisposable type it is not best practice to wrap it in a using statement and it's even ideal to make it a ...
Sam's user avatar
  • 27.4k