Quantcast
Channel: SharePoint 2010 - Development and Programming forum
Viewing all articles
Browse latest Browse all 11508

Failed to download file (from https:// site )by using SharePoint 2010 web service - COPY

$
0
0

Hi,

I am using the following code to download a file from a different sharepoint2010 site. It is working fine in our local machine. In Customer machine Instead of specified file from document library, it is downloading Page-source file (). The difference is customer site-url start with https://.

Is there any limitation in copy service for https:// ?

Or any other reason can any one explain me?

Part of the code is given below..

DownloadSharePointDocument.Copy copyService = new DownloadSharePointDocument.Copy();

copyService.Url = DownLoadWP.siteUrl + "_vti_bin/copy.asmx";

copyService.Credentials = new System.Net.NetworkCredential(DownLoadWP.siteuserID, DownLoadWP.sitePassword, DownLoadWP.adDomain);  

 string sourceUrl = FullFilePath;               

DownloadSharePointDocument.FieldInformation fieldInfo = new DownloadSharePointDocument.FieldInformation(); 

 DownloadSharePointDocument.FieldInformation[] fieldInfoArray = { fieldInfo };               

DownloadSharePointDocument.CopyResult cResult1 = new DownloadSharePointDocument.CopyResult();               

DownloadSharePointDocument.CopyResult cResult2 = new DownloadSharePointDocument.CopyResult();               

DownloadSharePointDocument.CopyResult[] cResultArray = { cResult1, cResult2 };               

byte[] fileContents = new Byte[4096];               

copyService.GetItem(sourceUrl, out fieldInfoArray, out fileContents);               

byte[] obj = fileContents;

//......

//.....



S H A J A N


Viewing all articles
Browse latest Browse all 11508

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>