Hi,
I recently discovered that I can access my TiVo via XML at:
https://[My-TiVo-IP]/TiVoConnect...er&Container=%
2FNowPlaying
It authenticates using the username "tivo" and my Media Access Key as a
password. Of course, my first thought was to consume this
programmatically. However, apparently the site certificate doesn't
match the site. (It lists "590-0001-8026-8C9D" as the issuee, which of
course doesn't match the actual page.)
Here's the latest path I've taken in VB:
Public Function OpenURL(ByVal sInURL$, UID$, PWD$) As String
Try
Dim URL As New Uri(sInURL)
Dim wrGETURL As WebRequest = WebRequest.Create(URL)
Dim bytes() As Byte = System.Text.Encoding.ASCII.GetBytes( UID &
":" & PWD)
wrGETURL.Headers.Add("Authorization", "Basic " +
Convert.ToBase64String(bytes))
Dim feedStream As Stream = wrGETURL.GetResponse
().GetResponseStream
Dim SR As StreamReader = New StreamReader(feedStream)
OpenURL = SR.ReadToEnd
OpenURL = ""
Catch ex As Exception
OpenURL = ex.Message
End Try
End Function
I've also entered the following into my app.config:
<system.net>
<settings>
<servicePointManager checkCertificateName="true"
checkCertificateRevocationList="false"/>
</settings>
</system.net>
No matter what I've done both in the .vb and in the .config file,
however, I get the same message: "The underlying connection was closed:
Could not establish trust relationship for the SSL/TLS secure channel."
How can I access this info while ignoring the site certificate?
Regards,
Scott McNair