I am facing this weired issue while trying to call the GetList method of the Lists.asmx web serice from my local dev box. Everything works fine as long as I pass default credentials
listProxy.Credentials = System.Net.CrderntialCache.DefaultCredentials;
But things go wrong as soon as I pass my credentials:
listProxy.Credentials = new System.Net.NetworkCredential("devbox\testuser", "password");
or
listProxy.Credentials = new System.Net.NetworkCredential("testuser", "password","devbox");
Note: I have added testuser in the Site Owners group on target SharePoint site collection.
My Development Machine Configuration:
- Win2k3 SP2
- No AD installed - devbox is the machine name.
- Standalone MOSS Installation
- VS2008
I even tried disabling the loopbackcheck by adding this entry to the registry disableloopbackcheck 1
What can be the possible issue?
\t
in the 2nd snippet treated as an escape sequence? Try to use"devbox\\testuser"
or@"devbox\testuser"
instead.