Microsoft SharePoint Developer Documentation Team Blog

December 10, 2007

The Microsoft SharePoint Developer Documentation Team have started blogging, if you are a SharePoint developer, then this resource is going to be essential.

Visit their new blog at: http://blogs.msdn.com/sharepointdeveloperdocs/default.aspx

There first couple of blog posts are fantastic;

  • Extending Workflow Actions for SharePoint Designer
  • SharePoint Resource Center Pages Now Live
  • SharePoint SDKs Machine Translation Pilot
  • Creating new .ACTIONS files for code-free workflow editors
  • Content Migration in SharePoint
  • Content Migration in SharePoint (Post 2)
  • Customising Alert Notifications and Alert Templates in Windows SharePoint

Microsoft Best Practices Analyzer for Windows SharePoint Services 3.0 and Microsoft Office SharePoint Server 2007

November 23, 2007

Have you implemented a WSS v3 or MOSS 2007 environment? Are you an administrator of a WSS v3 or MOSS 2207 environment? or are you the Security Consultant for an organisation that has deployed a WSS v3 or MOSS 2007 environment? If so, then this tool will be invaluable for you.

The Microsoft Best Practices Analyzer for WSS v3 and MOSS 2007 collects information about the topology in relation to ‘best practices’ and provides administrators with a detailed report of recommendations that can be applied to obtain greater performance, scalability and reliability.


Windows Server 2008 and WSSv3 Update

November 1, 2007

The Window Server team have announced on their blog that WSSv3 will again be provided as a separate download for Windows Server 2008.  This is how the product was prior to Windows 2003 R2.  Since Windows Server 2003 R2 was released, the WSSv3 product has been rolled into the OS, however, from Windows Server 2008 RC1 it will be segmented again, giving greater flexibility to server deployments.


WSS v3 Security Hotfix MS07-059 announced

October 10, 2007

The SharePoint Product Team have announced an important mandatory security hotfix that will be released on October 9th (PST).

Be sure to note that as Windows SharePoint Services 3.0 is included with all editions of Office SharePoint Server 2007, Microsoft Office Project Server 2007, and Performance Point Server as well as any others which include WSS 3.0 you need to apply this hotfix on those environments as well. 

We recommend applying this hotfix during your next planned downtime, or change management window and scheduling this with priority.  This hotfix contains previously released hotfixes including the DST (Daylight Savings Time) hotfix.

First, if you have deployed “host named site collections” previously known as “host header” sites you should wait to apply the hotfix if you have more than 50 host named site collections. We will be issuing a performance related fix related to the hotfix. This hotfix will include the same hotfixes as the October 9 public update in addition to the host named site collection update performance related hotfix.  You need not wait if this does not apply.

The most important thing as the title suggests is this hotfix addresses a security vulnerability in Microsoft Windows SharePoint Services 3.0 that could allow cross-site scripting. This update resolves this vulnerability. Please read the entire contents of the KB article before applying the hotfix as there are a number of known issues which should be well understood. (If these links aren’t available as you read this article, they will be shortly as the hotfix becomes available.)

http://support.microsoft.com/?kbid=937832

To view the complete security bulletin, visit the following Microsoft Web site:

http://www.microsoft.com/technet/security/bulletin/ms07-059.mspx

Also, Service Pack 1 for WSSv3 and MOSS 2007 has entered internal testing within Microsoft and is expected to be released soon.


AJAX SharePoint List Rotator Web Part

August 29, 2007

Adam Buenz [WSS MVP] has posted about the AJAX SharePoint List Rotator Web Part

“…The AJAX SharePoint List Rotator WebPart does what its name implies; it rotates things out of a SharePoint list. In order to eliminate a postback, it uses AJAX to load and rotate the items, nothing really fancy, but I needed a way to display task items randomly in a WebPart. To be honest I didn’t spend a lot of time on it because it was a nice to have thing, and not really used that heavily for my side project…”, Adam Buenz

rotating_interface

Adam suggests that the WebPart hasn’t been tested all that thoroughly, but it should provide a great starting point for those who want similar functionality or would like to look at AJAX within a WebPart. You can download it here.


SharePoint Web Service Example – Grabbing Wiki Content

July 26, 2007

Arpan Shah has just posted an excellent post about a session he presented at the internal Microsoft Tech Ready conference yesterday.  The article show how easy it is to use the SharePoint Web Service to consume content from SharePoint for use elsewhere.


Integrating RadControls into SharePoint 2007

July 26, 2007

Latest information from Telerik regarding its RadContols suite and integration into SharePoint 2007 and WSSv3.

The market leading RadControls for ASP.NET bring unparalleled richness, responsiveness and interactivity to your SharePoint 2007 projects. Now you can easily incorporate all Telerik ASP.NET UI products into Windows SharePoint Services (WSS) v3 and Microsoft Office SharePoint Server (MOSS) 2007. The integration is a straight-forward process and we supply several resources to help you along the way. The whitepaper is specially created by Andrew Connell, MVP Microsoft Office SharePoint Server, visit Andrew Connell’s website

Whitepaper
Screencast

Although these resources refer to RadMenu, other controls in the Telerik RadControls suite follow the same deployment model and requirements. While the demonstration site used in the resources is a MOSS 2007 Publishing site, these same steps apply to all WSS v3 based sites, including sites created using the Team Site or Blank Site site template.

More information is available at www.telerik.com/sharepoint


Using Virtual Earth in SharePoint (Part 1 of 2)

July 6, 2007

Over the past few weeks Daniel Colarossi and I have been working together on developing a series of Web Parts using Virtual Earth.  This article describes two ways in which you can use Virtual Earth from within SharePoint.  I will shortly be adding to these with a couple of additional ways we have used Virtual Earth.

Content Editor Web Part

The simplest way to insert a Virtual Earth map into your SharePoint page is to use the out of the box Content Editor Web Part.  All you need to do is simply add a Content Editor Web Part and past the following code into the Source Editor.  The code below will display a map centered on Melbourne Australia and also places a push pin (with my photo) on top of the Melbourne Town Hall (-37.81585174911994 Latitude and 144.965714083252 Longitude).

<script src="http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=5"></script> <script type="text/javascript">
  var map = null;   function GetMap()
  {
    map = new VEMap('myMap');
    map.LoadMap(new VELatLong(-37.81585274911994, 144.9657154083252), 10,'r' ,false);
    AddPin(-37.81585274911994, 144.9657154083252, 'CodeJedi.NET', '<strong>Name:</strong> William Cornwill.<br><strong>Blog:</strong> <a target ="_new" href="http://www.codejedi.net">http://www.codejedi.net/</a><br><br><a target ="_new" href="http://www.codejedi.net"><img src="http://members.optusnet.com.au/cornwill73/siteimages/William.jpg" /></a>');
  }   function AddPin(lat, lon, iconurl, title, desc)
  {
    var shape = new VEShape(VEShapeType.Pushpin,new VELatLong(lat,lon));
    shape.SetTitle(title);
    shape.SetDescription(desc);
    map.AddShape(shape);
  }   function addLoadEvent(func)
  {
    if(typeof window.onload != 'function')
    {
      window.onload = func;
    }
    else
    {
      window.onload = function()
        {
          func();
        }
    }
  }   addLoadEvent(GetMap);
</script>
<div id='myMap' style="position:relative; width:640px; height:480px;"></div>

Basic Virtual Earth Web Part

As you might agree providing a user with some JavaScript and telling them to paste it into a Content Editor Web Part isn’t really that user friendly.  So Daniel and I have wrapped this basic functionality into a WebPart.  The Basic Virtual Earth Web Part allows a user to provide Latitude and Longitude coordinates or enter an address, a zoom level, a pin title and pin description.  The result is a user friendly and easily adjusted Virtual Earth map in a SharePoint page.

ExampleVEMap

You can download the code for the Basic Virtual Earth Web Part from the samples section of this blog.

Next time

In the next article I will be posting another two ways in which we have used Virtual Earth in SharePoint, including obtaining pin points from a SharePoint list of Lat/Longs (with an additional surprise) and also a Web Part that shows a map with pin points for all your contacts in Outlook.

These are just a couple of ways in which you could use mapping within SharePoint, there are countless other ways and I hope that this has gotten you as excited as I am about using Virtual Earth in SharePoint.


MOSSIG site updated

May 24, 2007

Today I finally got around to updating the content on the MOSSIG website. It is now a lot more functional and I think it looks a little better. The MOSSIG team are currently working on a more snazzy MOSS site and I will keep you all posted when that goes live. But in the meantime, enjoy the new site content.

I have to give a special thank you to Daniel Colarossi for giving some tutorial on embedding Virtual Earth in a Content Editor Web Part – pretty funky!

MOSSIG Website


SharePoint Upgrade Pre-scan Tool

May 23, 2007

This is a must have tool for those that intend on performing SharePoint upgrades. The Upgrade Pre-scan Tool can be obtained from the Microsoft Download Centre.

Before you can upgrade to Microsoft Office SharePoint Server 2007 or Microsoft Windows SharePoint Services 3.0, you must run the Prescan.exe utility against your existing Web sites. This pre-upgrade scan tool scans your sites and reports issues, allowing you to fix any errors before you perform an upgrade.

Another useful upgrade resource is a post by Alan Coulter.


Sample Master Pages for WSSv3

May 1, 2007

Check out the four sample master pages released by Microsoft, they include;

  • Block
  • Clarity
  • Horizon
  • Reverse

Master pages are a feature of ASP.NET 2.0 that work the same way in Windows SharePoint Services 3.0 and Microsoft Office SharePoint Server 2007 as they do in ASP.NET 2.0. Using master pages, you can create a single page template and then use that template as the basis for multiple pages in an application, instead of having to build each new page from scratch.

Microsoft has made available a package of sample master pages compatible with the Application Templates for Windows SharePoint Services 3.0 to showcase some of the customization options master pages provide. The master pages were built using new CSS and Master Page editing tools within Microsoft Office SharePoint Designer 2007.


Application templates for WSSv3

April 30, 2007

Check out this excellent resource, the Application templates for Windows SharePoint Service 3.0 page on the Microsoft TechNet website.

Application templates are out-of-the-box custom scenarios tailored to address the needs and requirements of specific business processes or sets of tasks in organizations of any size. They can be applied to a task, such as managing a help desk or tracking a marketing campaign, to easily create a dedicated Web-based application for a more efficient and effective way of working.

While application templates can be used to solve particular business needs, they also provide a starting point for partners and developers looking to build deeper SharePoint-based solutions. The templates make use of Windows SharePoint Services 3.0 capabilities and are compatible with Microsoft Office SharePoint Designer 2007 to help make customization easier.

Application Templates for Windows SharePoint Services 3.0 are separated into two groups, site admin templates and server admin templates, providing the right combination of integration with the platform and ease-of-deployment within an organization.

Site admin templates are custom templates that are easy for any SharePoint site administrator to install into the template gallery without requiring server administration access.

Server admin templates were created as site definitions, enabling tighter integration and enhanced functionality within the Windows SharePoint Services platform. They require a server administrator to install.


Using ASP.Net user controls ASCX in MOSS/WSSv3

March 28, 2007

Chris Johnson has posted a great article on using ASP.Net ASCX user controls in MOSS/WSSv3. I have been recently creating custom controls in Visual Studio (i.e. Control Classes not ASCX). To use these I add the controls to the GAC and then add an entry to the web.config to make it a safe control. The benefit of the ASCX model is that you can develop the user control in a more visual manner.

The ASCX controls can be used in MOSS/WSSv3 via the following method:

1. Create a Directory called “usercontrols” in the root of your sharepoint web site on the file system E.g. C:\Inetpub\wwwroot\wss\VirtualDirectories\moss.litwareinc.com80\UserControls

2. Open IIS manager and in the root of your SharePoint site create a VirtualDirectory called “_controls” and point it to that newly created directory.

3. Put your user control in that newly created directory on the filesystem

4. Open the web.config file and add the following:

<SafeControl src="~/_controls/*" mce_src="~/_controls/*" IncludeSubFolders="True" Safe="True" AllowRemoteDesigner="True" /">

5. In your ASPX page add the following:

<%@ Register src="~/_controls/SomeControl.ascx" mce_src="~/_controls/SomeControl.ascx" TagName="somecontrol" TagPrefix="uc2" %">

And…

<uc2:somecontrol id="mycontrol1" runat="server"></uc2:somecontrol>

6. Run your ASPX page and your control should render correctly.


SharePoint error handling (crank up the volume)

March 16, 2007

When developing with MOSS sometimes you come across a point in time where the page renders “Error: An unexpected error has occurred”. This is absolutely pointless for a developer who really needs to know what has gone wrong. There is however a way to crank up the volume on error reporting for MOSS (but only do it in your development environment).

  1. Edit the web.config file for the site.
  2. Look for “CallStack” in the SafeMode section, change the value from false to true.
  3. Look for “CustomErrors” in System.Web section, change the value from On to Off.

And vola you now have full stack traced .Net error messages instead of the usless “Something – but I am not telling you what – went wrong” message.


Microsoft Virtual Labs for Office System

March 9, 2007

Angus Logan has posted an excellent list of virtual labs for the office system, including Office 2007, WSSv3, MOSS 2007 and Groove. He also included a link to the virtual lab RSS feed so you can keep up to date as more virtual labs are released.


Remaining application templates for WSSv3 released

February 22, 2007

The Microsoft SharePoint team have just announced that the 20 remaining Application Templates of the “Fantastic 40” are now available for download!

[via Microsoft SharePoint Team Blog]

These server admin templates for Windows SharePoint Services 3.0 provide more enhanced functionality than the first 20 templates, including some with built-in workflows, heavily customized lists and libraries, and advanced data views. Moreover, these new templates (full descriptions here) are available not just in English but 10 additional languages: French, Italian, German, Spanish, Portuguese (BR), Japanese, Korean, Hebrew, Chinese (simplified), and Chinese (traditional). The additional languages will be available within the next few days. You can try out the fully functional demo versions of the English templates here, here, or here.


20 Site Admin templates for WSS 3.0

January 31, 2007

[Via: Microsoft SharePoint Products and Technologies Team Blog]

20 Site Admin templates are now available for public download:

Board of Directors

Business Performance Reporting

Case Management for Government Agencies

Classroom Management

Clinical Trial Initiation and Management

Competitive Analysis Site

Discussion Database

Disputed Invoice Management

Employee Activities Site

Employee Self-Service Benefits

Employee Training Scheduling and Materials

Equity Research

Integrated Marketing Campaign Tracking

Manufacturing Process Management

New Store Opening

Product and Marketing Requirements Planning

Request for Proposal

Sports League

Team Work Site

Timecard Management

Check out the online examples of these templates at http://www.wssdemo.com/application.


MOSS and WSS SDK’s available

January 23, 2007

The SharePoint Product Team have posted information regarding the official release of the RTM version of the MOSS and WSS SDK’s;

Download the MOSS SDK: http://www.microsoft.com/downloads/details.aspx?familyid=6D94E307-67D9-41AC-B2D6-0074D6286FA9&displaylang=en
Download the WSS SDK: http://www.microsoft.com/downloads/details.aspx?familyid=05e0dd12-8394-402b-8936-a07fe8afaffd&displaylang=en

The MOSS SDK contains the following;

  • SharePoint Server 2007 SDK Documentation (OSSSDK2007.chm)
  • Office Forms Server 2007 SDK Documentation (OFS12sdk.chm)
  • Windows SharePoint Services 3.0 SDK Documentation (WSS3sdk.chm)
  • MOSS SDK Code Samples to use in conjunction with SDK documentation
  • ECM Starter Kit
  • Supplemental developer whitepapers
  • Visual Studio Workflow templates for MOSS

The WSS SDK contains the following;

  • Windows SharePoint Services 3.0 SDK Documentation (WSS3sdk.chm)
  • Workflow Starter Kit

More information about additional content, samples, and downloads can be found on the following Web portals on MSDN;


Event Handlers in WSS v3

December 19, 2006

Those that are familiar with event handlers on Document Library lists in WSS v2 will be excited to know that event handlers can now be attached to any type of list. Not only do we get access to the Asynchronous events such as ItemAdded, we now also get access to Synchronous event before the fact, like ItemAdding. This will allow greater control over the way in which lists can be used within WSS v3.

This article will set out to describe the step by step instructions for defining an event handler and then hooking it up to a WSS list.

Creating the event handler

Creating an event handler is extremely simple, use Visual Studio .NET 2005.
1. Add a reference to the Microsoft.SharePoint assembly.

2. Create a class that inherits from one of the new event receiver classes, like SPItemEventReceiver or SPListEventReceiver.

3. Implement an override method for the event you wish to implement. Something like the following;

using Microsoft.SharePoint;

public class ListEventHandler : SPItemEventReceiver
{
public override void ItemAdded(SPItemEventProperties properties)
{
SPListItem listItem = properties.ListItem;
listItem["ColumnName"] = “Hello”;
listItem.Update();
}
public override void ItemDeleting(SPItemEventProperties properties)
{
properties.Cancel = true;
properties.ErrorMessage = “Deleting items from the list is not permitted.”;
}
}

The ItemAdded event will set a column in the list called “ColumnName” to a value of ‘Hello’ and the ItemDeleting event will be cancelled with an error message displayed to the user.

4. The next step is to sign the assembly and deploy it to the GAC.

That is it; we have created our event handler and deployed it ready to a list to start consuming it. The next step is to register the event to be fired from a given list.

Registering the event handler with the list

In the previous version of WSS you could register the event handler using the SharePoint user interface. This facility has been removed in WSS v3. Registering the event handler in WSS v3 can be done in two ways, as a feature or via code. I will describe the registering via code method. For more information on creating a feature the article called “Working with Features” in the WSS SDK documentation.

The easiest way to register the event handlers against the list is to create a Console application, like the one below;

public class Program
{
static void Main(string[] args)
{
SPSite collection = new SPSite(“http://server/site/&#8221;);
SPWeb site = collection.OpenWeb();
SPList list = site.Lists["MyList"];

string asmName = “MyEventHandlers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f90218d0785d9063″;
string className = “MyEventHandlers.ListEventHandler”;

// Register the events with the list
list.EventReceivers.Add(SPEventReceiverType.ItemAdded, asmName, className);
list.EventReceivers.Add(SPEventReceiverType.ItemDeleting, asmName, className);

// Clean up the code
site.Dispose();
collection.Dispose();

// Return to calling environment : Success
Environment.Exit(0);
}
}

Basically, the code attaches to the SharePoint site and locates the list “MyList” then adds an item to the EventRecievers collection of the list for each event to be fired.

As you can see it is pretty easy to deal with the new event handlers in WSS v3. Happy coding.


Installing Beta 2 Technical Refresh (B2TR)

September 12, 2006

The SharePoint product team have just posted a very important blog about the steps required to install B2TR. Before you do anything with the Tech Refresh (due out very soon), you must read this article.


Follow

Get every new post delivered to your Inbox.