Thursday, December 19, 2013

How to Hide the Breadcrumb Navigation Links and the SharePoint Ribbon on a page

1) Browse to the page where the Breadcrumb Navigation Links and the SharePoint Ribbon needs to be hidden. Add a Content Editor webpart on the page. Add the below style code in a content editor web part.

<style type=”text/css”>
#ctl00_PlaceHolderTitleBreadcrumb_ContentMap {display=none;}
</style>

2) Edit the web part, click in the content zone, then on the ribbon, Editing Tools -> Format Text area, select the HTML drop down and click Edit HTML source. Paste the code in there, and save.

3) In the webpart properties, make the Chrome Type as None and under Layout, check Layout as Hidden.

4) Stop editing the page and save it. 

Friday, December 13, 2013

SharePoint 2013 Site Collection | HTTP 404 error intermittently

Problem Description

Recently I came across a weird issue, a site collection in the SharePoint farm was giving HTTP 404 intermittently. My initial thought was maybe the whole web application had the issue but didn’t see this happening with any other site collections on the same web application. And I got this error only 1 out of 10 times. But another user seemed to have got it from the first try itself. It really baffled me for couple of hours. So I did an IIS reset and even restarted the SharePoint timer service on the SharePoint web front ends. That didn’t seem to help either.


Resolution

At some point, I realized that this was a site collection specific issue. This site collection had its own dedicated database. I had to detach and attach the content database of this site collection from the web application using Powershell (read dismount and mount)to resolve this issue.

Few weeks back I had done a detach/attach of the same content database from Central Administration. I think performing dismount and mount from Central Administration console led to this behavior. I still find this weird though.

P.S.: Please make a note of the Content DB name before you start this operation

Dismount-SPContentDatabase "<ContentDBName>"

Mount-SPContentDatabase "< ContentDBName >" -DatabaseServer "<DBServerNAme>" -WebApplication http://SiteName



Tuesday, November 19, 2013

Databases running in compatibility range, upgrade recommended (for BdcServiceDatabase)

The SharePoint Health Analyzer showed the below error after March 2013 PU Upgrade for SharePoint 2013.

Title:  Databases running in compatibility range, upgrade recommended. 
Severity: 2 - Warning 
Category: Configuration 
Explanation:
The following databases have versions that are older than the current SharePoint software, but are within the backwards compatible range:SP_BDC_DB


- When I browsed to the Upgrade and Migration -> Review database status



Resolution
Run the below command in SharePoint Management Shell

(Get-SPDatabase | ?{$_.type -match "BdcServiceDatabase"}).Provision()



Now if you try to open the BCS Service Application you get the below error.



To fix this give the BCS Service Applications’ App Pool Account SPDataAccess on the BCS database.


Monday, November 18, 2013

PowerPivot: Secondary Logon service (seclogon) is disabled

Title:  PowerPivot: Secondary Logon service (seclogon) is disabled 
Severity:  2 - Warning 
Category: Configuration 
Explanation: Secondary Logon service (seclogon) is disabled



Resolution

Enable secondary Logon service (seclogon).

1) Login to the servers in the farm.

2) Run -> services.msc -> Secondary Logon -> Start


InfoPath Forms Services forms cannot be filled out in a Web browser because no State Service connection is configured.

Title:  InfoPath Forms Services forms cannot be filled out in a Web browser because no State Service connection is configured. 
Severity:  2 - Warning 
Category: Configuration 
Explanation:
InfoPath Forms Services is not functional on the following Web applications because there is no service connection configured for the State Service: SharePoint - 80  

Resolution
If a State Service application doesn't exist, create one by using the new-SPStateServiceApplication Powershell commandlet.

$stateName = "State Service Application"
$stateDBName = "SP_DB_State_Service"
$stateDB = New-SPStateServiceDatabase -Name $stateDBName
$state = New-SPStateServiceApplication -Name $stateName -Database $stateDB
New-SPStateServiceApplicationProxy -Name "$stateName Proxy" -ServiceApplication $state
-DefaultProxyGroup

DisplayName                 TypeName                                Id
-----------                     --------                                      --
State Service App...        State Service Proxy                    3c******-****-****-a8c4-5****008****

PowerPivot: Usage data is not getting updated at the expected frequency

I was getting the below warning from Central Administration SharePoint Health Analyzer

Title:  PowerPivot: Usage data is not getting updated at the expected frequency. 
Severity:  2 - Warning 
Category:  Configuration 
Explanation:
The PowerPivot Management Data.xlsx file is not being updated. This workbook stores internal data used by the PowerPivot Management Dashboard. The current file for PowerPivot service application <0> was last updated 5 day(s) ago.


Resolution

1) Check under what account the PowerPivotUnattendedAccount is running.
2) Open SQL Management Studio and browse to Security -> Logins
3) Give db_datareader permission to PowerPivotUnattendedAccount for the PowerPivot Service Application database

Thursday, November 14, 2013

Checked out and editable

If you see the above message in any of you SharePoint pages, it is because publishing feature has been enabled on your site. Whenever you make a change, you will see this yellow bar on top of the page.



Fix

After you are done making changes on the page, go to the Publish tab on the page and Publish


Tuesday, November 12, 2013

STSADM for Starting and Stopping Sharepoint services on a farm


Today a colleague wanted to stop some SharePoint services using PowerShell. I tried doing the same in STSADM.This is how you do the same using STSADM

To list out all Sharepoint services

stsadm -o enumservices [I am listing only some of them below]

<Services>
  <Service>
    <Type>Microsoft.Office.Access.Server.MossHost.AccessServerWebService, Microsoft.Office.Access.Server, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c</Type>
    <Name />
    <DisplayName>Access Services 2010</DisplayName>
    <Status>Disabled</Status>
  </Service>
  <Service>
    <Type>Microsoft.Office.SecureStoreService.Server.SecureStoreService, Microsoft.Office.SecureStoreService, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c</Type>
    <Name />
    <DisplayName>Secure Store Service</DisplayName>
    <Status>Disabled</Status>
  </Service>
  <Service>
    <Type>Microsoft.Office.Server.PowerPoint.Administration.PowerPointConversionService, Microsoft.Office.Server.PowerPoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c</Type>
    <Name />
    <DisplayName>Microsoft.Office.Server.PowerPoint.Administration.PowerPointConversionService</DisplayName>
    <Status>Disabled</Status>
  </Service>
<Service>
  <Type>Microsoft.SharePoint.BusinessData.SharedService.BdcService, Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c</Type>
  <Name />
  <DisplayName>Business Data Connectivity Service</DisplayName>
  <Status>Disabled</Status>
</Service>
<Services>

To start a service

stsadm -o provisionservice -action start -servicetype Microsoft.SharePoint.BusinessData.SharedService.BdcService

To stop a service

stsadm -o provisionservice -action stop -servicetype Microsoft.SharePoint.BusinessData.SharedService.BdcService

If this is a Web service, IIS must be restarted for the change to take effect.  To restart IIS, open a command prompt window and type "iisreset /noforce".