Posts

Showing posts from March, 2015

SharePoint get followed sites using REST Api

Image
Recently I was tasked with a project requirement that the user should be able to see list of content he/she followed. To me this sounds much like using the following feature of SharePoint 2013 which allows you to follow documents, sites, people and tags. Also, we don’t want the user to navigate to his/her mySite and have a look on to the content followed. We can use the SharePoint 2013 Representational State Transfer (REST) service to do the same tasks you can do when you use the .NetCSOM, JSOM. Here I explain how to retrieve the site name and URL followed by the current user in SharePoint 2013 using a client object model (REST API and JavaScript) and displaying it in the SharePoint page. 1. Create a new page and a Content Editor Webpart (CEWP). 2. Edit the web part that was added to the page. 3. Upload your text file script into the site assests and copy the path of the text file and paste it into the Content link in CEWP. 4. Output Code The following example shows how to retrieve a

Send message to client app part using a "PostMessage Shim"

Image
In this post, I’ll walk through how to use the postMessage api to enable cross-frame communication between your Client App Parts and the hosting SharePoint page, to make your SharePoint App Parts more dynamic and responsive to changes in the parent page. Overview In the SharePoint 2013 App Model, Client App Parts are implemented as iframes into pages hosted in App Webs or Provider Hosted web applications. Because SharePoint apps are hosted on different domains, the iframes can’t use javascript to access the parent window and get information from the hosting page. This is a good thing. You wouldn’t want a Client App Part that you installed from the marketplace to be able to see the list of customers on that List View web part that sits right next to it on the page. But it does make it very hard as a developer to give Client App Parts more dynamic page information to work with. The only contextual info a Client App Part can get is through Client App Part properties. Normal SharePoint Web

SharePoint 2013: The search service is not able to connect to the machine that hosts the administration component.Verify that the administration component.

Image
Hi, Issue : The search service is not able to connect to the machine that hosts the administration component. Verify that the administration component ‘GUID’ in search application ‘Search Service Application’ is in a good state and try again. In Farm Search Administration page when click on " Modify Topology " get error "An unhandled exception occurred in the user interface.Exception Information: Exception has been thrown by the target of an" Cause : Search is not able to connect is because of name reasons, in this article I am explaining various the solution of this issue. Solutions : Please find the below solutions, That one of it can resolve the issue. Solution 1 : In the end it turns out to be that the application pool that hosts the search service application somehow doesn’t have the correct access. You can simply change the application pool to use SharePoint Web Services System for search service applications and check. 1. Click on Start > Run > Type Ine

Fix for Memory leak by Noderunner.exe

Image
Hi, Issue: My virtual development machine is allocated 8 GB RAM out of 16 GB of Host. Still it runs very slow. In order to develop things I have to stop the Search service and memory consumption reduced to ~5GB from 6-7GB. But this is just a work around what if I need to build some module which requires Search service. A quick investigation in Task Manager highlight Memory usage by search components are much large then other processes.  Several NodeRunner.exe processes consume lots of Memory and CPU. The culprit processes are Microsoft SharePoint Search component. Although there is no problem with just killing the noderunner.exe processes in Task Manager; SharePoint creates them again almost immediately. Cause: The architecture of search has undergone lot of changes in SharePoint 2013. Many of the core components are replaced by the FAST Search components. Below are a few new components which are added in the new architecture Crawl Component Content Processing Component Query P

Allow anonymous access

Image
Hi all, As per one of my project requirement, I need to configure  SharePoint 2013  sites to be accessed by anonymous users. So I had configured the anonymous access on SP 2013 web application and documenting steps below which are required to configure anonymous access to an existing  SharePoint 2013  site. 1. Please navigate to the SharePoint 2013 Central Administration > Application Management section, click the " Manage web applications"  link. 2. Now from the list of the web applications opened, click on one of the available web applications and find " Authentication providers " button from Ribbon. It will pop up a modal dialog showing the authentication providers available per zone is displayed. The basic scenario was set at time of web application creation is only displayed there as "Default" zone. 3. Click the " Default " link so a new modal dialog is displayed. Just check the " Enable anonymous access " option and press the

Clear SharePoint Config Cache with PowerShell

Hi, In my previous post , I have explained about issue "An update conflict has occurred, and you must re-try this action". That issue occurs because of cache issues. I have already explained the manual way to clear cache. In this blog, I do same thing using the poweshell script. Following code of PowerShell will clear the cache of the server: Add-PSSnapin -Name Microsoft.SharePoint.PowerShell –erroraction SilentlyContinue Stop-Service SPTimerV4 $folders = Get-ChildItem C:\ProgramData\Microsoft\SharePoint\Config foreach ($folder in $folders) { $items = Get-ChildItem $folder.FullName -Recurse foreach ($item in $items) { if ($item.Name.ToLower() -eq "cache.ini") { $cachefolder = $folder.FullName } } } $cachefolderitems = Get-ChildItem $cachefolder -Recurse foreach ($cachefolderitem in $cachefolderitems) { if ($cachefolderitem -like "*.xml") { $cachefolderitem.Delete() } } $a = Get-Content  $cachefolder\cache.ini $a  = 1 Set-Content $a -Path $cachefolder\cache

SharePoint: An update conflict has occurred, and you must re-try this action

Hi, I have faced this issue while trying to modify list items of a list. This issue encounters if the file system cache content on the SharePoint server is newer than the content present in the configuration database. One have to clear the cache manually to get rid of this issue. Sometimes it get solved by restarting, if luck is with you, otherwise this issue will always bugs. Timer service restart could be one another option to try. But recommend you must follow one of the two possible ways to solve this issue: I. Manual Steps: Need to stop the SharePoint Timer service: Navigate to Start > Administrative Tools >  Services or go to run(Windows+R) command and type  msc . Locate the SharePoint Timer Service , and right click on this service and click on  Stop Close the Services window (In case you are performing these actions on Production/Test. Do this on each front end server) In Windows Explorer, locate and then double-click the following hidden folder. Drive:\ProgramDat