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

Regarding Server object Model in Custom Windows service

$
0
0

Hi,

I am writing a custom windows service to update the Sharepoint 2013 list every morning. But when i am try to create a SPSite object by passing the SITE URL it is throwing the below error.

Code :

using(SPSite site = new SPSite(SITE_URL))

{

}

Error :

"The Web application at "" 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."

Even though the SITE URL is correct. It working while browsing in explorer. 

Not sure why it is happening. 

Thanks.


Akhilesh Rao


Viewing all articles
Browse latest Browse all 7589

Trending Articles



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