Credentials
-
Hi. I'm trying do do some communication between CMS and Sharepoint portal server 2003. my code looks like this. --------------- HttpWebRequest wr = (HttpWebRequest)HttpWebRequest.Create(myURL); CredentialCache wrCache = new CredentialCache(); wrCache.Add(new Uri(myURL),"NTLM", (NetworkCredential)CredentialCache.DefaultCredentials); wr.PreAuthenticate = true; wr.Credentials = wrCache; WebResponse wrsp; try { wrsp = wr.GetResponse(); } catch(Exception ex) { throw new Exception("Error during call to provider:\n" + ex.Message); } ------------------ both servers are set up with only integrated authentication. the user wich is logged on has access o both servers. there is no double hop in the call. Still i get a 401 unauthorized access from the call. I also tried just using the defaultCredentials without making a new credentialcache.got the same result. if i hardcode a username, password and domain into a new credentialcache, it works. If i place a breakpoint and look at the contens of the defaultcredentials, the username is blank. Is this normal?:confused: if i hardcode a new credentialcache the username is not blank. Any ideas?