none
Error when reading a search content source values in custom webpart

    Question

  • I wrote a custom webpart to fetch values of a search content source and show it on the webpart. It works well and able to list all the values that are there in specified content source. However, when i go to central admin and add/remove any value in that content source and then when i come back to my webpart, instead listing updated values,  it is giving below error message.

    The search configuration has been updated since it was last retrieved. at Microsoft.Office.Server.Search.Administration.SearchApi.RunOnServer[T](CodeToRun`1 remoteCode, CodeToRun`1 localCode, Boolean useCurrentSecurityContext, Int32 versionIn) at Microsoft.Office.Server.Search.Administration.SearchApi.GetContentSources(Int32 versionIn) at Microsoft.Office.Server.Search.Administration.ContentSourceCollection..ctor(Content parent) at Microsoft.Office.Server.Search.Administration.Content.get_ContentSources() at CustomWebparts.TestWebpart.TestWebpart.LoadContentSourceAddresses() at CustomWebparts.TestWebpart.TestWebpart.Page_Load(Object sender, EventArgs e)

    any one can help in this regard..!

    thank u before hand


    Thanks & Regards Raj

    Saturday, May 5, 2018 7:43 PM

All replies