Bonjour,

Je me trouve face à un mur et je n'arrive pas à trouver sur internet.

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
 
        Dim ByteStr As Byte()
        Dim WC As New WebClient
        ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls Or SecurityProtocolType.Tls11 Or SecurityProtocolType.Tls12
 
        WC.Headers.Add("User-Agent: Other")
        Try
            ByteStr = WC.DownloadData("https://www......")
            sHtml = Text.Encoding.UTF8.GetString(ByteStr)
 
        Catch ex As Exception
 
        End Try
VB me dit : "erreur 30456 : 'encoding' n'est pas un membre de 'string'"

En import j'ai bien pourtant :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
Imports System.Text
Imports System.Net
Je tourne en rond !

Merci pour votre aide.