TwitterLinkedInBlog

Monday, December 21, 2009

SP2010 Beta Search - Adobe PDF IFilter

Download pdficon_small.gif:
http://www.adobe.com/misc/linking.html

Copy pdficon_small.gif and paste in:
{SharePointRoot}\TEMPLATE\IMAGES\

{SharePointRoot}\TEMPLATE\XML\DOCICON.XML > Add the following:
<mapping Key="pdf" Value="pdficon_small.gif"/>

Recycle Application Pool.

Download x64 PDF IFilter from foxit:
http://www.foxitsoftware.com/pdf/ifilter/index.html#downifilter

regedit > HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\14.0\Search\Applications\GUID\Gather\Search\Extensions\ExtensionList > Edit > New > String Value > 47 > Enter > Right-Click > Modify > Value data > pdf > OK

cmd > net stop SPSearch4 > net stop OSearch14 > net start SPSearch4 > iisreset

Central Administration > Application Management > Manage service applications > Search Service Application > Left Nav > Crawling > File Types > New File Type > File Extension: pdf > OK

Start Full Crawl

Tuesday, December 15, 2009

Microsoft File Transfer Manager - How to re-open

cmd > c: > %SystemRoot%\Downloaded Program Files\ > transfermgr.exe > Options... > Place application shortcut on the desktop

Thursday, December 10, 2009

SP2010 Beta - ECMAScript Object Model Reference

ECMAScript Object Model Reference

SP2010 Beta - Where is my Visual Web Part code deployed?

...\14\TEMPLATE\CONTROLTEMPLATES\ScriptOMExample\VisualWebPart1\VisualWebPart1UserControl.ascx

Tuesday, December 8, 2009

SP2010 Beta - There has been an error creating the personal site.

When I click the "My Content" link, it returns the error, "There has been an error creating the personal site. Contact your site administrator for more information."

Edit:
You might just be able to add the managed path "personal" (with no "my" in front) to the web application. I would have to test this.

Resolution:
(Adopted from Creating new My Site hosts for MOSS 2007)

1.Create a new web application

2.Delete managed path: sites - Wildcard inclusion

3.Create managed paths:
my - Explicit inclusion
personal - Wildcard inclusion

4.Create a site collection at /my/ managed path. Use Enterprise > My Site Host template. Use web application created above. Title: Pilot My Site Host.

5.Create a blank site collection at the / managed path to enable self-service site creation. Use Collaboration > Blank Site template. Use web application created above. Title: Pilot Blank site.

6.Enable Self-Service Management. Central Administration > Application Management > Manage Web Applications > Click on Web Application created above > Ribbon > Self-Service Site Creation > On > OK.

7.Navigate to My Site Settings. Central Administration > Application Management > Manage service applications > User Profile Service Application > Setup My Sites > My Site Host > http://mossdev1:25000/my/. Note that this points to the URL for the explicit inclusion path and My Site Host Template site collection you created above. Set Personal site Location into just "personal". Note that this points to the URL (after SharePoint puts context to it) for the Wildcard inclusion managed path you created above. Choose the 2nd Site Naming Format: User name (resolve conflicts by using domain_username).

Monday, December 7, 2009

SP2010 Beta - Why is my Term Store Management Tool greyed out?

Because you haven't added yourself to the Term Store Administrators.

SharePoint 2010 Beta Central Administration > Application Management > Manage Service Applications > Managed Metadata Service > Term Store Administrators > Add yourself > Save

Tuesday, December 1, 2009

SP2010 Beta - Issues with the User Profile Synchronization Service Application

I am unable to create a synchronization connection. I am going to re-install SharePoint 2010 Beta with a domain admin account.

How to stop a service instance:
1. Find the guid for the service in the list of services: get-spserviceinstance
2. Stop the service using the guid: stop-spserviceinstance fbf50f16-7e42-6163-949b-36b3db0082ea

How to find the Replicating Directory Changes permission:
Active Directory Users and Computers > View > Advanced Features > right-click domain.com > Properties > Security > Click on user | Add user > Permissions for Administrators > Replicate Directory Changes | Replicating Directory Changes All | Replication Synchronization

References:
SharePoint 2010 - Step by Step Install
Path to User Profile Synchronization success in SharePoint 2010 Beta
Configuring User Profiles in SharePoint Server 2010
Configure User Profile Synchronization Service
Configure Profile Synchronization (SharePoint Server 2010)
User Profile Sync Setup in SharePoint Server 2010 Beta
Configuring SharePoint 2010 Beta Service Applications and User Profile Service Synchronization

Tuesday, November 24, 2009

SP2010 Beta - How to activate PS ISE, add SP PS Snapin, get spfarm

Activate PS ISE:
Server Manager > Features > Add Features > Windows PowerShell Integrated Scripting Environment (PS ISE)

Open PS ISE:
Start > All Programs > Accessories > Windows PowerShell > Windows PowerShell ISE

Create a basic SP2010 Script:
Add-PSSnapin -Name Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue
get-spfarm

Friday, November 20, 2009

SP2010 Beta - PowerShell Basics

get-host = Determine version of PowerShell.

Friday, November 13, 2009

Silverlight 3 - Basic HyperlinkButton with Image

<HyperlinkButton NavigateUri="http://www.google.com" TargetName="_parent" Width="151" Height="67">
    <HyperlinkButton.Background>
        <ImageBrush ImageSource="images/logo.jpg" />
    </HyperlinkButton.Background>
</HyperlinkButton>

PerformancePoint 2007 - Report Server URLs

Server Mode: SharePoint Integrated

Report Server URL: http://<servername>/<report Server Instance Name>

Tip: Reporting Services Configuration Manager (2008) > Web Service URL > Report Server Web Service URLs

Report URL: http://<servername>:<port>/<sharepoint Site Name>/<document Library Name>/<folder Name>/<report Name>.rdl

Tip: Go to the Report Server URL in ie and browse to the <folder Name>. Copy the path at the top of the page. Copy the report name.

Thursday, November 12, 2009

Silverlight 3 - Basic Linear Gradient Fill

<grid>

  <grid.background>

    <lineargradientbrush endpoint="0.5,1" startpoint="0.5,0">

      <gradientstop color="#B5B0AC" offset="0">

      <gradientstop color="White" offset="0.5">

      <gradientstop color="#B5B0AC" offset="1">

    </lineargradientbrush>

  </grid.background>

</grid>

Thursday, October 29, 2009

SP2010 Beta - New End User Features

Visual Upgrade with preview.

Lists can have millions of items. UI will make navigation of millions of items easier.

Save site as template creates a .wsp. Developers can upload .wsp into VS2010 as a new project.

Relationships between lists that allows you to cascade deletes or block deletes. Transacted deletes and other changes with lists.

Item-level and list-level validation. Excel-like formula-based validation. Built in to edit field of a list in list settings. You can make a column unique. Unique list of contacts, for example.

Lookup to multiple columns.

List Query Throttling.

Visio 2010 Workflow Design. Visio > SPD > Visio > SPD > VS2010 = Development Continum. You can modify the built in workflows using SharePoint Designer 2010. SPD Workflow can be tied to content types. SharePoint Designer can now use InfoPath forms for workflow forms (Init, Assoc, Task).

Site Workflow. Doesn't have to bind to a list. Site Actions > Site Workflows. Workflows can be scoped to Site level, not just list level (and globally reused from designer).

Context sensitive ribbon uses Ajax to reduce round trips.

Notification area of the ribbon - allows you to pop a message.

Dialog Framework - Allows you to pop up a dialog. Standard SharPoint page with a URL.

Silverlight list and site creation UI - if silverlight is installed. If not installed, see old UI.

Web Part Versioning.

Offline w/ SPWorkspace.

Office Web Apps - Lite Version.

Knowledge Mining - Key phrases mined through user's sent box in Outlook 2010.

Social tagging (Content), Expertise tagging (People).

Bookmarking = Delicious. Replaces My Links.

Feedback - 5 star metaphor.

Note board = Facebook Wall.

"SharePoint Fluent User Interface, or the Ribbon, complete w/ Live Preview functionality".

Individual blogs and team blogs.

Managed Metadata - Centrally define taxonomies that can leveraged in and across farms. Tags are hierarchical. New Managed Metadata field type (which offers auto completion of tags). New Enterprise Managed Metadata (EMM) service from Central Admin. New service architecture allows admins to extend and share metadata configuration across sites and farms. Enterprise Content Types - publishable across farms using new service architecture.

Unique Document IDs - Embedded within a special URL, allows user to retrieve doc even if moved. Emailed links will work even if doc is moved.

Advanced Routing. In-Place Records Management. Documents that are records can live along side non-records in the same document library.

Document Sets - All docs have same metadata, versioned as a whole, initiate workflow on entire set as a whole, custizable Document Set Welcome Page. Document Sets allow execution of a single action against multiple documents (reduce repetitive work).

Skinnable Silverlight video player.

Web Analytics with corresponding web parts.

Search - Alert will rerun the query at scheduled intervals and notify user via email or text message of changes to the result. Search Refinements - auto determined using tags and metadata. Social Search - People search center. Search makes it easier for people to find experts faster. For instance, if you are looking for a person with product sales experience, your search results will show the person's profile, including notes, ratings and their activities. SharePoint Search will use phonetic and multi lingual comparisons to find your documents.

Tagging is unified in Sharepoint. For example, in a profile you can see tags that are associated with the person who appears in your search results.

Project Tasks can have predecessors (force completion of tasks before others finish).

Adding files via Explorer view will leave them checked out when required fields are present. Users must check in and add the fields.

Validation on Site/List/ListItem names - invalid characters are checked.

Visio diagrams can be linked to external data and refreshed on SharePoint Sites.

Social computing - Activity Streams. Tagging is part of a user’s Activity Stream. You can see on a user's profile that s/he tagged an element.

Team sites are now wiki-oriented. Users can use wiki editing commands. "wikis everywhere".

Reporting Services is integrated. No add-in to install. New charting controls are free and look good.

SMS messaging can be setup for alerts, invites and notifications.

Calendars may be layered on top of one another.

Friday, October 23, 2009

SP2007 - How to hide the search scope dropdown and default to a custom scope with a space in the name

<...SearchBoxEx ... DropDownMode = "HideScopeDD" AppendToQuery="false" AppQueryTerms="Scope:&quot;My Scope&quot;" ... />

Update:
Since hiding the dropdown disables the scope parameter passed into the search results page, the customized search results page wasn't receiving the s parameter it was expecting. I ended up changing the DropDownMode back to ShowDD and added the following jQuery to a CEWP on just the home page:

<script type="text/javascript" src="/_layouts/jQuery/jquery-1.3.2.min.js"></script>

<script type="text/javascript">
$(".ms-sbscopes").hide();
</script>

Thursday, October 15, 2009

SP2007 - How to get SPWeb Url from full Url

Uri fullWebUrl = new Uri("FullUrl");
string webUrl = fullWebUrl.LocalPath;

Wednesday, October 14, 2009

SP2007 - Search ResultTable Columns

WorkId, Rank, Title, Author, Path, Write, SiteName, CollapsingStatus, HitHighlightedSummary, HitHighlightedProperties, ContentClass, IsDocument, PictureThumbnailUrl

Tuesday, October 13, 2009

SP2007 - Why is my timer job executing twice?

I have seen many blog comments referring to a developer's timer job executing twice, but no solutions. It's happening to me and I'm determined to figure out why this week. I'll post the solution when I find it.

Newest Update: From the comment below:
Clemens said...
I just found:
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.administration.spjoblocktype.aspx
you should use SPJobLockType.Job instead of SPJobLockType.ContentDatabaseJob in the Jobs constructor.
SPJobLockType.ContentDatabaseJob executes for every DB, the other only once per mashine

Older Update: Thanks to this blog entry...
rafelo: SharePoint Timer Jobs Running Multiple Times
...I looked through the logs and the job was running once for each content database! I verified the guids of the content databases by going to Central Administration > Application Management > Content Databases and hovering over the link to each. The guid is in the query string (DatabaseId).

Notice the signature of the method:
public override void Execute(Guid contentDbId)
{
...
If (mySiteCollection.ContentDatabase.Id.Equals(contentDbId))
{
... // put your code here and it will only run once for the targeted site collection.
}
...
}

Windows - How to remove a file extension association

assoc .ext=

Wednesday, April 22, 2009

SP2007 - How to retrieve text from an Enhanced rich text column

SPFieldMultiLineText sampleField = sampleListItem.Fields["Sample"] as SPFieldMultiLineText;
string sampleText = sampleField.GetFieldValueAsText(sampleListItem["Sample"]);

Saturday, April 18, 2009

SP2007 - EnableInheritance="True"

If you set Current Navigation to “Display the same navigation items as the parent site” and you don’t see the same navigation items as the parent site, you might need to add an EnableInheritance="True" attribute to the PublishingNavigation:PortalSiteMapDataSource as in this example:

<PublishingNavigation:PortalSiteMapDataSource ID="SiteMapDSWithHeadings" Runat="server"
    SiteMapProvider="CurrentNavSiteMapProvider"
    EnableViewState="true"
    StartFromCurrentNode="true"
    StartingNodeOffset="0"
    ShowStartingNode="false"
    TrimNonCurrentTypes="None"
    EnableInheritance="True"/>

Saturday, March 28, 2009

SP2007 - How to hide a CQWP Group Header if it is Blank

By default, the CQWP Group Header displays (Blank) if the group by field is null. The desired behavior is to display nothing.

For example, add the following xsl template, SmallTextHiddenBlank, under the existing xsl template, SmallText, in the Header.xsl file in the Style Library. Then, choose the SmallTextHiddenBlank Header template in the CQWP Tool Part.

<xsl:template name="SmallTextHiddenBlank" match="*[@GroupStyle='SmallTextHiddenBlank']" mode="header">
  <xsl:choose>
    <xsl:when test="string-length(normalize-space(@*[name()=$Group])) = 0">
    </xsl:when>
    <xsl:otherwise>
      <div class="groupheader item small">
      <xsl:call-template name="OuterTemplate.GetGroupName">
        <xsl:with-param name="GroupName" select="@*[name()=$Group]"/>
        <xsl:with-param name="GroupType" select="$GroupType"/>
      </xsl:call-template>
      </div>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>

Tuesday, March 10, 2009

SP2007 - How to Programmatically Inherit Current Navigation

Scenario: Office SharePoint Server Publishing Infrastructure is activated at the SPSite level. Office SharePoint Server Publishing is NOT activated at the SPWeb level. Attempting to inherit Current Navigation from the Parent SPWeb.

using Microsoft.SharePoint.Publishing;
  …
  PublishingWeb currentPublishingWeb = PublishingWeb.GetPublishingWeb(currentWeb);
  currentPublishingWeb.InheritCurrentNavigation = true;
  currentPublishingWeb.Update();

 // Does not work because the SPWeb is NOT a PublishingWeb:
 //if (PublishingWeb.IsPublishingWeb(currentWeb))
 //{
 //    PublishingWeb currentPublishingWeb = PublishingWeb.GetPublishingWeb(currentWeb);
 //    currentPublishingWeb.InheritCurrentNavigation = true;
 //    currentPublishingWeb.Update();
 //}
 //else
 //{
 //    currentWeb.Navigation.UseShared = true;
 //    currentWeb.Update();
 //}

Friday, February 20, 2009

SP2007 - Web Part HandleException Technique

Hide the exception message and stack trace in html comments and provides a Cancel link for the user to refresh the page:
/// <summary>
/// Clear all child controls and add an error message for display.
/// </summary>
private void HandleException(Exception ex)
{
m_ErrorHasOccurred = true;
Controls.Clear();
Controls.Add(new LiteralControl(string.Format("<!--{0}--><!--{1}-->{2}{3}",
ex.Message, ex.StackTrace,
"An error has occurred. Please contact your administrator.",
"<br/><a href='" + Page.Request.Url.ToString() + "'>Cancel</a>")));
}