how to find the url to connect SharePoint with C# console application -


my c# console application built on sharepoint server 2007. job select items in library sharepoint site. however, cannot connect app sharepoint site's spsite object...

my code connect sharepoint site:

using system; using system.collections.generic; using system.linq; using system.text; using system.threading.tasks; using microsoft.sharepoint;  namespace trytoconnect {     class program     {         static void main(string[] args)         {            string siteurl = "http://sp13vm123/";          //string siteurl = "http://sp13vm123/imglibrary/forms/allitems.aspx";          //string siteurl = "http://sp13vm123/imglibrary/";          //string siteurl = "http://sp13vm123:8800/";          //string siteurl = "http://sp13vm123/sitepages/home.aspx";          //string siteurl = "http://sp13vm123/sitepages/";               spsite ospsite = new spsite(siteurl );             console.writeline("connected");//nothing         }     } } 

there error message url cannot found...

so, how can find url let me connect?

the url of sharepoint central administration? error, not found

the url of layout page? error, not found

in sharepoint 2007, can use spsite objects (and other objects sharepoint object model) when code executed web server on sharepoint farm.

if you're running other location, not have access sharepoint object model, , you'll need use approach (such sharepoint's soap-based web services).


Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -