From: Adriano on 12 Dec 2009 02:24 Hello! I need to send simple web request to a server that have network credentials + requires client certificate. I used the following code for network credentials, what should I do next to pass client certificate? Dim myURL As String = "https://someurl:portno" Try Dim request As HttpWebRequest request = HttpWebRequest.Create(myURL) request.Credentials = New Net.NetworkCredential("user", "pass") Dim response As HttpWebResponse = CType(request.GetResponse(), HttpWebResponse) 'Read Data Stream Dim dataStream As Stream = response.GetResponseStream Dim reader As New StreamReader(dataStream) Dim responseFromServer As String = reader.ReadToEnd() reader.Close() dataStream.Close() response.Close() Console.WriteLine(responseFromServer) Catch ex As Exception MsgBox(Err.Description & vbCrLf & myURL) End Try Thanks in advance! Adriano
|
Pages: 1 Prev: How to add the show time for Tooltip control Next: Help with TCP Server. |