Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 25064

unable to connect to the remote server web service sharepoint

$
0
0

 Hi,

i am using sahrepoint webservice for getting document from another sahrepoint site.my source server is wss3.0

and my destination server is moss2010.

i wrote code like the below.

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


                copyService.Url = http://server:8080+ "/_vti_bin/copy.asmx";
             
                copyService.Credentials = CredentialCache.DefaultCredentials;

                 WSCopy.FieldInformation fieldInfo = new WSCopy.FieldInformation();
                WSCopy.FieldInformation[] fieldInfoArray = { fieldInfo };
                WSCopy.CopyResult cResult1 = new WSCopy.CopyResult();
                WSCopy.CopyResult cResult2 = new WSCopy.CopyResult();
                WSCopy.CopyResult[] cResultArray = { cResult1, cResult2 };

                    byte[] fileContents = new Byte[4096];
                copyService.GetItem( "http://server:8080/shareddocuments/sample.doc" , out fieldInfoArray, out fileContents);

                return fileContents;

               this is the logic i am using

HERE IS THE PROBLEM;

THE above code is working fine in the devlopment server when i am deploye the same in the production is is not working

and it is giveing a error messaeg like.  unable to connect to the remote server.

only difference is am giving the url like     http://boss.companyname.com

http://boss.companyname.com"/_vti_bin/copy.asmx  is getting opend in browser also. please let me know if i did any thing wrong,.

any one can u please help me on this.


prboss


Viewing all articles
Browse latest Browse all 25064

Trending Articles



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