Why is this HttpClient usage giving me an “Cannot access a disposed object.” error?

Ok after a bit of research i found the issue. The HttpClientHandler will get disposed after the first request. You need to instruct your system not to dispose the handler.

Change your using to add false to the constructor.

using (var client = new HttpClient(handler, false))
{

}

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)