As far as I can tell i'm doing everything by the book, but the .NET client is simply not sending an authentication header when making requests to my (PHP) SOAP Web Service. I have verified this by logging the raw post data at the PHP end of things and .NET never sends any auth headers.
This is the code I am running before making calls on my ExampleWebService Web Service:
ExampleWebService.PreAuthenticate = true;
NetworkCredential myCred = new NetworkCredential("myusername","mypassword");
CredentialCache myCache = new CredentialCache();
myCache.Add(new Uri(ExampleWebService.Url), "Basic", myCred);
ExampleWebService.Credentials = myCache;
As I understand it, PreAuthenticate should force the sending of my HTTP Basic Auth Credentials on every request regardless of challenge. Does this only work with IIS hosted services? I haven't found this documented anywhere.
Any light that someone more experienced than I in the world of .NET could shed on this would be greatly appreciated, as I'm close to pulling my hair out ;-)