I am doing a query towards a webservice with VB.NET which will return me if the mail was successfully validated or if the email is invalid. When you send it to call it stays like this:
Public Shared Function verificaremail(ByVal email As String) As String
Try
Dim siService As StrikeIron.EMV6Hygiene = New StrikeIron.EMV6Hygiene()
Dim timeout As Integer = 30
Dim OptionalSourceID = " "
siService.VerifyEmail(email.Trim(), timeout, OptionalSourceID)
return true
Catch tex As TimeoutException
return True
Catch ex As Exception
return False
End Try
End Function
My question is: How can I handle the exception when the 30 seconds of the consultation have passed?
Since I am currently taking it as "ex" and it is returning false when doing tests.
I have omitted the steps for authentication since it is irrelevant to the process, and I do not receive an error from that part.