Click here to Skip to main content
15,888,521 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: VB.net 2010 Send Keys To Dos Program Pin
rderkis25-Dec-15 12:03
rderkis25-Dec-15 12:03 
GeneralRe: VB.net 2010 Send Keys To Dos Program Pin
rderkis25-Dec-15 12:15
rderkis25-Dec-15 12:15 
GeneralRe: VB.net 2010 Send Keys To Dos Program Pin
Richard Andrew x6425-Dec-15 12:23
professionalRichard Andrew x6425-Dec-15 12:23 
GeneralRe: VB.net 2010 Send Keys To Dos Program Pin
rderkis25-Dec-15 12:50
rderkis25-Dec-15 12:50 
GeneralRe: VB.net 2010 Send Keys To Dos Program Pin
Richard Andrew x6425-Dec-15 13:12
professionalRichard Andrew x6425-Dec-15 13:12 
GeneralRe: VB.net 2010 Send Keys To Dos Program Pin
rderkis25-Dec-15 14:01
rderkis25-Dec-15 14:01 
Questionusing streamwriter to access a SSL webservice Pin
jkirkerx23-Dec-15 10:39
professionaljkirkerx23-Dec-15 10:39 
AnswerRe: using streamwriter to access a webservice via SSL, just test to see if it exist under SSL[solved] Pin
jkirkerx24-Dec-15 10:17
professionaljkirkerx24-Dec-15 10:17 
Well I banged my head against the wall for hours on this. So I broke out fiddler.
I finally realized that I just needed to send a GET request, but kept getting that error, Verb GET cannot perform this function. hmm?

Finally I realized that I don't need to to use streamwriter to send anything, and that I just needed to use HttpWeResponse to send HttpWebRequest and read the result.

I don't have a lot of experience with using HttpWebRequest and Response, but I'm getting better at now. As as side note, I didn't know that you can attach the ServerCertificateCallback to HttpWebRequest.

So I had many issues here.
How to handle SSL,
and how to write a GET request.

Many threads on other sites simply said just change get to post.
Perhaps I should of just searched for how to request a web page.
Dim request_str As String = "/ HTTP/1.1" & vbLf & "Host: " & pHost
Dim response_str As String = Nothing

Dim request As HttpWebRequest = HttpWebRequest.Create(pUrl)
request.Credentials = CredentialCache.DefaultCredentials
request.ClientCertificates.Add(New X509Certificate)
request.Accept = "text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8"
request.CookieContainer = New CookieContainer()
request.ContentType = "application/x-www-form-urlencoded"
request.KeepAlive = True
request.Method = "GET"
request.Timeout = 10000
request.UserAgent = My.Application.Info.Title & "/" & My.Application.Info.Version.ToString
request.ServerCertificateValidationCallback = New _ System.Net.Security.RemoteCertificateValidationCallback(AddressOf AcceptAllCertifications)

Try

   Using response As HttpWebResponse = request.GetResponse()

        Using stream_response As StreamReader = New StreamReader(response.GetResponseStream())

            response_str = stream_response.ReadToEnd()
            stream_response.Close()

            If (response_str IsNot Nothing) Then

                If response_str.ToLower.Contains("<html") Then

                    global_variables.gOnline = True
                    pValue = True

                End If

            End If

       End Using

   End Using

Catch ex As WebException

    global_variables.gOnline = True
    pValue = True

End Try

QuestionStartTLS, using socket Pin
jkirkerx19-Dec-15 12:26
professionaljkirkerx19-Dec-15 12:26 
AnswerRe: StartTLS, using socket Pin
jkirkerx19-Dec-15 13:02
professionaljkirkerx19-Dec-15 13:02 
QuestionRead from Barcode readers Pin
satc19-Dec-15 5:40
satc19-Dec-15 5:40 
AnswerRe: Read from Barcode readers Pin
Richard MacCutchan19-Dec-15 21:17
mveRichard MacCutchan19-Dec-15 21:17 
AnswerRe: Read from Barcode readers Pin
Sascha Lefèvre23-Dec-15 11:40
professionalSascha Lefèvre23-Dec-15 11:40 
QuestionVb6 Installer Pin
Otekpo Emmanuel15-Dec-15 8:03
Otekpo Emmanuel15-Dec-15 8:03 
AnswerRe: Vb6 Installer Pin
Dave Kreskowiak15-Dec-15 9:53
mveDave Kreskowiak15-Dec-15 9:53 
AnswerRe: Vb6 Installer Pin
Rizwan Chattha27-Dec-15 1:26
Rizwan Chattha27-Dec-15 1:26 
QuestionComma, ')', or a valid expression continuation expected Pin
gauravsaraogi2115-Dec-15 3:41
gauravsaraogi2115-Dec-15 3:41 
AnswerRe: Comma, ')', or a valid expression continuation expected Pin
CHill6015-Dec-15 5:24
mveCHill6015-Dec-15 5:24 
Questionhow to display marker on digital map with mapwingis VB.NET Pin
joerwanto14-Dec-15 22:57
joerwanto14-Dec-15 22:57 
QuestionRe: how to display marker on digital map with mapwingis VB.NET Pin
CHill6015-Dec-15 5:14
mveCHill6015-Dec-15 5:14 
QuestionPrinting invoice in CRSTAL report 8.5 in DOT MATRIX Printer in roll Paper Pin
imagetvr12-Dec-15 20:59
imagetvr12-Dec-15 20:59 
AnswerRe: Printing invoice in CRSTAL report 8.5 in DOT MATRIX Printer in roll Paper Pin
Dave Kreskowiak13-Dec-15 5:17
mveDave Kreskowiak13-Dec-15 5:17 
QuestionPrinting invoice in Continuous stationery in usb dot matrix in VB6 Pin
imagetvr12-Dec-15 21:31
imagetvr12-Dec-15 21:31 
AnswerRe: Printing invoice in Continuous stationery in usb dot matrix in VB6 Pin
Dave Kreskowiak13-Dec-15 5:12
mveDave Kreskowiak13-Dec-15 5:12 
QuestionVB.NET DUPLICATE SCREEN SHARING PROBLEM Pin
Steve Roseik12-Dec-15 7:58
Steve Roseik12-Dec-15 7:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.