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??