Challenges faced during InfoPath form Migration from Moss 2007 to SharePoint 2013

Challenge 1:
During Migration from Moss 2007 to SharePoint 2013 - all  old infopath forms that exists in Form/Document  library were opening /working  with new InfoPath 2013 form, but People picker does not contain any value.

Note:-
This is due to schema structure of People Picker control has changed from Moss2007 to SharePoint 2013.

Resolution:
Since the people picker in InfoPath 2013 is changed, we had to add extra namespace to all people picker tags in the InfoPath xml files in the library.

Example: Project manager people picker was not having any value in the form.
Before adding namespace
<my:project_manager>
<my:Person>
<my:DisplayName>xyz</my:DisplayName>
<my:AccountId>domain\xyz</my:AccountId>
<my:AccountType>User</my:AccountType>
</my:Person>
</my:project_manager>

After adding namespace
<my:project_manager>
<pc:DisplayName>USer Dispaly Name</pc:DisplayName>
<pc:AccountId>Domain\user</pc:AccountId>
<pc:AccountType>User</pc:AccountType>
</pc:Person>
</my:project_manager>

Once the above change has been done to all old xml files using PowerShell script, People Picker started working fine.

Challenge 2:

In continuation of above Custom Migration from Moss 2007 to SharePoint 2013  article:-

I need to deploy the custom workflow which was associated with Info Path Form. As I migrated info path and workflow successfully. It was not working as expected.

​After doing lots of R&D, I got the solution and explained below:-

Resolution:

In the Nutshell :- Custom Workflow code was using an entity class file auto generated for InfoPath XSD file. As People Picker control scheme has changed from Moss 2007 to SharePoint 2013. So I need to update the entity class accordingly.

Generating new entity class
To generate the entity class for .xsd file we need to use the XML Schema definition tool (Xsd.exe)
Reference links:

Once you have the SDK Installed(either Manually, or with Visual Studio), you'll find it in the following directories:
C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools

Run the command as
C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools>xsd.exe
/c /l:cs myschema.xsd BuiltInActiveXControls.xsd

Note: myschema.xsd is file name of InfoPath and BuiltInActiveControls.xsd was needed for new people picker in InfoPath 2013

This will generate the entity class for the .xsd file of InfoPath. Then replaced this with old entity class carefully and check if only people picker classes has changed and deployed the solution.
Now workflow started working as expected.

Note: 
Resolving Issue with People Picker In InfoPath Form

​Since picker schema in InfoPath 2013 has changed, so we have to remove existing people picker and add new people picker from InfoPath 2013 also.

Error occurred in deployment step Add Solution

Issue Occurred while deploying the WSP using Power Shell getting below error:-

Power shell Error Message :: Error occurred in deployment step 'Add Solution': Operation is not valid due to the current state of the object.

Most of the article suggest below solution and which solved their issues also but No Luck

  1. Restart "SharePoint Timer Service" on all the servers.
  2. Deployment Solution with –Force parameter
  3. Set "Active deployment Configuration" - as "No Activation"


  

ULS Log Message :: The timer service could not initialize its configuration, please check the configuration database

Most of the article suggest below solution and which solved their issues also but No Luck
  1. Clear the Config Cache from each Server  Location of the file:- C:\Documents and Settings\All Users\Application Data\Microsoft\SharePoint\Config\<guid>\
  2. Stop the Administration and Timer service from each server one by one.
  3. Delete all XML files in the folder at defined location C:\Documents and Settings\All Users\Application Data\Microsoft\SharePoint\Config\<guid>\  (not the folder itself only files)
  4. Open “Cache.ini” and write the number 1 instead of the existing number (you might want to make a note of it).
  5. Start the Administration and Timer service from each server one by one.
  6. Wait for a minute or two and see if the folder starts to fill up with xml files. Xml files should start  appearing.

 Resolution:-

 Actually Issue - Folder was missing from the location:- C:\Documents and Settings\All Users\Application Data\Microsoft\SharePoint\Config - which only consist Cache.ini file .

  1. Stop the Windows SharePoint Services Timer service on ALL servers in the farm.
  2. On the server configured for Indexing, browse to %ALLUSERSPROFILE%\Application Data\Microsoft\SharePoint\Config.
  3. Open the Registry editor and navigate to the following key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\15.0\Secure\ConfigDB.
  4. Take a note of the Guid value for the Id item as shown below

  5.  
  6. Re-create the cache folder giving it the title matching the Guid value retrieved from the Registry.
  7. You can now re-start the Windows SharePoint Services Timer service on the current server.  You  should see xml files appear in the folder shortly after the service starts.
  8. Repeat all the steps above for all other servers in your farm.


Happy Coding..

SharePoint 2013 Search Integrate Bing Result

Few terminology need to understand before integrate the Bing Result

Result Source :-
Result sources In SharePoint 2013 Search define where a search query looks for results. 
SharePoint 2010, result sources replace “search scopes”. In this blog, you will learn how to create a new result source. Specifically, you will create a result source that returns search results from the Bing search engine.

Search Federation 

Federated search can be defined as using search indexes created by other search engines to supplement SharePoint search results. This feature enables the user to retrieve and display search results for content that is not crawled by the SharePoint search server. For example, you can set up a search to return content indexed by an external search engine like Bing. SharePoint can format and display external results on the same search results page along with results from SharePoint search.

  1. Navigate to Site Settings page of Search Center -> Click Search, click Result Source.
  2. Click New Result Source
  3. Name: Federated Results 
  4. Description: Result source for Bing 
  5. Source Information/Protocol: OpenSearch 1.0/1.1
  6. Query Transformation:  {searchTerms} 
  7. Source URL (for Bing): Copy and paste, or type in the following as a continuous string of text: http://www.bing.com/search?q={?searchterms}&format=rss&Market=en-Us Credentials Information: Anonymous At the bottom of the page
  8.  click Save
 Build a Query Rule:-
  1. Navigate to Site Settings page of Search Center -> Click Search, click Query Rules.
  2. Click the down-arrow next to Select a Result Source… and then click Local SharePoint Results. Note: this will enable the query rule to return results from local SharePoint content as well as from the Bing federated result source. In a few minutes, we will configure a result block for the Bing results part of the query rule.
  3. Click New Query Rule.
  4. In the query rule configuration page, under Rule name, type Bing Results.
  5. In the Query Conditions area, click Remove Condition. This means the query rule will fire for all search queries.
  6. In the Actions area, under Result Blocks, click Add Result Block.

Configure the result block

  1. In the Block Title area, change the title to Bing Results for “{subjectTerms}”.Use the drop-down menu next to theSearch this Source box to select Federated Results.
  2. Change the Items drop-down menu to 5.
  3. Expand Settings.
  4. Select This block is always shown above core results.
  5. The final Result Block configuration window should look like the following:
Blog2 - 1

Test the query rule


Having set up a query rule that returns federated results,  you will save it and then see it in action.
  1. Click OK to close the Add Result Block window.
  2. Scroll down if needed, and click Save to save the new query rule.
  3. At the upper left of the page, click the SharePoint icon to open a fresh search page.
  4. In the query box, type SharePoint 2013 and click the search icon.
  5. Notice the Bing results at the top of the results page. Below the Bing Results block, you may see local SharePoint results as well.


Happy Coding..

SharePoint 2013 PDF Preview in hover panel

SharePoint 2013 Enterprise Search results has the ability to preview documents using Office Web Apps Server i.e. Microsoft Office Document (Word, Excel, PPT etc) & Web Pages etc. 

Issue:-  The preview of PDF documents is not implemented or supported using Office Web Apps.

Therefore, I created my own PDF preview for Enterprise Search results by customizing the new search Display Templates. 

Step 1:-  Navigate to Site Settings of Search Center
Step 2:-  Click Master Pages and Layout under Web Designer Galleries
Step 3:-  Click Display Template -> Search Folder as shown below:-


Step 4:-  Navigate to Item_Default_HoverPanel.html file


Step 5:- Download the HTML file and open in nodepad editor and add object tag as show below:-




<object data="_#= ctx.CurrentItem.DocumentLink =#_" type="application/pdf" width="100%" height="300px" >      
    </object>


where DocumentLink is the Managed Property which will link of the PDF file. 
If this managed property doesn't exists in the Template section, then we need to add manually. 
Before that check the managed property name properly in search schema.













Check the  Search Center URL carefully, If its not updated. Update it carefully.

Check in and publish the file and start browsing .





















Happy Coding..

EXECUTE permission was denied on the object 'proc_putObjectTVP'

While Configuring or creating the SharePoint 2013 Search Service Application using Central Administration - Start getting the error:-
Unable to retrieve topology component health states

Search Service application was not showing the topology. Then I start creating the Search Service Application using Power Shell Script, Error message start appearing :-

EXECUTE permission was denied on the object 'proc_putObjectTVP'


This error clearly state, Account you are using for configuring search service application does not have sufficient privileges on the above mention Stored Procedure.

Resolution:-


1. Expand Databases then expand the SharePoint_Config Database.
2. Expand Security -> Roles -> Database Roles
3. Find WSS_Content_Application_Pools role, right click it, and select Properties
4. Click on Securables and click Search
5. Next click Specific objects and click OK
6. Click Object Types and select Stored Procedures. Click OK
7. Add the Stored Procedure 'proc_putObjectTVP' and click OK (if it does not automatically grant it exec permission; you need to click the checkbox on "execute" and save it)

Again it was prompting for other stored procedure:- Again I followed the all above steps for theses two stored procedure:-
proc_putObject
proc_putDependency

Or Run the below commands:-
use [Sharepoint_Config]
GO
GRANT EXECUTE ON [dbo].[proc_putObjectTVP] TO [WSS_Content_Application_Pools]
GRANT EXECUTE ON [dbo].[proc_putObject] TO [WSS_Content_Application_Pools]
GRANT EXECUTE ON [dbo].[proc_putDependency] TO [WSS_Content_Application_Pools]

GO


Happy Coding..

An unrecognized HTTP response was received when attempting to crawl this item.

SharePoint 2013 Search Service Application does not give accurate result with HTTPS site.

I created a web application with SSL and start crawling it -For crawling the HTTPS site properly we need to upload or provide the proper certificate for HTTPS and HTTPS site should be accessed  without warning or error message like:-



If SSL site crawled without proper cert with below error appear and crawl also fail
Crawl Log Error:- An unrecognized HTTP response was received when attempting to crawl this item. Verify whether the item can be accessed using your browser.

Resolution:-
Search is failing due an invalid certificate; I created a Root CA cert and then generated a Cert from that root CA with the required CN. After we used the new cert on web site (Added the root CA to machine’s trusted root certificate) search of HTTPS documents started working (which it was not previously).


Happy Coding..

Unable to retrieve topology component health states

While configuring the SharePoint 2013 Search Service Application using Central Administration. I got the above error:- "Unable to retrieve topology component health states"





But If we create the SharePoint 2013 Search Service Application using Powershell script which prompt lots of other related error like:-



  1. SharePoint 2013 Search Topology Activation Error: "Unable to retrieve topology component health states. This may be because of the admin component is not up and running".
  2. Exception calling "Activate" with "0" argument(s): "Topology does not contain any components of type Microsoft.Office.Server.Search.Administration.Topology.AdminComponent.
  3. Crawling Stuck with Starting or Stopping Mode.


    Corrective Action should be considered:-
                  1.     Checked User have Farm Administrator Permission or not.
2.       Checked User have Managed Account or not.
3.       Checked the User have Local Administrator Privileges or not.
4.       Checked User have owner permission in all Database as created during search topology.
5.       Checked extra space in Environment variable i.e. PSModulePath – No space exists.
6.       Checked the Managed Metadata Service and user permission
7.       Checked the Health and Usage Services and user permission
8.       Re-configured the Health and Usage Services.
9.       Re-start the Application Server.
10.   Window Service in Application Server or  WFE is running fine with same account & Re-started the service in all server also.
      Window Services :- SharePoint  Search Host Controller & SharePoint Server Search 15
11.   Same user having Farm Administrator level permission and having managed account also.
12.   All DB are also up and online.


But we need correctly check the Noderunner.exe.config - Might be someone has changed the value which may create issue - This was the exactly the case for one of project:-

Resolution :-

1.       noderunner.exe.config file located at “C:\Program Files\Microsoft Office Servers\15.0\Search\Runtime\1.0” had a wrong value i.e. <nodeRunnerSettings memoryLimitMegabytes="100" />  It should be <nodeRunnerSettings memoryLimitMegabytes="0" /> .

Location of noderunner.exe.config

Noderunner.exe.config file (Should be)


In the nodeRunnerSettings node edit the attribute “memoryLimitMegabytes”. The initial value is set to “0”, what means that there is no limit.


Happy Coding..


Configure User segmentation in SharePoint 2013 Search Zero Code Solution

 Display content you tailor for user segments or context you define—for example, based on locale, interests, gender, Department, Skills etc.

The concept of "User Segmentation" is a new feature in SharePoint 2013 Search that allows you to view search results based on user attributes, called "User Segments".

When I speak of attributes, these are only attributes coming from the user's profile.

Scenario chosen for this article

"People Skills or Interests" which is "SPS-Skills" or “Department” Internal name in SharePoint user profile property.

  1. Need to filter the record against the People Skills or People Department in User Profile Property.
  2. User Profile property should have the value or terms in People Skills and People Department.


Step 1:- Define the People Skill in Managed Metadata services:-









Step 2:- Set above taxonomy terms in the User Profile property of the user i.e. SPS-Skills (Internal name of skill).



Step3:- Add Managed Metadata column in List or Library where we need to tag the content or Enable the Enterprise Keyword
Step4:- Add Skill Keyword i.e. Terms against the content in List or Library in Managed Metadata or Enterprise keyword column.

Step5:- Add Managed Metadata or Enterprise Keyword column as Managed Property in Search Schema and Perform the Full Crawl.

Step6:-Configure the OOTB Search Result Web Part in the search center with following steps:-

               




Note: - How Query variables with multiple values (Important)
Some query variables may return multiple values like Skills or Interest. For query variables that return multiple values, the following syntax must be used: {|ManagedProperty:{QueryVariable}}.
All the query variable values will be combined by using the bitwise OR operation. For example, say that you have a term set that is used to categorized interest of users. All users are configured to have one or more interests using the multi-value property SPS-Interests in the User Profile Service Application. To issue a query for any of the interests of the current user, the following syntax could be used: {|owstaxIdMetadataAllTagsInfo:{User.SPS-Skills}}.
 If the current user is configured to have two interests — .Net (#0f95d1fdf-781f-42f4-99f9-c656c1341b2e) and SharePoint (#0c2cff933-9377-4692-aa98-ce59768aa38b) — the query will be transformed to (owstaxIdMetadataAllTagsInfo: #0f95d1fdf-781f-42f4-99f9-c656c1341b2e) OR (owstaxIdMetadataAllTagsInfo: #0c2cff933-9377-4692-aa98-ce59768aa38b).

There are some restrictions with using multiple values. Only the OR operator ({|) is supported for multiple values. The AND operator is not supported. Also, only columns of type Managed Metadata work correctly for multiple value cases. Other types of columns that may use multiple values, such as columns of type Person or Group or Choice, the items will be expanded into a delimited string.

Ref:-


Migrate User from Moss 2007 to SharePoint 2013

After successfully migration of content Database from Moss 2007 to SharePoint 2013 via SharePoint 2010 as intermediate.

As part of this regular approach database detach –attach method and migrated the existing Moss 2007 site .Migration was successful and we were able to access the site  with the system account. Later we tried with couple of site admin accounts, to our surprise we were getting “ACCESS DENIED” with any other user id.

SharePoint assumes all users to be claim users and renders them so. Therefore, a normal windows user – “Domain\UserName” appears as “i:0#.w|Domain\UserName”.

To convert all window authentication user to claim based authentication:-

Open SharePoint 2013 Management Shell with Administrator account and run the below commands


$WebAppName = "http://"

$wa = get-SPWebApplication $WebAppName

$wa.UseClaimsAuthentication = $true

$wa.Update()

$wa.MigrateUsers($true)

$wa.ProvisionGlobally()

After successful provision, check the user - which will show claim based user and all user will be able to login the site also.

Happy Coding..

Google Vs Enterprise SharePoint 2013 Search

Why Enterprise Search Implementation is more sufficient at Enterprise level not google search

This article is more on thoughts.

As working on SharePoint 2013 Contextual search project. Meaning of Contextual is different in different prospective.
SharePoint Technology point of View, Contextual Meaning is Set Limit and Boundaries.
More Details: - If I search with in List, So List is my Context - system should search with in list only or if I am search with in Sub-Site, So Sub Site is my Context - system should search with in Sub site.
So this type of process is easy and where we can easily set limit and boundaries.
I have very informative article on that, which explained very nicely.

Now Story starts:-
Business says: - Contextual meaning User Context (Not User Segment): means: - What is user skill, Department, expertise, area of interest etc.
User Skill, Department, Expertise, area of Interest and lots more, these properties exists in use profile and we can access and use as input parameter for my search.

After Interval of the Story:-
We came to know, one more contextual meaning I.e. what are happening activity around the user i.e. what s (he) doing day-day basis.

Elaborate:-
What document, I am sharing with others and what people are sharing with me.
What type of conversation, I having with people and people having with me etc?


Then I thought, I should explore more on Exchange API, LYNC API, and OneDrive API etc. from where I will take the latest happening activity keyword and which will become the input for my search output.
It may consist confidential info also. I should carefully take care those also. Lots of other activity need to do for the same don’t know whether organization will allow me to take those information or not.

Now twist comes.
We are not “Google”. We are searching at Enterprise or Organizationa level.  Google is not having profile page and not having relevant keyword related user, so It take the relevancy key words from other social media and shows the result but at enterprise level we have enough data related to user. We should utilize those only.

Conclusion:-
Now the Use case exists:-
We have enough user data at the organization level which is exists in our system itself and which is exposed also in authorized environment. We should do the Proper ranking as per the weightage of the keyword and business requirement.

Please share your thought for the same.