Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I'd like to know if it is possible to connect to a remote SharePoint site via a new SPSite object from a SharePoint development box.

I've looked around and I haven't found a conclusive answer to this question.

By way of further explanation, I am developing a tool that will help me map metadata for document migration to a new SharePoint server. For obvious reasons, I don't really want to install Visual Studio on our production server and use it to develop the app. I've set up a test server with VS installed and I want to be able to connect to the production server via the object model. I keep getting FileNotFoundExceptions (great choice, Microsoft) and have eliminated all of the common causes of this problem.

The application works fine with the development server.

share|improve this question
1  
Why not use the client object model instead? –  Frédéric Hamidi Jun 18 '13 at 21:12
1  
Beginning with SharePoint 2010, there's a client-side object model that you can use to interact with a remote server. It's a slightly different model, so you won't necessarily be able to directly use code from the server object model, but the act of communicating with a remote server can be done. –  Chris Farmer Jun 18 '13 at 21:12
    
Is it an option for you to develop the application against your test machine and then, when you're confident that it's working, for you to move the executable to the production server itself and run it there? It may be a lot easier to develop an app like than to use the client object model, simply because the server object model is more robust and generally easier to use. –  Servy Jun 19 '13 at 14:08

1 Answer 1

up vote 2 down vote accepted

SharePoint object model can't connect to remote server.

To Connect to remote Server, you can use Client Object Model (available on sharepoint 2010 or sharepoint 2013) or webservices.

If you are using sharepoint 2007. you can only using webservice to do data migration.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.