I have an ASP.NET MVC 4 web service. In my dev block, I run IIS Express 7.5, so we call localhost: port. I installed it for Windows authentication and disabled Anonymous.
On my client, if I installed
HttpWebRequest.Credentials = CredentialCache.DefaultNetworkCredentials;
it works. But if I set the credentials for my other Windows domain account,
HttpWebRequest.Credentials = new NetworkCredential("lpuplett", "catsGoW00f", "ntdom"));
then i get 401 unauthorized. I misunderstand something; if it works?
I tried adding credentials to the CredentialCache object and setting the cache at the intersection of the fingers, as well as with my eyes closed, really hopeful.
Thanks,
Luke
solvable
It worked for 3 hours of searching and after publishing my own question I landed on the answer, here on trusty SO:
Domain credentials for WebClient class not working
Thanks for this; -)
source share