Unable to connect to a remote server - Across SharePoint 2010 Farms

Hi,

I am trying to copy a SharePoint list item from one extranet farm to intranet farm. Both are in SharePoint 2010.

First I tried with Server site object mode, that did not work.

Then I am using Client Object model, tried to pass network crudentials but always get "Unable to connect to a remote server".

We already have SSL trusted relationship setup between web applications in 2 farms. What am I missing.

Appreciate your help.

Thanks.

April 16th, 2015 2:08pm

what you are attempting to do should use the Content Deployment capabilities in Central Admin.

The Server Object Model must run on a server, and can only access the farm that the current server is joined to.

Not sure what's up with the Client Object Model, but it contains no direct API method to copy an item/document from one farm to another.

Free Windows Admin Tool Kit Click here and download it now
April 16th, 2015 3:00pm

Hi, I'm also trying for solution of this process, but I didn't get it.

<a href="http://staygreenacademy.com">SharePoint Training</a>

April 17th, 2015 2:40am

Hi,

With server object model, we cannot copy the item from extranet farm to intranet farm.

To achieve this goal, we can use client object model.

As you are copying item from two different farms, then we need to set unique credential to be able to access each farm.

When getting item from the extranet farm, we need to use a unique credential with a user who can access the item in the list in the extranet farm.

When writing the item to the intranet farm, we need to use a unique credential with a user who can create item in the list in the intranet farm.

We can use the code below to set the unique credential:

NetworkCredential credentials = new NetworkCredential(username, pwd, domain); 
ClientContext context = new ClientContext(http://thesitecollection); 
context.Credentials = credentials;

More reference:

http://sharepointdragons.com/2012/04/20/authentication-when-using-the-sharepoint-client-object-model/

Thanks,

Victoria

Free Windows Admin Tool Kit Click here and download it now
April 17th, 2015 3:13am

Ok I made some progress using clientcontext model. I was able to copy sharepoint list item from a hTTPS://producersite to HTTP://consumersite

But I cannot post from Https://consumer to https://producersite. Always get "Unable to connect remote server"







  • Edited by USMM 12 hours 25 minutes ago
April 17th, 2015 2:05pm

Ok I made some progress using clientcontext model. I was able to copy sharepoint list item from a hTTPS://producersite to HTTP://consumersite

But I cannot post from Https://consumer to https://producersite. Always get "Unable to connect remote server"







  • Edited by USMM Friday, April 17, 2015 7:11 PM
Free Windows Admin Tool Kit Click here and download it now
April 17th, 2015 6:04pm

Ok I made some progress using clientcontext model. I was able to copy sharepoint list item from a hTTPS://producersite to HTTP://consumersite

But I cannot post from Https://consumer to https://producersite. Always get "Unable to connect remote server"







  • Edited by USMM Friday, April 17, 2015 7:11 PM
April 17th, 2015 6:04pm

Ok I made some progress using clientcontext model. I was able to copy sharepoint list item from a hTTPS://producersite to HTTP://consumersite

But I cannot post from Https://consumer to https://producersite. Always get "Unable to connect remote server"







  • Edited by USMM Friday, April 17, 2015 7:11 PM
Free Windows Admin Tool Kit Click here and download it now
April 17th, 2015 6:04pm

Hi,

I recommend to use fiddler to check the detailed error message when running the code to access the site Https://consumer.

Thanks,

Victoria

April 19th, 2015 10:32pm

Hi,

How is everything going?

Is there anything update about this issue?

If you need any further help, please feel free to let use know.

Thanks,

Victoria

Free Windows Admin Tool Kit Click here and download it now
April 28th, 2015 9:27pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics