I wrote this method to test for credentials but I dunno why when it goes to the GetResponse method is actually goes and runs the webservice. I just want it to test if the credentials for that web service are correct or not.
private bool TestCredentials(string sURL, ref string sUsername, ref string sPassword)
{
bool retVal = false;
CredentialCache myCache = new CredentialCache();
myCache.Add(new Uri(sURL), "Full", new NetworkCredential(sUsername, sPassword, "our_domain"));
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(sURL);
request.Credentials = myCache;
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
if (response.StatusCode == HttpStatusCode.OK)
retVal = true;
return retVal;