I want to check documents properties in SharePoint library. Please tell me how to open SharePoint website in windows service. I am using following code in windows service, it gives "site not found error".
SPSite spSite = new SPSite("http://xyz/sites/abc");
Detail Error is,
System.IO.FileNotFoundException: The Web application at http://xyz/sites/abc could not be found. Verify that you have typed the URL correctly. If the URL should be serving existing content, the system administrator may need to add a new request URL mapping to the intended application.
at Microsoft.SharePoint.SPSite..ctor(SPFarm farm, Uri requestUri, Boolean contextSite, SPUserToken userToken)
at Microsoft.SharePoint.SPSite..ctor(String requestUrl)
at SSP_DL_notify_service.Service1.GetMail(Object sender, ElapsedEventArgs args) in C:\Users\pqr\Documents\Visual Studio 2010\Projects\SSP_DL_notify_service\SSP_DL_notify_service\Service1.cs:line 54