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.
a source to share
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?
a source to share
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.
a source to share