Tuesday, June 24, 2014

SharePoint search error: Application server administration job failed for service instance Microsoft.Office.Server.Search.Administation.Search

While working with SharePoint Search, I got an error saying that “Application Server Administration job failed for service instance Microsoft.Office.Server.Search.Administration.SearchServiceInstance”.

I have changed the service application user instances and reset the index to be crawled. 
Tried to create a new search application with same search crawls and indexes. But neither was worked in my case. Digging into deep I have found this blog explain the cause and solution for problem.

We can get this error when configuration DB having older data than file system data in front end server. We can fix this issue by using the steps below,

  • Navigate to windows service and stop SharePoint Timer Services, Open SharePoint cache folder located in “C:\Documents and Settings\All Users\Application Data\Microsoft\SharePoint\Config”. Check for Config.ini file, Backup the file.
  • Delete all XML configuration files in GUID folder other than Config.ini file and double click on Cache.ini file. Select all the data and click n delete. Enter “1” (number 1), save and close the file. 
  • Start Windows SharePoint service.  Now file system will be re stored with all the configuration files in GUID folder.
It worked for me. Hope this helps.

Monday, June 23, 2014

Display loading image in SharePoint using JavaScript

To display loading image in SharePoint site We have to download the image and save it as Loading.gif and save it in SharePoint document library. Select list new item page and to be and edit the page.

Add Content Editor Web part to the page. Enter following script to the page.

<script src="../Library/jquery/1.3.1/jquery.min.js" type="text/javascript"></script>

<style type="text/css">
   #loadImage {display:none;}

<script type="text/javascript">
function PreSaveItem()
  $("# loadImage ").css("display", "block");
    if ("function" == typeof (PreSaveAction)) {
        return PreSaveAction();
    return true;

<div style="padding-top: 25px; padding-left: 30px;">
   <img width="250" height="250" id="loadImage" src="/Site/images/Loading.gif" alt=""/>

Save and close the page. Here src is the image to be loaded and enter the padding. We can see the image when page loading as shown below.

Function will be called on the List item Save event. 

Sunday, June 15, 2014

Multi domains in SharePoint 2010 people picker

In SharePoint environment people picker is one of the main part in the farm to provide the users available from all the domains to select the users. By configuring stsadm commands we can grab the users from different domains.
SharePoint will use Application pool identity to search users in active directory. If application pool account is not having permissions to do that, we have to encrypt the password.

To do that we can use following command in STSADM,

stsadm -o setapppassword -password  password

We have to set the domains should be searched on WFE for each web application,

stsadm -o setproperty -pn peoplepicker-searchadforests –pv domain:domain1;domain:domain2,domain2\account,password -url WebApplication
Hope this helps.

Saturday, June 14, 2014

SPGridView error: Value cannot be null. Parameter name:propName

While working with SharePoint grid view to show data, I got an error saying that “Value cannot be null. Parameter name:prop name as shown the image below.

I have checked the properties assigned to SPGridview. By default SPGrid will have option to group the result based on a column. By setting AllowGrouping is “true” we can group the data. We have to specify the grouping column name, Group collapse and Group field display name as shown the code below.

SpGridView. GroupField=”Group Field Name”;
SPGridView.AllowGroupCollapse = false;
SPGridView.GroupDescriptionField = “Group Description Name”;
SPGridView.GroupFieldDisplayName = “DisplayName Text

We have to set GroupField, AllGroupCollapse, GroupDescriptionField and GroupFieldDisplayName along with AllwGrouping field to fix the error.

Wednesday, June 11, 2014

Display PowerPoint Presentation in SharePoint 2013 page

We can allow users to view Office web apps in SharePoint 2013 with in the browser by clicking on the link of document. We can display PPT in browser. First of all create and upload a PPT to document library by selecting New Document, Select “PowerPoint Presentation” as shown the image below.

Select the PPT URL by clicking on the … next to PPT document, select and copy the URL. Navigate to the page where we need to display the PPT and insert Page viewer web part as shown below.

Edit the web part, enter the URL in Page Viewer link in web part properties. In Appearance tab select “YES” for “should the web part have a fixed height”, and set it as 600 px. Save and close the properties.

Now we can see the PPT in the page as a web part and will have options to navigate the pages in PPT.

Wednesday, June 4, 2014

SPGrid Error in SharePoint 2010: System.ArgumentNullException: Value cannot be null. Parameter name: container

While working with SharePoint 2010 Grid view grouping depending on dropdown value, got an error saying that “Value cannot be null. Parameter name: Container” as shown the image below.

Iam unable to find the issue while debugging the code. I have spent much time on this issue finally got the reason. By making “EnableViewState” to false error got fixed as show the code below.

grdPropertyValues.EnableViewState = false;
grdPropertyValues.AllowSorting = true;
grdPropertyValues.AllowGrouping = true;
grdPropertyValues.AllowGroupCollapse = true;

Here grdPropertyValues is SPGridview object. Hope this helps.