Showing posts with label SharePoint Service. Show all posts
Showing posts with label SharePoint Service. Show all posts

May 31, 2016

SharePoint 2010/2013 - Search Service stuck at "Error Starting" OR "Error Stopping"


Problem:
We ran into an issue wherein, when users search for specific content within SharePoint, users were not able to see the SharePoint search results. This issue was global for all web applications in the farm. To resolve this issue, we checked whether "SharePoint Server Search" service under "Manage Services on Server" in Central Admin was running or stopped. Now, here we found that "SharePoint Server Search" service was stuck at "Error Starting".

To identify the exact issue, we analyzed ULS logs and we found below error in the ULS.

"The Execute method of job definition Microsoft.SharePoint.Administration.SPServiceInstanceJobDefinition (ID a41c8bc6-6ee7-4039-b171-277686fc0b96) threw an exception. More information is included below.  Unable to cast COM object of type 'Microsoft.Office.Server.Search.Administration.MSSITLB.CGatheringManagerClass' to interface type 'Microsoft.Office.Server.Search.Administration.MSSITLB.IGatherManagerAdmin3'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{0FF1CE15-013A-0000-0000-000000000000}' failed due to the following error: Error loading type library/DLL. (Exception from HRESULT: 0x80029C4A (TYPE_E_CANTLOADLIBRARY))."

Solution: 
We tried many different ways to resolve this issue, but couldn't succeed. After some depth analysis and research, we found exact root cause of the error and solution.

Actually, Search Service is not able to locate a specific ".dll" at specified location.

Step -1: Now, let's find out what is going wrong. Copy the above highlighted GUID from your ULS log.

Step - 2: Open "regedit" from Run.

Step - 3: From the "Registry Editor" and press "Ctrl+F" and search the above highlighted GUID (This GUID is located under "HKEY_CLASSES_ROOT\Interface\").

Step - 4: Expand the Key, and select "TypeLib" and you will get something like following.

Step - 5: Note the new GUID located under "TypeLib" folder. And again search this GUID, as a result we will have same result as above, but with new GUID.

Step - 6: Now, this GUID will be something like "0FF1CE15-0001-11B0-0000-000000000000". This is the Key/GUID that holds our solution. This can be located under "HKEY_CLASSES_ROOT\TypeLib\".

Step - 7: Locate this Key/GUID ("0FF1CE15-0001-11B0-0000-000000000000") under "HKEY_CLASSES_ROOT\TypeLib\" and expand the Key. Then navigate to "1.0 > 0 > win32" and edit the below highlighted data.


Step -8: This property will have URL to "mssrch.dll" file. So update the URL with "C:\Program Files\Microsoft Office Servers\15.0\Bin\mssrch.dll\1" if you are running on SharePoint 2013 or with "C:\Program Files\Microsoft Office Servers\14.0\Bin\mssrch.dll\1" if you are running on SharePoint 2010.

That's it. Just delete the old search service and create the new one. Start a full crawl and we are good to go !!

If you have any questions you can reach out our SharePoint Consulting team here.

May 24, 2016

Setup Search Crawl in SharePoint 2013

If you want to configure Full/Incremental/Continuous search crawl, follow below steps:
1. On the Configure Search Settings page, in the Crawl Settings section, click Content sources and crawl schedules.
2. On the Manage Content Sources page, right click the content source for which you want to schedule an incremental crawl and then click Edit.
3. On the Edit Content Source page, in the Crawl Schedules section, do the following:
Incremental/Full crawl setup:

If an Incremental/Full crawl has never been created for this content source, click the Create schedule link below the Incremental/Full Crawl list.
   
-or-
If you are changing the Incremental/Full-crawl schedule, click the Edit schedule link below the Incremental Crawl list.
1. In the Manage Schedules dialog box, in the Type section, select Daily, Weekly, or Monthly.
2. In the Settings section, do the following:
   2.1 In the Run every box, type the number of days between crawls. For example, to schedule an incremental crawl to start every other day, type 2.
   2.2 In the Starting time list, select the time of the day from which to start the scheduled crawl.
   2.3 If you want to crawl more frequently than once a day, select the Repeat within the day box and type the number of minutes to wait between crawls in the Every box and type the total number of minutes in which to repeat the crawl within the same day in the For box. For example, if you select Repeat within the day and type 60 in the Every box and 720 in the For box, an incremental crawl of the content source you are configuring starts every 60 minutes up to 720 minutes (12 hours) after the first scheduled incremental crawl for this content source ran.
   2.4 Click OK.
3. Click OK in  Content Source page.

Continuous crawl setup:
1. Select the continuous crawl radio button in Crawl Schedule Section.
2. Click OK in  Content Source page.
Unlike an incremental crawl, which starts at a particular time and repeats regularly at specified times after that, a continuous crawl automatically starts at predefined time intervals. The default interval for continuous crawls is every 15 minutes.

To Change the Continuous crawl time do the following steps:

Prerequisite:
Verify that the user account that is performing this procedure is a member of the Farm Administrators group.

Steps:
1. Start a SharePoint 2013 Management Shell.
2. In Windows PowerShell command prompt, type the following commands:
        $ssa = Get-SPEnterpriseSearchServiceApplication
        $ssa.SetProperty("ContinuousCrawlInterval",n)

Where "n" is the regular interval in minutes at which you want continuous crawls to start. The default interval is every 15 minutes. The shortest interval that you can set is 1 minute.

Note:
If you reduce the interval, you increase the load on SharePoint and the Crawler. Make sure that you plan and scale out of resources accordingly for this increased consumption .

If you have any questions you can reach out our SharePoint Consulting team here.

April 2, 2013

All about Explorer View

  • The Explorer View is an excellent feature that is integrated with SharePoint that allows a user to access a document library as if you were accessing a file system through a Windows Explorer window.
  • Being end users, everyone might feel that this is very easy to use. But there are multiple complex interactions happening with different technologies to make documents which are not present in file systems to viewable using explorer.
Note: In earlier version of windows webclient service could be installed by enabling WebDAV and FPRPC component in IIS.
  • The main protocols that are capable of directly manipulating file data stored in SharePoint 2007 are
    • - WebDAV (Web Distributed Authoring and Versioning)
      • WebDAV is a simple extension to the HTTP protocol based on a public specification. It provides an extended vocabulary that defines how basic file functions, such as copy, move, delete, and create folder, are performed across HTTP.
    • - FPRPC (FrontPage Server Extensions Remote Procedure Call)
      • FPRPC provides WebDAV capabilities using extensions to the HTTP vocabulary, but it also has the ability to embed more complex Remote Procedure Call (RPC) communications in the data portion of the packet.
  • WebDAV FPRPC
    Microsoft WebDAV implementation is based on a public standard for authoring and versioning via HTTP FPRCP is a Microsoft technology that is primarily used for its value-added FrontPage capabilities
    Cannot work with SSL sites Can work with SSL sites
    Can map the site as a drive (mapped drive) Cannot map the site as a drive (mapped drive)
    Works only with site which are running under port 80 Works with any sites
  • In addition, please double check whether you meet the following conditions:
    • Make sure all computers accessing the Explorer View have the Web Client Service enabled and running. This is the default behavior for Windows XP, but not for Windows Server 2003.
    • Only host content on the default Web port of 80. If you need to host multiple Web sites on a single server, use host headers or multiple IPs to make those Web sites unique.
    • Do not encrypt Explorer View traffic using SSL. SSL uses port 443, and the Microsoft WebDAV implementation does not work on ports other than 80.
HOWTO: Enable Web Client Service for Windows explorer view:
Prerequisite:

Check For If Web Client Service is enabled and running on the computer where you are trying to open Windows Explorer view.
If No, Follow below given steps to make it available.
Note : In earlier version of windows webclient service could be installed by enabling WebDAV component in IIS
  • To enable webclient service, we need to install desktop experience feature.
  • Start the Windows Server Manager.
  • In the tree view, highlight the Features node.
  • In the details pane, click Add Features.
  • In the Add Features Wizard, check the Desktop Experience box
  • Click Next.
  • Click Install.
  • When the Add Features Wizard has finished, click Close.
  • Click Yes when promoted to restart the computer.
If Yes, Follow below given steps to make it Running.
  • First, right click "My Computer" and select "Manage". You may get a pop up that asks you if you are sure you want to make changes here, so click yes.
  • You will get the Windows Management console now, and it should look something like this:
  • Expand the "Services and Applications" at the bottom. Select "Services" from here:
  • The middle window pane will expand to list all the services installed and whether or not they are running. Scroll down to find the "WebClient" service. Double click it:
  • Finally, you should see this property sheet:
  • Change the Startup type here to Automatic. Go ahead and Start it too (click the Start button) if that does not automatically happen. Then save all your changes.
  • Now when you start Windows this will start this process as well.
How to View a SharePoint 2010 document library in Windows Explorer:
If you're in SharePoint 2010 (either Server or Foundation) and found it difficult to get the "Explorer View"… that's because it doesn't exist any more. The product group took it out between 2007 and 2010.
Having some sort of Explorer view s important for obvious reasons:
  • Multi-select documents using rubber banding
  • Drag & drop files to-and-from from your desktop (again, ca
  • Right mouse click a file for "Properties"
  • Preview documents in Explorer pane
In order to get a similar "Explorer View" to access the files in the SharePoint document repositories in your sites, you need to:
  • Go to the site's document repository (See below)
  • Click on 'Library'
  • Click "Open in Explorer" to the far right.
  • It may be hidden so expand the browser window to reveal it

OR

If you have any questions you can reach out our SharePoint Consulting team here.

March 29, 2013

Create and Configure Word Automation Service

Word Automation Services Overview

Word Automation Services is a new service application in SharePoint Server 2010. Word Automation Services provides unattended, server-side conversion of documents into formats that are supported by the Microsoft Word client application.
In simplest terms, Word Automation Services takes the "Save As…" functionality of the Word client application and replicates it for the server.

Specifically, Word Automation Services provides the following capabilities:

Opens documents that Word can open, including
  • Open XML File Format documents (.docx, .docm, .dotx, .dotm)
  • Word 97-2003 documents (.doc, .dot)
  • Rich Text Format files (.rtf)
  • Single File Web Pages (.mht, .mhtml)
  • Word 2003 XML Documents (.xml)
  • Word XML Document (.xml)

Supports all automatic tasks that execute when a document opens, such as:

  • Updating the Table of Contents, the Table of Authorities, and index fields
  • Recalculating all field types
  • XML mapping
  • Setting the compatibility mode of the document to the latest version or to previous versions of Word
Saves documents types that Word can save. This list is identical to the previous list of files that the Word Automation Services can open, but also includes the following types:
  • Portable Document Format (PDF) files
  • XML Paper Specification (XPS) files
With Word Automation Services, tasks that previously required you to run the Word client application can now be automated to run unattended in a more reliable and scalable way.

Start a Word Automation Service

To start a "Word Automation Service" by using Central Administration
  • Verify that you have the following administrative credentials:
    • To start a Word Automation Service, You must be a member of the Farm Administrators group.
  • sOn the Central Administration Home page, in the System Settings section, click on the Manage services on server.
  • If Word Automation Service is shown Stopped then click on the Start.
  • After clicking on the Start, Word Automation Service status is shown Started

Create a Word Automation Service

To create a Word Automation Service by using Central Administration
  • Verify that you have the following administrative credentials:
    • To create a Word Automation Service, You must be a member of the Farm Administrators group.
  • On the Central Administration Home page, in the Application Management section, click on the Manage service applications.
  • Click on the new ribbon and then click Word Automation Services.
  • In the Name section, Type a name Ex- "Word Automation Service" in the textbox for the new service application.
  • In the Application Pool section, choose an existing Application Pool or Create a New Application pool name Ex- "Word Automation Service Apppool" in the textbox.
  • In the Application Pool section, choose a proper Account Ex- spservices from the Configurable dropdown.
  • In the Partitioned Mode section, uncheck the 'Run in partitioned mode' checkbox.
  • In the Add to Default Proxy List section, check 'Add this service application's proxy to the farm's default proxy list' Checkbox.
  • Click Next.
  • In the Database section, Type the name of the database ex- WSS_Content_WordAutomation (that you want to use to store the document queue for this instance), and Type the default Database Server where that database is installed.
  • In the Database Authentication section, choose Windows authentication.
  • Click Finish.

List all Word Automation Services

To list all the Word Automation Services by using Central Administration
  • On the Central Administration Home page, in the Application Management section, click on the Manage service applications.
  • The "Word Automation Services" are listed on the Manage Service Applications page.

Delete a Word Automation Service

To delete a Word Automation Service by using Central Administration
  • Verify that you have the following administrative credentials:
    • To delete a service, you must be a member of the farm administrators group.
  • On the Central Administration Home page, in the Application Management section, click on the Manage service applications.
  • Select the Word Automation Service that you want to delete.
  • On the ribbon, click Delete.
  • In the confirmation dialog box, check the 'Delete data associated with the Service Applications' checkbox and click OK.

OR

To delete a Word Automation Service by using Windows PowerShell
  • .Go to the Start menu, click All Programs
  • Click Microsoft SharePoint 2010 Products
  • Click SharePoint 2010 Management Shell.
  • From the Windows PowerShell command prompt (that is, PS C:\>), type the following below command and press ENTER:
Remove-SPServiceApplication
Command: remove-spserviceapplicationpool "Word Automation Service Apppool"

If you have any questions you can reach out our SharePoint Consulting team here.

June 18, 2012

SharePoint Search: Partial Page Exclusion

Out of the box, SharePoint provides a mechanism for excluding publishing pages from the search index by any number of criteria, but what if you want to exclude only parts of a page? This becomes useful when you have content on numerous pages that contains common keywords.
For Example, In Our Production site we have master page and in this master page , Header , Left Navigation and footer for the Pages.
So when someone performs a search for "Careers" they will get back every page in your site, instead of just the Careers and related Careers pages. To prevent this, we needed a way to keep SharePoint from indexing that content when it's performing a crawl.
Web Control
We decided that a System.Web.UI.WebControls.Panel control would be a good model to build my control on. It allows you to easily drop it in the page layout using SharePoint Designer, and you can put other html and controls within it. I didn't want to inherit from the Panel control though, because it adds unwanted 'div' tags to the rendered output. The key to the Panel control's behavior are the following two attributes on the class:
[ParseChildren(false), PersistChildren(true)].
These attributes allow the content within the control to persist as controls and not properties of this control.
User Agent
The second part of the equation is knowing when to show or hide the contents of the web control.
SharePoint gives us a way to identify that it's performing a crawl through the UserAgent property of the http request by adding "MS Search" to it.
Code
Putting this all together we come up with the following class:

[ParseChildren(false), PersistChildren(true)]
    public class SearchCrawlExclusionControl : WebControl
    {
        private string userAgentToExclude;

        public string UserAgentToExclude
        {
            get
            {
                return (string.IsNullOrEmpty(userAgentToExclude)) ? "ms search" : userAgentToExclude;
            }
            set
            {
                userAgentToExclude = value;
            }
        }

        protected override void CreateChildControls()
        {
            string userAgent = this.Context.Request.UserAgent;

            this.Visible = (!string.IsNullOrEmpty(userAgent)) ? !userAgent.ToLower().Contains(UserAgentToExclude) : true;

            base.CreateChildControls();
        }

    } 
Using It
Register Web Control within Page.
<%@ Register Tagprefix="SearchUtil" Namespace="ABC.SharePoint.WebControls" Assembly="ABC.SharePoint, Version=1.0.0.0, Culture=neutral, PublicKeyToken=xxxxxx" %>
After adding the register tag to the page layout, we can wrap all the content we want to exclude with our control:
<SearchUtil:SearchCrawlExclusionControl ID="SearchCrawlExclusionControl1" runat="server">
    <div>Some Content To Excludediv>
SearchUtil:SearchCrawlExclusionControl>
Test this:
After applying this User control to all your excluding Div and HTML tags.
Make Incremental or Full crawl of you web site.
How to edit the User Agent string in Mozilla FireFox
To change the User Agent string, just enter about:config as an address in the address bar of FireFox, the location where you normally enter a URL (link). I recommend to preserve the original value, which you can get when you enter just about: in the address bar.
Now press the right mouse button to get the context menu and select "String" from the menu entry "New". Enter the preference name "general.useragent.override", without the quotes. Next, enter the new User Agent value you want Mozilla Firefox to use.
I added my name and a link to my web site to the original value. You can also pick one from the list of User Agent strings. Check the new value by entering about: in the address bar.
How to edit the User Agent string in Google Chrome
Here's how to change the user agent:
  • open the Developer Tools (Ctrl+Shift+I on Windows/Linux, Command - Option - I on Mac OS X)
  • 2. click the "settings" icon at the bottom of the window
  • 3. check "override user agent" and select one of the options (Internet Explorer 7/8/9, Firefox 4/7 for Windows/Mac, iPhone, iPad and Nexus S running Android 2.3).

You can also select "other" and enter a custom user agent.
Note: Here to test for SharePoint search write MS Search as User Agent in Other option.
How to edit the User Agent string in Internet Explorer
To change it open your registry and find the key
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\User Agent\Post Platform].
Each value name listed in this key will be sent to the remote web server as an additional entry in the user agent string. To remove any additional information delete the values within the [Post Platform] key. To add additional entries create a string value and name it the string you want to be sent.
Restart Internet Explorer for the changes to take effect.
Note:Here to test for SharePoint search write MS Search as User Agent in Other option.
If you have any questions you can reach out our SharePoint Consulting team here.

May 15, 2012

Managed metadata column limitation


There is an interesting article on managed metadata column limitation from sharepointanalysthq wihch describes many interesting limitations. That list is really useful. There are some useful suggessions that I want to add to the list:
  • Never export list/document library with managed metadata as template with data in order to copy it locally or othre places. Main reason behind the same is, managed metadata columns has term store, term set etc defined and they will not match in the destination managed metadata application and can cause problems
  • Never stop/remove taxonomy updater services, specially because they are responsible to make sure your manage matadata columns are having consistent and up-to-date data all the time.
  • One of the option for moving list/libraries with managed metadata column along with preserving all it's IDs is to use http://spdeploymentwizard.codeplex.com/ utility.
That's it for today, keep in touch for more managed metadata related interesting findings.

If you have any questions you can reach out our SharePoint Consulting team here.

March 28, 2012

Managed metadata service not working

Problem:

The Managed Metadata Service or Connection is currently not available. The Application Pool or Managed Metadata Web Service may not have been started. Please Contact your Administrator

Solution:

After googling for many hours, I was able to fix this problem. Here is the check list to fix it properly.

1.Make sure managed metadata service application pool is started in IIS
2.Make sure managed metadata service aplication pool identity has full access on service's physical folder
3.Go to central admin > Service applications > select managed metadata srevice and click on administrators. Add local farm and system account users to this list
4.Go to central admin > Service applications > select managed metadata service and lcick on permissions, add local farm and system account and allow full control for this
5.reset IIS


Note: Please note that we are trouble shooting this on a developer machine and giving local farm and system administrator account full access doesn't cause any problem, please use appropriate accounts for the same.

Happy administration

If you have any questions you can reach out our SharePoint Consulting team here.