Help with error: "Invalid URI: The format of the URI could not be determined."

S

Simon Harris

I'm trying to access a password protected web service. My code is as
follows:

Dim BS7666 As New bs7666.BS7666 'New instance of my web service
Dim CredCache As CredentialCache = New CredentialCache
Dim WebSvcURL As System.Uri = New System.Uri(BS7666.Url)
CredCache.Add(WebSvcURL, "Basic", New NetworkCredential("USERNAME",
"PASSWORD", "DOMAIN")) 'This is the line it fails on
BS7666.Credentials = CredCache
Dim DataSet_bs7666 As New DataSet
DataSet_bs7666 = BS7666.GetAddresses(CStr(0), "", strPostCode.ToLower,
BuildingNoOrName.ToLower, "", strStreet.ToLower, 0, 0)

Error:
Invalid URI: The format of the URI could not be determined.
Any help will be much appreciated - I've been struggling with this all
day!
:(
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,733
Messages
2,569,440
Members
44,831
Latest member
HealthSmartketoReviews

Latest Threads

Top