Sharepoint SPSite
问题 I am trying to create a spsite of object for sharepoint search but i am getting exception in production as website not found SPSite site = new SPSite("sitename"); ServerContext scon = ServerContext.GetContext(site); SearchContext srchcontext = SearchContext.GetContext(scon); Scopes sc = new Scopes(srchcontext); It throws exception site not found i have checked the name of site it exixts. Any Help?? 回答1: Check that you are building against the correct target. I.e. x86 vs x64. I get this error