Error Sharepoint Webservice 401

I am trying to call sharepoint web services in a C # console application. The code works fine when I use the local WSS system as the target application, but I don’t work with another server accessible via the Internet. Below is my code.

Webs service = new Webs();
            service.PreAuthenticate = true;
            service.Credentials = new System.Net.NetworkCredential(login, password);
            //service.Credentials = System.Net.CredentialCache.DefaultNetworkCredentials;

            service.Url = url + @"/_vti_bin/webs.asmx";

            XmlNode sites = null;

            try
            {
                sites = service.GetWebCollection();
            }
            catch (Exception ex)
            {
                return;
            }

Note: 1. It does not work with DefaultNetworkCredentials, nor with my domain user credentials. 2. The endpoint of the webservice, if you successfully insert the list of web service methods into the browser. 3. In all cases, I get a 401 unauthorized error (access to a remote server).

Did I miss something?

+1
source share
2 answers

, Fiddler, http SharePoint. .

+1

App Pool? , . . .

, Microsoft Windows XP 2 (SP2) Microsoft Windows Server 2003 1 (SP1). , KB - http://support.microsoft.com/?scid=kb;en-us;896861&x=14&y=17.

0

All Articles