Monday, November 11, 2013

Work management service application in SharePoint 2013

We have a new service application in SharePoint 2013 to track the user tasks distributed across the sites/site collections/web applications. This will provide to aggregation of the tasks to a central location in SharePoint server. By using this service users can view their to-do tasks in personal site level. All the tasks will be sync into outlook. We can also see the tasks from Exchange, project server. Based on the provider model, users can sync with other systems. We can see all the tasks in my site tasks.

To view the tasks we have to check with following things,
  • We have to check each of the search service should have valid content source and it should be in Continuous crawling. If we have incremental crawls, crawl should happen in very often time intervals.
  • Application pool using for my site should have SPDataAccess SQL permissions in the content database of the web application.

Work Management Service will work on Search. If crawl was not proper, we cannot see any tasks to display. All the tasks used to store in “WmaAggregatorList_User” list in personal site of individual users.  All the tasks can be viewed tasks page of my site.  We can see the tasks in different sections as, important and Upcoming Tasks, Active Tasks, Completed Tasks.

To Create Work Management Service Application, Navigate to Application Management in SharePoint central administration, select Manage Service Application link.In Service applications page, create new Work Management Service Application, and specify the details as shown in the images below. 





This service will have dependency on User Profile Service and Search Service.
We can see the error with yellow warning triangle as “We are having trouble refreshing your tasks” error on “My Tasks” page as shown below.



We can see this error for multiple reasons,
  • Work Management service application was not created.
  • Work management service application dependent services may not running (Search service or search crawls)
  • Account using for Work Management Service Application is same as Web application or Service Account running for Work Management Service Account is not having full Permissions for User Profile service application.

We can see more details on Work Management service application in the following links

http://www.sharepointcolumn.com/work-management-service-application-in-sharepoint-2013/

Thursday, November 7, 2013

Image sliding in SharePoint using Picture Library Slideshow WebPart

We can get image sliding functionality using SharePoint inbuilt WebPart “Picture Library Slideshow WebPart” Using this in-built WebPart we can slide the images from SharePoint picture Library. We can create and display the slideshow in selected page.

We can add image slider to a page by using the following steps,

Edit SharePoint Page, Click on Insert tab from Ribbon, Select WebPart button to insert the webparts. From categories list, Select “Media and Content” group, Select “Picture Library Slideshow Web Part” and click on Add button to insert the web part.



Edit the web part to specify the images source to display images.



We have to specify the slide duration, Picture Library, Order in webparts edit pane. Click on OK.



We can see sliding images once we updated with the webparts properties.  This helps us to image sliding instead of creating custom images.

Wednesday, November 6, 2013

SharePoint 2010 Access error - "This report failed to load because session state is not turned on. Contact your SharePoint farm administrator"

While working with SharePoint access services, Browsing contacts after publishing the Contacts form in SharePoint site I got an error saying that,
“This report failed to load because session state is not turned on. Contact your SharePoint farm administrator” as shown the image below.



We can fix this error by enabling the session state for SharePoint access reports. To do that we have to run the following Power Shell commands in SharePoint Management Shell with Administrator privileges,

Enable-SPSessionStateService

We can see the response to provide the Database name. Enter Database base as AccessServiceReports (We can enter any name). A database will be created with the name in SQLServer. Reset IIS (IISRESET)


We can enable session state for web application if we still have the problem. We can do that by using the steps below,

Open IIS Manager and Select the web application by expanding sites list. In IIS Section, double click on “Modules”.


In Top Right side of the modules window, click on “Add Managed Module” link.



We can see “Add Managed Module” popup window. Enter any unique name in “Name” text box and specify the Type as “System.Web.SessionState.SessionStateModule, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a” from “Type” dropdown as shown the image below. Click on Ok to save the settings. Reset IIS.

Monday, November 4, 2013

Always open visual studio with admin privilege

This is a basic post other than SharePoint. Generally we will get issues if we open Visual Studio other than administrator permissions. To overcome those security issues it will be preferred to open VS in admin credentials. We can do that by Right clicking on visual studio short cut and selecting “Run as Administrator” option. We can open Visual studio in admin mode directly instead of selecting “Run as Administrator” option every time. To do that we have to follow the steps below,

Right click on “Visual Studio” and select “Troubleshoot compatibility” option.


In “Program Compatibility Troubleshooter” wizard, select “Troubleshoot program” Option.


In “What problems do you notice” screen, check “The program requires additional permissions” checkbox, click on “Next”.


In “Test compatibility settings for the program” screen click on “Test the program” button and click on Next.


We can see “Troubleshooting has completed. Is the problem fixed?” screen. Click on “Yes Save thee settings for this program” to save the settings.


Hide Ribbon from Anonymous users in SharePoint 2013

In my current project, I had a requirement to hide the ribbon from anonymous users dude to security reasons. In SharePoint 2010 we can do that by modifying the master page. But in 2013, we can’t modify the master page directly. We need to modify the .html file associated with the master page.

We have .html file for every master page with same name, for Seattle.master we have seattle.html and oslo.master we have oslo.html pages which specify the controls and tags of the master page.

We can see the tags in HTML pages start with <!--MS:--> and <!--ME:--> that shows the markup inside of the tags for the corresponding masterpage. We need to do changes in the html page to hide the ribbon from anonymous users.

Open html page in SharePoint designer 2013, (Master Pages-> Select appropriate html file, Edit the file)



Search for “<div class =”ms-belltown-anonshow”>” tag and add following code on the top of the div,
<!—MS:<SharePoint:SpSecurityTrimmedControl runat=”server” permission=”AddandCustomizepages”>—>

Add following code after closing div tag.
<!—MS:</SharePoint:SpSecurityTrimmedControl>—>



Save HTML file. After adding these tags, design manager will update the respective masterpage for hiding the ribbon from Anonymous users. Instead of “AddandCustomizepages” permissions, we can give list of enumeration permissions referred in the link