By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,065 Members | 1,560 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,065 IT Pros & Developers. It's quick & easy.

System.Net.Webclient and my DSL modem

P: n/a
Hi, I'm trying to write a simple utility using vb.net that finds my DSL
modem's external IP address via it's status page. It seemed simple at
first, and I used an example I found online to come up with the following:

----
Dim wc As New System.Net.WebClient, html As String
Dim creds As New System.Net.NetworkCredential("username", "password")
Dim uri As String = "http://192.168.0.1"

wc.Credentials = creds

Try
html = System.Text.Encoding.ASCII.GetString(wc.DownloadDa ta(uri))
Catch ex As Exception
html = ex.Message.ToString
End Try

return html
----

For the first page of my modem's admin interface, that returns the html
of the page. But I want a page that is linked to from here.
If I go to that page in a browser, the address bars says:

http://192.168.0.1/cgi-bin/webcm?get...ml/status.html

But entering that as the uri returns a protocol violation error.

If I try to load the html page directly (/html/status.html), it's just a
frameset with no data.

How can I make the cgi execute so I can et my status page with the
values I'm looking for? If it helps, it's a Qwest-issued Actiontec with
wireless. Any ideas? Thanks!

Matt
Nov 21 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.