Jean Paul's Blog

There are 2 types of People in the World, One who Likes SharePoint and..

  • Microsoft MVP

  • MindCracker MVP

  • CodeProject MVP

  • eBook on SharePoint 2010

  • eBook on Design Patterns

  • eBook on Windows Azure

  • NLayers Framework @ CodePlex

  • MSDN Forums

  • .Net vs. Java

    Due to Public Demand

Posts Tagged ‘configuration’

BCS External Content Type Configuration

Posted by Jean Paul on February 7, 2016


In this article we can explore how to configure BCS External Content Type in SharePoint 2013.


BCS (Business Connectivity Services) allows Interfacing to Data that does not Live in SharePoint. For example, we can connect to External Databases, OData Sources etc.

When to use BCS?

The ideal scenarios to use BCS are:

· To leverage an existing SQL Server Table containing Data. BCS would free us from duplicating the Table in SharePoint. BCS also saves the cost involved in Synchronizing Data if there are users working on updating the source table.

· In Internal SharePoint application requiring data from External application. In this case we can create Custom .Net BCS Providers.

BCS Example

In our example we are creating a BCS List pointing to SQL Server Table. Please follow the steps below to create the BCS List in SharePoint. After the List creation, you will be able to Add/Edit/Delete items in the List & everything will reflect back in the SQL Server Table.

Step 1

Create a new SQL Server table named Customer.

Use the following structure:

1. Id Integer Identity

2. Name Nvarchar (max)

3. Address Nvarchar (max)

Fill the Table with some data as shown below.

Step 2

Open SharePoint Designer 2013 & Go to External Content Types pane as shown below.


Choose the External Content Type button from the left pane for creating a New External Content Type. (External Content Type is the keyword for referring BCS Content Types)

Enter the Name for the Content Type and click the highlighted area below to configure External Data Source.


You will get the following dialog. Choose Add Connection option.


In the appearing dialog choose SQL Server.


Enter the Credentials to SQL Server.

Choose our table. Right click and choose Create All Operations.

You will get the following wizard.


Click Next with default values.

Step 3

Now we need to create the List Instance. Go to Lists and Libraries in Designer and click the External List ribbon item.


Choose our Content Type from the appearing dialog box.


Click OK to continue. Enter the name as Customers for the list. Now you have successfully created the List Instance of our External Content Type.

Step 4

Now we can Test our new List. Open SharePoint & You should be able to see the Customers list in the Quick Launch. Click on it to see the items below.


Once you can see the data like above – You have successfully configured BCS External Content Type.


It is not surprising that you may get the following errors. You can refer the associated links to resolve them.

Access denied by business data connectivity.

Login failed for user

AuthenticationMode RevertToSelf



In this article we have explored how to configure BCS External Content Type in SharePoint 2013.

Posted in SharePoint, SharePoint 2013 | Tagged: , , , | Leave a Comment »

Laptop Configuration for SharePoint 2013

Posted by Jean Paul on April 3, 2015

The article can be found in hubpages >

Posted in SharePoint, SharePoint 2013 | Tagged: , , | Leave a Comment »

Search – Result Sources

Posted by Jean Paul on April 18, 2014

In this article we can explore the Result Sources in SharePoint 2013 Search.

What is Result Source?

Result Source (Vertical) is a sub set or particular type of content. They are used to limit search results.

For example, we can use Result Source for a particular:

1. Content Type

2. Sub Site

Default Result Sources

SharePoint 2013 has 16 pre-configured result sources. The default one is Local SharePoint Results:


Central Administration > Search Service Application > Result Sources:


What is inside the Result Source?

We can closely examine a Result Source. Click on the Local Video Results result source. You will be taken to the page where it shows a Query Transform which controls the results.


The Query Transform text is below:

{searchTerms?} {?path:{Scope}} {?owstaxIdMetadataAllTagsInfo:{Tag}} (ContentTypeId:0x0120D520A808* OR (SecondaryFileExtension=wmv OR SecondaryFileExtension=avi OR SecondaryFileExtension=mpg OR SecondaryFileExtension=asf OR SecondaryFileExtension=mp4 OR SecondaryFileExtension=ogg OR SecondaryFileExtension=ogv OR SecondaryFileExtension=webm))

The searchTerms parameter represents the user-query-terms. The remaining text checks for Content Type Id and File Extensions. We can also create custom query transforms.

For more information on Query Transform you can check References section.

Each Result Source can be connected to the Search Navigation web part.


Creating a Result Source

Now we can try creating a new Result Source & Connecting it to the Navigation web part.


Our target is to create a Documents result source & connect to the navigation web part.

Following are the steps summary.


Step 1: Create new Result Source

Open Central Administration > Manage Service Applications > Search Service Application > Result Sources link


Choose the New Result Source link.

Step 2: Modify Query

In the appearing page, enter the name for the Result Source as Docs.


Then Launch the Query Builder and enter the following code.



You can also test the query using Test Query button. Once you are seeing results you are good.


We are using the KQL (Keyword Query Language) syntax to filter the result. The term {searchTerms} will be the user input keywords. Please make sure you have enough documents satisfying the result.

Step 3: Create Page

Each Result Source should be connected with a Result Page. To create a new page, open SharePoint Designer 2013 and navigate to your Enterprise Search Center site.


If you do not have SharePoint Designer 2013 installed, you can download it from:

Navigate to All Files > Pages library as shown below.


Copy & Paste the results.aspx and rename the new file as documentresults.aspx.


Close the Designer.

Step 4: Modify Page

We need to modify the new result page & choose our new result source. Inside SharePoint navigate to the new documentresults.aspx. In my case the URL was:


Choose the Edit Page option & bring the Search Results Web Part in edit mode.



Each Result Page will be having pre-configured web parts like:

1. Result web part

2. Refiner web part

3. Navigation web part

Choose the Change Query button & Select our new Result Source as shown below.


Click OK to close the web part editing & Save changes to the page.

We are now ready with the following:

· Result Source

· Result Page

We need to create the Navigation Link next.

Step 5: Create Navigation Link

From the Enterprise Search Center choose Site Settings. Then choose Search Settings link.


In the appearing page scroll down to the Configure Search Navigation.


Choose an existing link & Click the Edit button to understand the properties. Then click on the Add Link to create our new navigation link. Enter the Name and Navigation Link appropriately.


Please note that the Navigation Link is relative to the site.

Save changes to the dialog & Click Ok to save the navigation items.

Step 6: Testing the link

Type your new search keyword & click on the newly appeared Docs link.


You can see that the Results are filtered to show only document items. You can also see the Result URL has changed to http://hpvm/esearch/Pages/documentresults.aspx

This confirms our Result Source creation & testing.



In this article we have explored Result Sources in SharePoint 2013 Search with an example. In advanced scenarios, I recommend you to refer the KQL (Keyword Query Language) and FQL (FAST Query Language) to create complex search verticals.

Posted in SharePoint, SharePoint 2013 | Tagged: , , , , | Leave a Comment »

Search Configuration

Posted by Jean Paul on April 13, 2014

In this article we can explore the underlying Configurations required to enable Search in SharePoint 2013.

Search Service Application

Search Service Application needed to be created for working with SharePoint Search. This service application enables all the search components & provides interface to manage them.

The underlying infrastructure includes:

· Content Sources

· Result Sources

· Result Types

· Crawler

· Indexer

· Schema

By default, Search Service Application is created while installing SharePoint.

How to create Search Service Application?

Open Central Administration > Manage service applications link.


In the appearing page you can see the Search Service Application listed.


If you cannot see one, choose the New button from the ribbon, then Search Service Application item.


In the appearing page enter the application information:

· Name

· Application Pool

· Account


Click the Ok button to save changes. Wait for few minutes & your Search Application Service will get created.


You can click on the Search Service Application to view the Search Topology.


It is recommended to use a Managed Account for search.

Search Accounts

We can specify the user accounts who can manage the service application.

Service Applications page > Click on the Search Service Application (non-text area) > Click Administrators button from the ribbon.

In the appearing page enter the Administrator account; Click Add button & give check the Permission items as shown below.


Click OK button to save changes.

Search Components

Following are the core Search Components:

· Crawler

· Indexer

· Query Processor

Crawler is responsible for reading all the contents (documents, lists, items etc.)

Indexer maintains an index to the crawled contents

Query Processor handles user queries. For example when user searches for Home the query processor handles it.

Analyzer carries out search usage analysis.

Types of Crawling

There are 3 types of Crawling:

· Full Crawl where the entire content will be crawled. This is time consuming & usually takes 30 minutes for a 1 GB of content. (no 2 crawls can be in parallel)

· Incremental Crawl only crawl content modified since last crawl. (no 2 crawls can be in parallel)

· Continuous Crawl can be configured to start at regular intervals & multiple crawling can happen. Thus continuous crawl provides fresh results compared with others.



Despite availability of incremental & continuous crawls, a Full Crawl might be required during service updates, new content source addition, managed properties extraction etc.

Content Sources

By default there will be a content source named Local SharePoint sites. We can also configure other content sources like:

· Another SharePoint site

· External website

We need to perform a Full Crawl to do our search.

Full Crawl

To perform a Full Crawl open Central Administration > Service Applications > Search Service Application > Content Sources link.


In the appearing page click the context menu over default content source & choose Start Full Crawl option.


Wait for few minutes until the Crawl is completed. You can refresh the page often to see the status.

Testing Search

After the Full Crawl is completed you can go back to the SharePoint Site and search for Home. If your site title matches the word, you will get results like below.


The result confirms the Search is configured correctly.



In this article we have explored the Configuration required to enable Search in SharePoint 2013.

Posted in SharePoint, SharePoint 2013 | Tagged: , , , | Leave a Comment »

How to edit app.config file?

Posted by Jean Paul on January 13, 2011

The application configuration file provides flexibility in reading application settings.  But once in a while it is needed to change the settings programmatically. 

We can see how it is made possible.

Step 1: Create new Windows Forms application

Create a new windows forms application and add a config file into it.

Step 2: Add reference to System.Configuration

Add reference to System.Configuration namespace

Step 3: Add code to edit config

System.Configuration.Configuration configuration = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);

            configuration.AppSettings.Settings.Add(“font”, “Calibri”);



For editing an existing appSettings key – we have deleted and added the key.

Posted in WinForms | Tagged: , , , , | Leave a Comment »