Showing posts from June, 2013

Button - Open Webpage - SharePoint

No Styling <input type="button" value="button name" onclick="'')" /> Styled with Hover Effect <input type="button" value="button name" onclick="'')" class="RiskButton" onmouseover="this.className='RiskButtonHover'" onmouseout="this.className='RiskButton'"/> CSS: /* BUTTONS */ input.RiskButton { color:#005500; font-weight:bold; font-family:Arial, Helvetica, sans-serif; font-size:x-large; white-space:normal; background-color:#fed; border: 2px solid; border-color: #696 #363 #363 #696; filter:progid:DXImageTransform.Microsoft.Gradient (GradientType=0,StartColorStr='#ffffffff',EndColorStr='#ffeeddaa'); width:240px; height:80px; }  input.RiskButtonHover { color:#005500; font-weight:bold; font-family:Arial, H

SharePoint Announcements View with Ellipses if Body is over 50 Words

Requirements: Truncate the Body of the announcement if over a certain word count. Restyle the announcement to look modern. Create a link if the Body is truncated so the user can view the full Body. Have this link open a popup window with only the Title and Body shown, with scrollbars. Create a close button on the page to close the window. Execution: Add a data view of the announcements list to the page. Filter View: Expires >= [Current Date] Add Links to Stylesheets saved in the global library (Before xsl:output): <xsl:import href="/Style Library/XSL Style Sheets/StripHTML.xsl"/> <xsl:import href="/Style Library/XSL Style Sheets/FirstNWords.xsl"/> (these can be downloaded here: ) Add variable in main stylesheet: <xsl:variable name="WebUrl" select="@FileDirRef"/> Call this stylesheet in rowview template inside the <td></td> section. <xsl:call-template name

Close Browser Window

Close a browser window using Javascript: <asp:Button ID="btnClose" runat="server" Text="Close" OnClientClick="javascript:self.close()" />

Connect SharePoint 2010 Web Application to OpenLDAP

Requirements: Company does not want to use Active Directory for external (untrusted) users.  This would consume a user CAL license for each user, along with giving that user potentially more rights on our internal private network domain than wanted. Company uses other enterprise software programs that consume user authentication from a non-central user store and lacks user tracking.  Stand up a central LDAP store for these external users that are accessing these other systems and begin tracking information like phone numbers, address, expected length of access needed, etc.  This will allow IT the ability to inquire if the access is still necessary. Allow Integrated Windows Authentication for normal domain users to interact with content on the Extranet on SharePoint 2010 Server. All SharePoint web sites utilize SSL-only (not even http with alternate access mappings) and Kerberos. Environment: SharePoint Server 2010 Enterprise Server: Windows Server 2008 R2 with IIS7 All

SharePoint Web Application Debugging Errors

Outputting Verbose Errors Versus the Standard Error Output in SharePoint Verbose error output to the error web page should only be enabled for development or test farms, or temporarily to fix a drastic problem in production. We will need to edit web.config for the website.  This will be located in the IIS virtual directories, or template/admin in the SharePoint hive for central admin. Turn on the call stack (CallStack="true") Disable custom errors (<customErrors mode="Off" />) Enable compilation debugging (<compilation batch="false" debug="true">) Edit the following lines: (Ctrl-F is you friend) <?xml version="1.0" encoding="UTF-8" standalone="yes"?>     <configuration>         ...         <SharePoint>             <SafeMode MaxControls="200"                 CallStack="true"                 DirectFileDependencies="10"  

Kerberos for SharePoint 2010

There are some requirements to Kerberos, most notably that your Active Directory domain must be Kerberized.  Also check out this location for the full documentation on setting it up and other requirements like Operating system, etc: For this demonstration I am assuming the web application(s) you want to use Kerberos on are currently using Classic authentication with NTLM. For claims based authentication you will need to read up on constrained and unconstrained delegation in Kerberos. 1.  Set the web application to use Kerberos.  Do this is Central Administration by clicking on the web application, selecting authentication in the ribbon, choosing the zone you wish to configure (usually Default), and then changing NTLM to Kerberos. 2. SetSPN.  You must register the Service Principal names for each web application pool.  Login to a computer on the domain with a domain administrator account (doesn't have to be the ser

SharePoint server EventID 1001 MsiInstaller errors

To monitor this event: On every server in the SharePoint farm except for the database, create a custom view in Event Viewer. Logged: Last 7 days. By Log: Application. Includes/Excludes: 1000-1030. Click OK. Name: MsiInstaller Errors. Click OK. This will let you monitor this event in the future so you will know if your changes correct the error.  Afterwards delete the custom view when the error doesn't happen for several days.  These events occurred on my system between 52-20 minutes after the hour every hour, usually between 00-15. Error text: Detection of product '{90140000-104C-0000-1000-0000000FF1CE}', feature 'PeopleILM' failed during request for component '{1681AE41-ADA8-4B70-BC11-98A5A4EDD046}' This article explains what is going on: SharePoint 2010: MsiInstaller errors while attempting to manage a User Profile Service Application When you attempt to manage the User Profile Service Applicat

Fix 10016 Events in the Server Logs

To monitor this event: On every server in the SharePoint farm except for the database, create a custom view in Event Viewer. Logged: Last 7 days. By Log: System. Includes/Excludes: 10016. Click OK. Name: 10016 Errors. Click OK. This will let you monitor this event in the future so you will know if your changes correct the error.  Afterwards delete the custom view when the error doesn't happen for several days. There are differences in SharePoint servers experiencing this error depending on which server in the farm you see this error.  The difference will be in the CLSID and APPID reported. For CLSID/APPID {000C101C-0000-0000-C000-000000000046} The machine-default permission settings do not grant Local Activation permission for the COM Server application with CLSID {000C101C-0000-0000-C000-000000000046} and APPID {000C101C-0000-0000-C000-000000000046} to the user NT AUTHORITY\NETWORK SERVICE SID (S-1-5-20) from address LocalHost (Using LRPC). This security permissio

People Search fails to return results when using SSL for MySites

SharePoint 2010 uses sps-<name> to return values for metadata properties.  You can view them in the Technet reference for metadata properties in the People section: People properties use many of these sps- values.  The scope to find People is: contentclass=urn:content-class:SPSPeople If search cannot access the sps- values because you are using SSL then nothing will be returned. We use SSL for all of our web applications, and this was not returning any of the people data in searches.  Regular document content worked great as that is searched using the DNS name.  The fix is to add an s after the sps3:// for the start address in the content source. For example use this as the start address for content source for All SharePoint Sites: sps3s://  (note the sps3s instead of the built-in sps3 ) In our case I use a separate hostname for mysites, so I have to make su

EventID 6398 – You do not have permission to run ‘SP_TRACE_CREATE’

This error occurs due to installing and configuring  SharePoint 2010 Administration Toolkit  which adds three new SP Diagnostics Provider reports.  These require a database permission level of SP_TRACE_CREATE and RECONFIGURE.  Quite possibly the queries are failing because the account they are running with does not have sufficient permissions.  In my case in the server event log was running these under my Farm account. Here are the 3 jobs that are added by the SP 2010 Administration Toolkit, this can be confirmed by running this PowerShell command (Get-SPDiagnosticsProvider): job-diagnostics-sql-deadlock-provider job-diagnostics-sql-blocking-report-provider job-diagnostics-io-intensive-query-provider Here are the three jobs that failed in the Central Administration Timer Service jobs: Diagnostic Data Provider: IO Intensive SQL Queries <servername> 0:00:00 Failed 6/3/2013 9:57 AM Diagnostic Data Provider: SQL Deadlocks <servername> 0:00:00 Fai