SharePoint Experts, Information Architects, Expert Witness

We provide consulting in a broad array of business and technology from architecture to design to deployment of global systems with a focus on surfacing data in the enterprise. Specialists in Microsoft, we are a premier provider of SharePoint Expertise (including 2016 and Office 365). We also provide Expert Witness/Legal Expert in eDiscovery, source discovery, patent infringement, piracy and more! We also have established SICG DLDS s.a. - our counterpart in Costa Rica that specializes in water systems (http://www.crwatersolutions.com) - Contact me direct: david_sterling@sterling-consulting.com or call 704-873-8846 x704.

Search This Blog

Thursday, April 28, 2011

Problems Opening Documents using UAG and SharePoint 2010

If you've implemented ForeFront UAG and SharePoint 2010 and your users are having troubles with opening documents in Office - for example: 
  • It prompts three times then drives you to a UAG error page
  • You get access denied messages
  • Even with Open in Browser enabled, the documents still try to open in the Office application
  • PowerPoint Slide Libraries act odd or cannot publish
So - after 39 days on the phone with Microsoft, they were able to trace the problem down to the file called  init.debug.js. SharePointers may recognize this file as it is used ECMAScript deployment - however they would also know it is not used in SharePoint by default.

Surprise!! It is!

As it turns out, the offshore development company had enabled Debug  (i.e. Debug="true") in the web.config file - possibly intentional, possibly from deploying from Visual Studio; after some 200 billable hours and over 8 people and 4 Microsoft Engineers (and the Product Team) I found it, turned it off and voila - Turn it off and everything works fine!

PS: I found it - we've not told Microsoft yet!

Wednesday, April 27, 2011

SharePoint Site Logo overwritten

SO you've added your custom logo and all is well. You create a Web Part Page and suddenly, your Logo is overwritten with the default SharePoint logo (SiteLogo.png). You check your master page - all is OK so where the heck is this coming from?

Turns out the problem is in the SharePoint page itself - in 'injects' some JavaScript at the end of the page that causes this - do a View Source on the page and you will see it:

<script type="text/javascript">// <![CDATA[var logoImg = documentGetElementsByName('onetidHeadbnnr0');if
logoImg[0].src=
(logoImg != undefined && logoImg[0] != undefined)'/_layouts/images/siteIcon.png';// ]]></script><script type="text/javascript">// <![CDATA[MoveSiteTitle();// ]]></script>

So - you have two options:

1) Replace the SiteLogo.png file in the SharePoint Images folder with your own
2) Edit the Master Page, find the 'onetidHeadbnnr0' control and change the name to 'onetidHeadbnnr1'

Found this post by Jonathan Roussel which has the answer:

http://blog.jonathanroussel.com/2011_01_01_archive.html

Tuesday, April 26, 2011

Enabling Presence in SharePoint 2010

Are your Icon's gray and lifeless? Could be because Presence is not enabled for SharePoint. Here's your answer:

NameCtrl Control

SharePoint 2010
Published: May 2010
An ActiveX control that enables a webpage to display presence information for people, and lets the user take various actions with respect to those people through an on-object user interface (UI) in Microsoft SharePoint Foundation.

This control is defined in NAME.dll, a dynamic-link library (DLL) that is installed in the %ProgramFiles%\Microsoft Office\Office14\ directory on the client computer during Microsoft Office Setup.
To instantiate this control, use the following function in ECMAScript (JavaScript, JScript):

var obj = new ActiveXObject('Name.NameCtrl.1');

In both cases, the argument is the programmatic identifier (ProgId) of the control, Name.NameCtrl.1. For more information about ProgIds, see <ProgID> Key.
In SharePoint Foundation, when a page that contains a view of a document library opens, code in the file OWS.js determines whether Microsoft Office is installed and, if it is, instantiates the control. After the control is instantiated, presence information is displayed whenever the mouse pointer passes over the name of a user on a webpage.


The file OWS.js is located in the %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\TEMPLATE\LAYOUTS\1033 directory on each front-end web server in a SharePoint Foundation deployment.

The above from: http://msdn.microsoft.com/en-us/library/ms455335.aspx

----
The correct steps to add this are as follows:

1) Navigate to c:\Program files\common files\microsoft shared\web server extensions\14\template\layouts\1033\
2) Copy the OWS.js file to OWS_HOLD.js
3) Edit the OWS.js file using notepad
4) The File is trimmed for spaces, etc. so will not look formatted; at the very start of the file add:
var obj = new ActiveXObject('Name.NameCtrl.1');
5) Save the file and exit notepad

Repeat this on all front end servers.

To test it - navigate to the site from outside of the server; you should be prompted for install the Name.dll ActiveX control and User Icon's should work!

Wednesday, April 20, 2011

Load control template file /_controltemplates/TaxonomyPicker.ascx failed

Getting the following in your Event log?

Load control template file /_controltemplates/TaxonomyPicker.ascx failed: Could not load type 'Microsoft.SharePoint.Portal.WebControls.TaxonomyPicker' from assembly 'Microsoft.SharePoint.Portal, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c'.

As it turns out, from RTM to Release, there is a typo in the TaxonomyPicker.ascx file however, the following Blog explains it (kudos to Todd's post):

http://todd-carter.com/post/2010/05/03/Help-Wanted-Taxonomy-Picker.aspx

In case this is unreadable - to wit: There is a typo in the DLL registration line in the actual TaxonomyPicker.ascx file located in the web c:\program files\common files\microsoft shared\web server extensions\14\ControlTemplates - instead of a single comma (,) it is &#44; in the file.

However, as Todd points out, this error can be ignored since this particular control is not used; renaming the file to TaxonomyPicker.ascx_hold.

Tuesday, April 19, 2011

SharePoint 2010 - Database has large amounts of unused space

In most installations, you'll get this message after a few days (or sometimes weeks) that tell you that the SharePoint Database has large amounts of unused space in the health monitor - one or more Databases might be involved but typically the Usage Application DB (WSS_UsageApplication) is the one.

You can try to use the "Fix Automatically" but I've had mixed results (i.e. says fine, but shows up again later). The for sure fix is simple (Unfortunately the help referenced in the analyzer isn't very clear):

1) Login to the SQL Server box
2) Open the SQL Management Studio
3) Expand the Databases, right click on the Database in question and select New Query
4) Enter in the following command in the Query window:

     dbcc shrinkdatabase (WSS_UsageApplication)


5) Then click the Execute button.

Note the full format for this command is dbcc shrinkdatabase(dbname, target size in MB) - so dbcc shrinkdatabase(WSS_UsageApplication, 25) would reduce it to 25mb; by NOT specifying the target size, the DB will be reduced to the default size. In most cases (particularly for the Usage DB, this is the best setting).

Saturday, April 9, 2011

Web Analytics: Monitors the health of the Report Consolidator component

You'll find this one eventually on 2010 - you'll see the warning appear in the Central Admin Health monitor. It is a bit vauge as to what the real issue is but you can find the details on the Microsoft Site:

http://technet.microsoft.com/en-us/library/ff805075.aspx

What they are not saying is actually why this occurs; I've had this happen on test systems that were only running for a few days. The result is that monitoring will not work properly (i.e. the usage reports). The quick fix is via SharePoint's PowerShell - open that and do the following step.

NOTE: You must be an Admin to do this - check out the  Add-SPShellAdmin comand.

Step 1 - Get the GUID of the Service Application

> Get-SPServiceApplication
...
Managed Metadata ... Managed Metadata ... 9dbca54d-59e9-4f2d-bfe7-2ece94635750
Web Analytics Ser... Web Analytics Ser... 30e00364-c80b-4091-b2fc-04ed10ac0dae
Excel Service 1      Excel Services Ap... 7a290551-7d57-471a-87d8-7c7f6c6b424f

...
Notice the Web Analytics service - copy the GUID in the ID Column.

Step 2 - Turn on Data Trimming on the Reporting Service

> Set-SPWebAnalyticsServiceApplication -Identity <GUID> -EnableDataTrimming

(replace <GUID> with the GUID you copied above - NOTE: if you only have one Analytics Service, you can omit the GUID)

Give if a few minutes to let the SPTimer job kick then return to the Health Monitor, click the message and select Re-analyze Now - message should go away!

Friday, April 8, 2011

Office Documents not appearing in Search/SharePoint 2010

If you have noticed that users are complaining about older documents (.xls, .doc, .ppt, etc.) not showing up in search, the problem is likely that the Office IFilters haven't been installed - the IFilters enable SharePoint/FAST Search to better index the document contents.

You can download them from here:

http://www.microsoft.com/downloads/en/details.aspx?FamilyID=5cd4dcd7-d3e6-4970-875e-aba93459fbee

The IFilter has to be installed on the Front End server running Central Admin (ala where the Search Service lives).


Likewise for your PDF's, you need to download and install the Adobe PDF IFilter:

http://www.adobe.com/support/downloads/detail.jsp?ftpID=4025

As well, if you want the neat little Icon to show up, you need to find a PDF icon that is 16x16 pixels. You can download the 'official' ones from Adobe here:

http://www.adobe.com/misc/linking.html

Copy the .gif or .png file into the SharePoint Images folder (c:\program files\common files\microsoft shared\web server extensions\14\template\images. Next, locate the DOCICON.XML file in the template\XML folder and add the extension - find the PNG extension, copy the line and add the PDF:

   <Mapping Key="pdf" Value="pdf.gif" />     <-- add this line
   <Mapping Key="png" Value="icpng.gif" />

NOTE: You must modify the DOCICON file on every front end server.

Note: If you are open to it, you can update the DOCICON file with a feature as Steve Goodyear outlines here:

http://webmail.vmsol.com/hwebmail/services/go.php?url=http%3A%2F%2Fblogs.msdn.com%2Fb%2Fsgoodyear%2Farchive%2F2008%2F06%2F14%2Fupdating-the-docicon-xml-file-with-a-feature.aspx

Tuesday, April 5, 2011

Setup of SharePoint User Profiles - cannot synchronize

As you may or may not know, setting up the User Profile Services requires special permissions - specifically for the account that will be used for doing the Synchronization. Most of the installation instructions out there miss this setting.

The symptoms are not always apparent but usually means that no user profiles are imported. The two links you need are here:
·         Microsoft SharePoint Product Group: How to set Replication Directory Changes,
·         KB303972: How to grant the "Replicating Directory Changes" permission for the Microsoft Metadirectory Services ADMA service account,

However, if you need to check if an account has the correct permissions you can use the Powershell script below (Shout out to Andrew "MossHater" for the script):


Just change the $userName variable in the script below and run it.

Output like:

User ‘EXAMPLE\User’:
   
has a 'Replicating Directory Changes' permission on 'DC=example,DC=local'
   
has no a 'Replicating Directory Changes' permission on 'CN=Configuration,DC=example,DC=local'

Check-ADReplicatingChangesPermission.ps1

function Check-ADUserPermission(
   
[System.DirectoryServices.DirectoryEntry]$entry,
   
[string]$user,
   
[string]$permission)
{
   
$dse = [ADSI]"LDAP://Rootdse"
    $ext = [ADSI]("LDAP://CN=Extended-Rights," + $dse.ConfigurationNamingContext)

   
$right = $ext.psbase.Children |
       
? { $_.DisplayName -eq $permission }
   
   
if($right -ne $null)
    {
       
$perms = $entry.psbase.ObjectSecurity.Access |
            ? { $_.IdentityReference -eq $user } |
            ? { $_.ObjectType -eq [GUID]$right.RightsGuid.Value }

       
return ($perms -ne $null)
    }
   
else
    {
       
Write-Warning "Permission '$permission' not found."
        return $false
    }
}


# Globals

$userName = "EXAMPLE\User"
$replicationPermissionName = "Replicating Directory Changes"

# Main()

$dse = [ADSI]"LDAP://Rootdse"

$entries = @(
   
[ADSI]("LDAP://" + $dse.defaultNamingContext),
    [ADSI]("LDAP://" + $dse.configurationNamingContext));

Write-Host "User '$userName': "
foreach($entry in $entries)
{
   
$result = Check-ADUserPermission $entry $userName $replicationPermissionName
   
   
if($result)
    {
       
Write-Host "`thas a '$replicationPermissionName' permission on '$($entry.distinguishedName)'" `
           
-ForegroundColor Green
    }
   
else
    {
       
Write-Host "`thas no a '$replicationPermissionName' permission on '$($entry.distinguishedName)'" `
           
-ForegroundColor Red
    }
}