SharePoint web surfing error using CheckoutFile method with SSL

I am trying to validate a file from a SharePoint document library before uploading it to my editing client application.

//documentPath = https://192.168.1.10/Utility/Phys/Document%20Library/document.xml
//listWebServiceURL = https://192.168.1.10/Utility/Phys/Document%20Library/_vti_bin/lists.asmx
private void CheckOutFile(string documentPath)
{
    string listWebServiceUrl = this.GetListServiceURL(documentPath);
    bool checkedOut;

    using (Lists listWebService = new Lists())
    {
        listWebService.Credentials = CredentialCache.DefaultCredentials;
        listWebService.Url = listWebServiceUrl;
        checkedOut = listWebService.CheckOutFile(documentPath, "true", string.Empty);
    }
}

      

When checkedOut = listWebService.CheckOutFile (documentPath, "true", string.Empty); I am getting SOAPServerException.

((System.Xml.XmlElement) ((System.Web.Services.Protocols.SoapException) (ex)). Detailed description) .InnerText Object reference not set on an object instance.

Any help on this would be greatly appreciated.

Thanks,
Keith

EDIT: I tested the above code against a SharePoint library that doesn't use SSL and it seems to work fine.

+1


a source to share


3 answers


Perhaps this is an alternate access mapping problem ("Object Not Set" error is a check mark)? Do you have one for https://192.168.1.10/ in Admin Center-> Operations-> Global Configuration-> Alternate Access Mappings, ya?



+3


a source


I believe you should provide the time value in the last argument to listWebService.CheckOutFile. It may be complaining about string.Empty. Try to insert a line like; "May 12, 2009 22:00:00 GMT"



0


a source


I just ran into this Object Reference error and got it working by adding the domain to the url.   http: // servername - gets an error, but    http://servername.domain.com - job done

It is understood that by fully qualifying it in the intranet zone for alternate access mappings.

0


a source







All Articles