-->

Friday 13 July 2012

Application Server job failed for service instance

All of a sudden, my FAST search server started bogging me this error several times.


Application Server job failed for service instance Microsoft.Office.Server.Search.Administration.SearchServiceInstance
Reason: An update conflict has occurred, and you must re-try this action



When I checked the ULS Logs it showed me the Trace below 



Application Server Administration job failed for service instance Microsoft.Office.Server.Search.Administration.SearchServiceInstance (21e4447f-bac6-4a29-82db-165e074ac5db).
Reason: An update conflict has occurred, and you must re-try this action. The object SearchDataAccessServiceInstance was updated by domain\user, in the OWSTIMER (5040) process, on machine (server name).  View the tracing log for more information about the conflict.
Technical Support Details: 
Microsoft.SharePoint.Administration.SPUpdatedConcurrencyException: An update conflict has occurred, and you must re-try this action. The object SearchDataAccessServiceInstance was updated by domain\user, in the OWSTIMER (5040) process, on machine (server name).  View the tracing log for more information about the conflict. 
   at Microsoft.Office.Server.Search.Administration.SearchServiceInstance.Synchronize()
   at Microsoft.Office.Server.Administration.ApplicationServerJob.ProvisionLocalSharedServiceInstances(Boolean isAdministrationServiceJob)



Resetting the index and Recreating the SSA didn't work either !Luckily after a lot of troubleshooting and looking around I found a fix ! Thanks to this guy !

OK , So resolution 

Resolution:
The file system cache on all FE’s (in my case, this was just one server) on which the timer service is running needs to be cleared.
Below is the step by step provided by Microsoft in this KB Article for doing this:
  1. Stop the Windows SharePoint Services Timer service (Found in Windows Services)
  2. Navigate to the cache folder
    In Windows Server 2008, the configuration cache is in the following location:
    Drive:\ProgramData\Microsoft\SharePoint\Config
    In Windows Server 2003, the configuration cache is in the following location:
    Drive:\Documents and Settings\All Users\Application Data\Microsoft\SharePoint\Config
    Locate the folder that has the file "Cache.ini"
    (Note: The Application Data folder may be hidden. To view the hidden folder, change the folder options as required)
  3. Back up the Cache.ini file.
  4. Delete all the XML configuration files in the GUID folder. Do this so that you can verify that the GUID folder is replaced by new XML configuration files when the cache is rebuilt.
  5. Note When you empty the configuration cache in the GUID folder, make sure that you do not delete the GUID folder and the Cache.ini file that is located in the GUID folder.
  6. Double-click the Cache.ini file.
  7. On the Edit menu, click Select All. On the Edit menu, click Delete. Type 1, and then click Save on the File menu. On the File menu, click Exit.
  8. Start the Windows SharePoint Services Timer service
  9. Note The file system cache is re-created after you perform this procedure. Make sure that you perform this procedure on all servers in the server farm.
  10. Make sure that the Cache.ini file in the GUID folder now contains its previous value. For example, make sure that the value of the Cache.ini file is not 1.




I Hope this article was informative. Happy Sharepointing !

Please do Share/Like/Comment if this article was helpful.



Unable To Resolve Content Distributor

I have been getting the error 'Unable to Resolve Content Distributor' when I run the Sharepoint product configuration wizard. When I googled most of the places it is given to change the content distributor in your search service application port number to 13390 instead of 13391. But my SSA was working perfectly with the 13391, so it was not an issue.


Follow the below steps and make sure your configuration is appropriate.

  1. Ping-SPEnterpriseSearchContentService -HostName hostname:portnumber
     This will display the certificates used by the service. Make sure the connectionsuccess status for the FASTSearchCert is 'True'. If it is set to false you need to install it again using 
    SecureFASTSearchConnector.ps1 script. Refer my post here.
  2. create and re-install the MOSS_STS.cer again. Execute the below commands in sharepoint management shell.

    $stsCert = (Get-SPSecurityTokenServiceConfig).LocalLoginProvider.SigningCertificate
    $stsCert.Export("cert") | Set-Content -encoding byte MOSS_STS.cer


    This will generate the certificate in the folder where you executed the command. Install this certificate using the  InstallSTSCertificateForClaims.ps1. It is located under "%FASTSearch%\Installer\scripts" folder

    InstallSTSCertificateForClaims.ps1 -certPath "certificate_path\MOSS_STS.cer"
This steps resolved my issue !

I Hope this article was informative. Happy Sharepointing !

Please do Share/Like/Comment if this article was helpful.

Monday 25 June 2012

Sharepoint Branding And Customizations - Part 2

In my previous article Sharepoint Branding And Customizations - Part 1, we went through how to change the logo and customize our Top Navigation Menu, Viz our step1 and step 2 of our tutorial.


In this article we will proceed with our next two steps

  • Customize your Quick Launch on Left Navigation Bar
  • Add Social Icons
3. Customize your Quick Launch on Left Navigation Bar

As we modified the styles for the top Navigation bar we will add the style for the left navigation as well. But in addition to that we will add accordion to the Left Navigation Bar using JQuery. First lets start with our styling.

Copy the following code-snippet under the <Head> tag of your V4.master page. Avoid merging this style tag with the previous style tag of our Top Navigation Bar, to make the code more readable for future reference

<style type="text/css">
        /* --------- Quicklaunch ----------- */
        .ms-quickLaunch
        {
            padding-top: 0px;
        }
        #s4-leftpanel-content
        {
            background-color: transparent !important;
        }
        #s4-leftpanel-content
        {
            border: 0px !important;
            background-color: transparent !important;
        }
        .s4-ql
        {
            background-color: #fff;
            margin-bottom: 0px !important;
        }
        /* Inner nav element */
        .menu-vertical
        {
            padding: 0px !important;
        }
        /* top rounded */
        #QLtopwrapper
        {
            background: url('/Style%20Library/Images/QLtop.png') repeat-x;
            height: 19px;
            width: 220px;
        }
        /* bottom rounded */
        #QLbottomwrapper
        {
            background: url('/Style%20Library/Images/QLbottom.png') repeat-x;
            height: 19px;
            width: 220px;
        }
        .menu-vertical > ul.root > li.static > .menu-item
        {
            border-bottom: 1px #929292 solid !important;
            padding-left: 0px;
            color: #fff;
            font-family: Arial;
            font-size: 11px;
            font-weight: bold;
            background-color: #00557B !important;
            background-color: #00557B !important;
        }
        .menu-vertical > ul.root > li :hover
        {
            color: #000000;
            background: -webkit-gradient(linear, left top, left bottom, from(#0087C1), to(#ffffff));
            background: -moz-linear-gradient(top, #0087C1, #ffffff);
        }       
        /* Selected */
        .s4-ql a.selected
        {
            background-color: transparent;
            background-image: none;
            border: 1px transparent solid !important;
            color: #fff !important;
        }
        /* no border in teamsites */
        .s4-ql, .s4-specialNavLinkList
        {
            border: 0px !important;
        }
        .menu-vertical > ul.root > li.static
        {
            padding: 0px !important;
            margin: 0px !important;
        }
        /* headers */
        .menu-vertical > ul.root > li.static > a.menu-item
        {
            padding: 10px 4px 10px 5px;
            border-bottom: 1px #ccc solid;
        }
        /* headers selected for publishing sites */
        .menu-vertical > ul.root > li.static > a.selected
        {
            padding: 10px 4px 10px 3px;
            padding-left: 4px !important;
            background-color: #777 !important;
        }
        /* Subitem container */
        .menu-vertical > ul.root > li.static > ul
        {
            margin-bottom: 0px;
            padding-top: 0px;
            padding-bottom: 0px;
        }
        /* SubItems wrap */
        .menu-vertical > ul.root > li.static > ul.static > li.static > a
        {
            font-family: Arial, Helvetica, sans-serif;
            font-size: 11px;
            padding: 10px 4px 10px 8px;
            color: #ccc !important;
        }
        /* SubItems  */
        .menu-vertical > ul.root > li.static > ul.static > li.static > a > span > span
        {
            color: #333;
            text-decoration: none !important;
        }
        /* SubItems hover */
        .menu-vertical > ul.root > li.static > ul.static > li.static a:hover
        {
            text-decoration: none !important;
            background-color: #0087C1; /* fallback */
            color: #000;
        }
        /* Selected SubItems  */
        .menu-vertical > ul.root > li.static > ul.static > li.selected > a.selected
        {
            background-color: #fff;
            border: 1px transparent solid !important;
            padding-left: 10px !important;
        }
        /* Selected SubItems  */
        .menu-vertical > ul.root > li.static > ul.static > li.selected > a.selected > span > span
        {
            color: #000;
        }
        .menu-vertical > ul.root > li.static > ul.static > li
        {
            border-bottom: 1px #8C8C8C solid !important;
        }
    </style>

This will add the styling to your left navigation bar with the hover effect, But still we need to add accordion style to it.

Copy the following code-snippet to your <Head> tag of V4.master page
<script type="text/javascript" src="../../Style Library/jsapi.js"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $("div.menu-vertical>ul.root>li.static>a").toggle(
            function () {
                $(">ul", $(this).parent()).show("fast");
            },
            function () {
                $(">ul", $(this).parent()).hide("fast");
            }
            );
            $("div.menu-vertical>ul.root>li.static>ul.static").css("display", "none");
            var s = $("div.menu-vertical>ul.root>li.static>ul.static>li.selected").parent();
            var p = s.parent();
            p.find('ul').css("display", "");
        });
    </script>




If you look through the above code-snippet you will find that we have made reference to jsapi.js file. You can find this jsapi.js file over here. Download this file and upload it to the Style Library Folder and you are good to go. (You can upload it to different location also but do not forget to update the location in this code-snippet)

Check-In the Master page, And your Left Navigation Quick Launch is ready with the Accordion Effect !

4. Add Social Icons

Now a days Everyone is going social, so its necessary to market your brand on the social networking sites like Facebook, Twitter, Linked-In and so on. This way has been proved very useful to market your business/site.

You can get the icons used in this example from here. Upload the icons into the Style Library/Images folder of your site.

Now again we will be playing with the CSS again.

Copy the below code-snippet and paste it in the <Head> tag of your V4.master page
<style>
        #social
        {
            margin-bottom: 0px;
            position: relative;
            float: right;
            width: 300px;
            margin-right: 10px;
            height: 50px;
        }
        #social UL
        {
            padding-bottom: 0px;
            list-style-type: none;
            margin: 0px;
            padding-left: 0px;
            padding-right: 0px;
            list-style-image: none;
            padding-top: 0px;
        }
        #social LI
        {
            float: left;
            margin-left: 2px;
            display: inline;
        }
        #social A
        {
            text-indent: -99999px;
            width: 55px;
            display: block;
            height: 55px;
        }
        #social-fl A
        {
            background-position: 0px 0px;
        }
        #social-fb A
        {
            background-position: -88px 0px;
        }
        #social-tw A
        {
            background-position: -95px 0px;
        }
        #social-rss A
        {
            background-position: -143px 0px;
        }
        #social
        {
            margin-top: 0px;
            float: right;
        }
        #social UL
        {
            padding-bottom: 0px;
            list-style-type: none;
            margin: 0px;
            padding-left: 0px;
            padding-right: 0px;
            list-style-image: none;
            padding-top: 0px;
        }
        #social LI
        {
            float: left;
            margin-left: 2px;
            margin-right: 10px;
        }
        #social LI A
        {
            text-indent: -99999px;
            width: 48px;
            display: block;
            background-repeat: no-repeat;
            height: 48px;
        }
        #social-tw
        {
            background-image: url('/Style%20Library/Images/twitter4_512.png');
        }
        #social-li
        {
            background-image: url('/Style%20Library/Images/linked_in.png');
        }
        #social-fb
        {
            background-image: url('/Style%20Library/Images/facebook.png');
        }
        #social-rss
        {
            background-image: url('/Style%20Library/Images/google_plus.png');
        }
        #social-blog
        {
            background-image: url('/Style%20Library/Images/blog.png');
        }
    </style>



At this point we have just prepared the style, now we acctually need to add it in our Body of our V4.master page.

Locate the <td class="s4-socialdata-notif"> tag in your master page and add the below EXACT code-snippet ABOVE this tag.

<td>
        <div id="social">
            <ul>
                <li id="social-tw"><a title="Follow us on Twitter" href="https://twitter.com/BeingDhavalShah">
                    Twitter</a></li>
                <li id="social-li"><a title="Link up with us on Linked In" href="http://in.linkedin.com/pub/dhaval-shah/22/8b0/280">
                    LinkedIn</a></li>
                <li id="social-fb"><a title="Friend us on Facebook" href="https://www.facebook.com/dhaval.shah01">
                    Facebook</a></li>
                <li id="social-rss"><a title="Connect on Google Plus" href="https://plus.google.com/114652325732564196178/posts?hl=en">
                    Google Plus</a></li>
                <li id="social-blog"><a title="Dhaval Shah's Blog" href="http://kalashnikovtechnoblogs.blogspot.com">
                    Blog</a></li>
            </ul>
        </div>
    </td>


Save/Check In your master page, and you can see the Social Networking icons located right above the Top Navigation Bar !
You can customize it to add/remove the icons according to your choice.

My next article will be end of this tutorial(Hopefully) !

Stay tuned ! Happy SharePointing !

Please do Share/Like/Comment if this article helped you, author really appreciates.

Sharepoint Branding And Customizations - Part 1

Last week I took part in the EUSP Hunger Games Challenge organized by EndUserSharepoint community. Where we were to perform some tasks and submit our sharepoint site back to them.


The major part which I concentrated on was SharePoint Branding, I wanted my SharePoint site to look more stylish than our typical SharePoint Site. Here are the Screen-shots of what I achieved in almost one day work !
You can view the site over here, But I am not sure how long this week will be active as I was using trial version of CloudShare.

I will divide the branding part into 6 steps :
  1. Get a Logo for your site
  2. Customize your Top Navigation Bar
  3. Customize your Quick Launch on Left Navigation Bar
  4. Add Social Icons
  5. Add Copyright Footer
  6. Customize your page to add twitter,FAcebook and Youtube to your page
Lets start with the 1st Step

1. Get a Logo for your site

Its necessary to have your own logo for your site, Get it designed and follow the below steps to upload it.

I designed the logo for myself ! Sharepoint Geek - Dhaval Shah :)

Al right, now you have to do is to open your V4.master page using SharePoint Designer. Search for the tag "s4-titlelogo" and replace the default logo url in the <Sharepoint:SiteLogoImage> tag with your uploaded logo.

<td class="s4-titlelogo">
      <SharePoint:SPLinkButton runat="server" NavigateUrl="~site/" id="onetidProjectPropertyTitleGraphic">
     <SharePoint:SiteLogoImage name="onetidHeadbnnr0" id="onetidHeadbnnr2" LogoImageUrl="/_layouts/images/SPGeek.png" runat="server"/>
     </SharePoint:SPLinkButton>
</td>

So Step1 was not that tough, Lets move to next step.

2. Customize your Top Navigation Bar

For this we have to play around with the CSS a little bit. By Default, V4.master page uses the core.css file for styling. we won't be changing that but we will over-ride the styles from core.css file in our master page, So it's good to have little bit idea about the the styles used in core.css. I suggest you to go through the stylesheet. If you are lazy like me, don't worry you can directly copy-paste the styles specified below in your master page.

    <style>
        /* Navigation list */
        .s4-tn
        {
            background-color: #00557B;
            padding: 0px;
            margin: 0px;
        }
        /* Global navigation */
        .s4-tn li.static > .menu-item
        {
            color: #fff;
            white-space: nowrap;
            border: 1px solid transparent;
            padding: 4px 10px;
            line-height: 25px;
            height: 28px;
        }
        /* Hover */
        .s4-tn li.static > a:hover
        {
            background: url("/_layouts/Images/selbg.png") repeat-x left top;
            background-color: #0087C1;
            color: #000;
            text-decoration: none;
        }
        /* Selected */
        .s4-toplinks .s4-tn a.selected
        {
            background: url("/_layouts/Images/selbg.png") repeat-x left top;
            background-color: #0087C1;
            color: #fff;
            text-decoration: none;
            border: 1px transparent solid;
            padding-right: 10px;
            padding-left: 10px;
            margin: 0px;
        }
        /* Position for search */
        .s4-search
        {
            padding-top: 7px !important;
        }
        /* Remove dotted outlines */
        a:hover, a:active, a:focus
        {
            outline: none;
        }
       
        /* No arrows applies two levels */
        .menu-horizontal a.dynamic-children span.additional-background, .menu-horizontal ul.dynamic a.dynamic-children span.additional-background
        {
            background-image: none;
        }
        .s4-tn ul.dynamic
        {
            /* UL wrap */
            background-image: none;
            border-top: 0px #ccc solid;
            border-right: 1px transparent solid;
            border-bottom: 1px #ccc solid;
            border-left: 1px #ccc solid;
            margin: 0px;
            padding: 0px;
        }
        /* LIs */
        .s4-tn li.dynamic
        {
            background-image: none;
            border-top: 1px #ccc solid;
            border-right: 1px #ccc solid;
            border-bottom: 1px #fff solid;
            border-left: 1px #fff solid;
        }
        /* LI menu items */
        .s4-tn li.dynamic > .menu-item
        {
            padding: 7px 10px;
            height: 16px;
            color: #333;
            background-color: #f7f7f7; /* fallback */
            background: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#f7f7f7));
            background: -moz-linear-gradient(top, #ffffff, #f7f7f7);
            filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffffff, endColorstr=#f7f7f7);
            -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffffff, endColorstr=#f7f7f7)";
        }
        /* LI menu items hover */
        .s4-tn li.dynamic > a:hover
        {
            color: #00557B;
            background-color: #fff; /* fallback */
            background: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#ffffff));
            background: -moz-linear-gradient(top, #ffffff, #ffffff);
            filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffffff, endColorstr=#ffffff);
            -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffffff, endColorstr=#ffffff)";
        }
    </style>



Just paste the above code-snippet in the <Head> tag of your V4.master page.
And style of your Top Navigation bar would be updated. Not so much to do, Isn't it ?

In my next article I will explain the other steps.

Stay tuned ! Happy SharePointing !

Please do Share/Like/Comment if this article helped you, author really appreciates.