Thursday, June 23, 2011

New-WebServiceProxy and 401: Unauthorized

Feeling mildly dumb about this one, but using New-WebServiceProxy recently and spent too much time troubleshooting the 401 errors it was throwing me.

After fiddling with UAC and proxy settings I finally looked at the New-WebServiceProxy cmdlet help.  The handy ‘UseDefaultCredential’ of course allowed the cmdlet to use my security context, and get me access.  Duh.

1 comment:

Paul said...

Cool stuff!! I ran into this issue a couple of weeks ago after you turned me on to this cmdlet.