.NET calling SharePoint Web Service gets an HTTP 401 Unauthorized exception -


i trying call sharepoint lists service list definition , data. sharepoint site companies have no control on it. here know server's security:

server https:// server accepts windows active directory credentials when logging in...

i have tried basic, digest, credentialcache, networkcredential, unsafeauthenticatedconnectionsharing, usedefaultcredentials, preauthenticate... not sure proper config is...

the error receive http 401 unauthorized.

                uri url = new uri(baseaddress + "/_vti_bin/lists.asmx", urikind.absolute);                 lists.lists client = new lists.lists();                  // works                 credentialcache cache = new credentialcache();                 cache.add(url, "ntlm", new networkcredential(context.username, context.password, context.domain));                 client.usedefaultcredentials = false;                 client.credentials = credentialcache.defaultcredentials;                 // doesn't work ever                 //client.credentials = new networkcredential(context.username, context.password, context.domain);                 //client.preauthenticate = true;                 client.unsafeauthenticatedconnectionsharing = true;                 client.url = url.absoluteuri;                 listdata = client.getlist(listname).outerxml; 

is code running locally on same server sharepoint - if local loopback check.

if not need give acurate details - site using integrated authentication (and if via ntlm or kerberos) or basic or forms?

also - happens if try use web service using browser (to wsdl) or web service test tool such soapui or one of many alternatives


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -