• 27-12-2021, 00:56:36
    #1
    Kimlik doğrulama veya yönetimden onay bekliyor.
    bunu nasıl düzeltebilirim bir çözümü var mı lütfen yardımcı olun
  • 27-12-2021, 01:01:37
    #2
    Sürekli SSL request atmayın ya da exception ekleyip bir şey yazdırmayın.
  • 27-12-2021, 01:02:36
    #3
    httpclient konfigurasyonlarınızı paylaşırsanız daha detaylı çözümler önerebiliriz
  • 27-12-2021, 01:05:08
    #4
    Aramızdan Ayrılanlar - Vefat
    RipRi adlı üyeden alıntı: mesajı görüntüle
    httpclient konfigurasyonlarınızı paylaşırsanız daha detaylı çözümler önerebiliriz
    public static class HttpClientExtensions
    {
    public static async Task DownloadAsync(this HttpClient client, string requestUri, Stream destination, IProgress<float>? progress = null, CancellationToken cancellationToken = default)
    {
    // Get the http headers first to examine the content length
    var response = await client.GetAsync(requestUri, HttpCompletionOption.ResponseHeadersRead);
    var contentLength = response.Content.Headers.ContentLength;
    await using var download = await response.Content.ReadAsStreamAsync();

    // Ignore progress reporting when no progress reporter was
    // passed or when the content length is unknown
    if (progress == null || !contentLength.HasValue)
    {
    await download.CopyToAsync(destination);
    return;
    }

    // Convert absolute progress (bytes downloaded) into relative progress (0% - 100%)
    var relativeProgress = new Progress<long>(totalBytes => progress.Report((float)totalBytes / contentLength.Value));
    // Use extension method to report progress while downloading
    await download.CopyToAsync(destination, 81920, relativeProgress, cancellationToken);
    progress.Report(1);
    }
    }
    }
  • 27-12-2021, 01:15:03
    #5
    var response = await client.GetAsync(requestUri, HttpCompletionOption.ResponseHeadersRead);

    zaten get isteği atıyorsunuz requestUri ye browser üzerinden istek atın açılıyor mu kontrol edin. Açılıyorsa request header a User-Agent ekleyip deneyin ve localde 5001 üzerinden çalıştırıp local sertifika aktif etmeyi deneyin.
    {'User-Agent': 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.3'}

    Burada yazanlarıda kontrol edebilirsiniz: https://stackoverflow.com/questions/...-visual-studio