TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
sumit kumar
NA
158
2.4k
Unauthorized error in KeywordQuery search object SP2013
Nov 26 2015 7:30 AM
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
}
}
Reply
Answers (
3
)
how to save all images from web page on single button click
Images not visible in Excel Online