Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
3
Reply
Unauthorized error in KeywordQuery search object SP2013
sumit kumar
Nov 26 2015 7:30 AM
385
Reply
I am getting UnauthorizedAccessException while creating KeywordQuery object. I have tried with all the overloaded method for KeywordQuery in SharePoint 2013. I am able to create SPSite object.
Below is the code:
using (SPSite site = new SPSite(url))
{
SearchServiceApplicationProxy proxy = (SearchServiceApplicationProxy)SearchServiceApplicationProxy.GetProxy(SPServiceContext.GetContext(site));
using (KeywordQuery keywordQuery = new KeywordQuery(site))//Unauthorised Access Exception on this line
{
//doing something with KeywordQuery object
}
}
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
3
)
Next Recommended Forum
how to save all images from web page on single button click
Images not visible in Excel Online