Monday, July 23, 2012

Performances issues with big lists

We were noticing some performances issues with big lists (say around 2500 rows not big enough in my mind) and users began to see slowness and this can be caused due to many reasons. As part of trouble shooting we tried to look at the performance counters on the web, app and SQL server and did not notice any major bumps. We started SQL profiler and we noticed significant duration being taken while rendering the results or displaying the list items. Then we looked at this link published by Microsoft http://technet.microsoft.com/en-US/library/cc262813.aspx and found the issue with Row Wrapping. We exceed the number of columns for the Multiline text filed that needs to be in a single Row. We changed couple of fields to the Single Line of text and we found significant improvement in performance. We also indexed the columns that re commonly used in the Views(http://office2010.microsoft.com/en-us/sharepoint-server-help/manage-lists-and-libraries-with-many-items-HA010378155.aspx?redir=0#_Toc268174145)

Hope this helps for someone who runs into similar problem.

Sunday, July 1, 2012

How to get SPUser object from String

String UserName= “Srikanth Kancharla”;

SPUser User= SPWeb.EnsureUser(UserName);

SPWeb.EnsureUser():Checks whether the specified logon name belongs to a valid user of the website, and if the logon name does not already exist, adds it to the website.

Friday, June 29, 2012

SharePoint 2010 - Missing Dropdown menu for choosing the views

When two or more web parts are added to the standard view page then the drop down menu for choosing view gets disappeared.

Resolution that worked for me is to edit the view Page in the SharePoint Designer advanced Mode

Look for the line,

<SharePoint:ListTitleViewSelectorMenu AlignToParent="true" id="LTViewSelectorMenu" runat="server" />

and replace with,

<SPAN id=onetidPageTitleSeparator><SPAN><SPAN style="POSITION: relative; WIDTH: 11px; DISPLAY: inline-block; HEIGHT: 11px; OVERFLOW: hidden"><IMG style="POSITION: absolute; BORDER-RIGHT-WIDTH: 0px; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; TOP: -585px !important; LEFT: 0px !important" alt=: src="/_layouts/images/fgimg.png"></SPAN></SPAN></SPAN>
<SharePoint:ViewSelectorMenu ID="viewSelectorMenu1" runat="server" />

Hope it helps someone !!

Creating a new permission level in SharePoint 2010 using PowerShell

When the out-of-the-box permission levels do not meet your needs then SharePoint 2010 allows you the capability to create new combinations of permissions that can cater your needs.

There are two ways of creating Permission level
 - SP2010 GUI
 - PowerShell.

Using SP2010 GUI it is very easy to create permission level, if this is only needed for one or two Site Collections. Imagine you have 100 + Site Collections then this solution will not work, Obvious choice is to use PowerShell.

Here is the PowerShell script to create custom permission level

When
$webapp = Get-SPWebApplication http://xyz.com
foreach ($SPSite in $webapp.sites)
{
$OpenWeb = $SpSite.OpenWeb()
$spWeb = Get-SPWeb $OpenWeb.url
$spRoleDefinition = New-Object Microsoft.SharePoint.SPRoleDefinition
$spRoleDefinition.Name = "Site Owner"
$spRoleDefinition.Description = "Custom Permission for Site Owner"
$spRoleDefinition.BasePermissions = "
ManageLists,
CancelCheckout,
AddListItems,
EditListItems,
DeleteListItems,
ApproveItems,
ViewListItems,
OpenItems,
ViewVersions,
DeleteVersions,
CreateAlerts,
ViewFormPages,
ManageSubwebs, 
CreateGroups, 
ManagePermissions,
ManageWeb,
ViewUsageData,
AddAndCustomizePages,
BrowseDirectories,
EnumeratePermissions,
ManageAlerts,
Open,
ViewPages,
BrowseUserInfo,
UseClientIntegration,
EditMyUserInfo,
UseRemoteAPIs,
AddDelPrivateWebParts,
UpdatePersonalWebParts,
ManagePersonalViews"
$spweb.RoleDefinitions.Add($spRoleDefinition)
$SPSite.Dispose()
$OpenWeb.Dispose()
}

Happy scripting J

Wednesday, May 9, 2012

The secure sockets layer (SSL) certificate sent by the server was invalid and this item will not be crawled

On starting the full crawl of the default content source I received the  error. “The secure sockets layer (SSL) certificate sent by the server was invalid and this item will not be crawled”

It was because one of the site was SSL enabled. 

Solved it in the following manner,
1. Navigate to Central Administration.
2. Go to Application Management > Manage Service Applications and click on your Search Service.
3. In the left Navigation, click on “Farm Search Administration”
4. Under the Farm-Level Search Settings, click on Ignore SSL warnings status “NO” (by default is No). Select the Ignore SSL certificate name warnings check box if you want to trust that sites are legitimate even if their certificate names are not exact matches

 
 













5. Restart Incremental or full crawl as needed.

Tuesday, May 8, 2012

OneNote Sync Error Code: 0xE4020005

We were noticing OneNote Sync issues with SharePoint 2010 and below workaround worked for us,

1. Right-click section in question, Move or Copy...
2. Select another Notebook beside the one it resides in, Move.
3. Sync the changes.
4. Move the section back to the desired Notebook.
5. Sync the changes.

Tuesday, April 3, 2012

Step-By-Step Provisioning the Web Analytics Service Application on Microsoft SharePoint Server 2010 SP1

Web Analytics Service is a service application in Microsoft SharePoint Server 2010 that you can use to perform site usage statistics and reporting within a browser.

Provisioning the Web Analytics Service Application
Navigate to CA àManage Service Application

Click new and chhose "Web Analytics Service Application"



















Specify the name for the Service Application. Choose or create new application pool.



Specify the default database for the SharePoint farm and provide the Staging and Reporting database name. You can also specify the Retention period.










Once Service application is created you can start the Web Analytics Data Processing Service and Web Analytics Service.