I try to instantiate an instance of SPSite
on the farm server in a custom process (MyApp.exe) and I give it as parameter the whole URI (http://mysite:80/). I also made sure that the account running MyApp.exe
is Site Collection Administrator
.
However, I can't make an instance of SPSite
whatever I am trying to do. It always throws a FileNotFoundException
.
Anyone got an idea?
StackTrace:
at Microsoft.SharePoint.SPSite..ctor(SPFarm farm, Uri requestUri, Boolean contextSite, SPUserToken userToken)
at Microsoft.SharePoint.SPSite..ctor(String requestUrl) at MyCompanyName.Service.HelperClass.GetItemStateInSharePoint(SharePointItem item) in C:\Workspaces\MyCompanyName\Development\Main\MyCompanyName.SharePoint\Service\HelperClass.cs:line 555
Another side note... I have a Web Application + Site collection that I can access through the browser without any problem.