Hi Trying out NetworkCredential class.
The code from the help example fails when you try to do an add to the
Credential cache.
'Invalid URI. The format of the URI can not be determined.'
I don't expect my quoted name, password and domain to pass but I would have
thought that the credential should have added to the cache OK
Thanks.
Bob
NetworkCredential myCred = new NetworkCredential(
"SecurelyStoredUserName", "SecurelyStoredPassword", "SecurelyStoredDomain");
CredentialCache myCache = new CredentialCache();
myCache.Add(new Uri("www.contoso.com"), "Basic", myCred); //FAILS HERE
myCache.Add(new Uri("app.contoso.com"), "Basic", myCred);
WebRequest wr = WebRequest.Create("www.contoso.com");
wr.Credentials = myCache;