Scott Samuels on February 5th, 2010

If you wish to send me a question on Aardvark (What is Aardvark?), add me to your Aardvark network by searching for aardvark@sharepoint2007.com.au, or head to http://vark.com/s/tO0F.


William from Mississauga, Canada, posted a question which came my way via Aardvark.

William wrote:

We have both .ca (Canada) and .com domains. We were going to use the .ca internally with .com public site. I am setting up a *SharePoint* sub-domain and was doing it on the .ca side. However, all of our email addresses are .com. Because of the email issue, would it be easier with SharePoint to setup the sub-domain on the .com side or can I stick with how I have started with .ca?

I replied with the following:

As long as you have considered the DNS and routing issues with this setup, you will be fine. You may have to allow your SMTP gateway in your .ca domain to relay emails to the .com domain when you are setting up incoming (i.e. emailing to a list) and outgoing (e.g. alert, subscriptions and workflow emails) email in SharePoint.

See http://technet.microsoft.com/en-us/library/cc263462.aspx and http://technet.microsoft.com/en-us/library/cc287879.aspx

If you are looking at setting up an extranet (a public facing area) with SharePoint then you need to look at web application zones and alternate access mappings within SharePoint to handle your architecture.

William kindly responded:

Thank you for the detailed response. Gotta love getting an answer on the far side of the world not long after posing it. Aardvark has a bit of a weird setup, but I can’t argue with proven results.


Aardvark is a new kind of tool that lets you tap into the knowledge and experience of friends and friends-of-friends.Send Aardvark a question (from the web, IM, email, Twitter, or iPhone) and you’ll get a quick, helpful response from someone with…

  • The right knowledge
  • Similar tastes
  • Friends in common
Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • Technorati
  • Twitter
  • MySpace
  • RSS
  • Twitthis

Tags: ,

Aardvark Q&A

Aardvark Q&A

Aardvark is a new kind of tool that lets you tap into the knowledge and experience of friends and friends-of-friends. It reminds me of the old IRC channels you would join to ask questions on relevant technologies, just a thousand times better.

Send Aardvark a question (from the web, IM, email, Twitter, or iPhone) and you’ll get a quick, helpful response from someone with the right knowledge, similar tastes and friends in common

Want free SharePoint advice? Join Aardvark and send me a question any time. I will receive your questions instantly through my MSN Messenger account!

Go to http://vark.com/s/tO0F to join my network OR follow these 3 simple steps to start asking me questions:

  1. Join Aardvark
  2. Go to your Aardvark network
  3. Search for me – aardvark@sharepoint2007.com.au – using the “Find people you know” tool

Looking forward to helping you all out!

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • Technorati
  • Twitter
  • MySpace
  • RSS
  • Twitthis

Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Scott Samuels on February 2nd, 2010

I had a request today to create a link to a “Drop Folder” in SharePoint where people could drag their documents to for our Document Reviewers to review.

MSDN describes a solution (see “MSDN – About Web Folder Behaviors“) that is meant to work in browsers IE5 and later, but unfortunately it didn’t work in my employer’s *gasp* IE6 browser.

Using IE8’s Developer Tools, I hunted down how SharePoint was implementing the “Open with Windows Explorer” functionality.

Open with Windows Explorer

Open with Windows Explorer

On inspection, I found the element contained the following:

1
2
3
4
5
6
7
8
9
10
11
<tr menuGroupId="200" 
    description="Drag and drop files into this library." 
    text="Open with Windows Explorer" 
    onMenuClick="NavigateHttpFolder('http:\u002f\u002fsharepoint2007:100\u002fCSC Resumes', '_blank');"
    type="option"
    hidden="!(SupportsNavigateHttpFolder())"
    enabled="true"
    checked="false"
    onMenuClick_Original="NavigateHttpFolder('http:\u002f\u002fsharepoint2007:100\u002fCSC Resumes', '_bank');"
    text_Original="Open with Windows Explorer"
    description_Original="Drag and drop files into this library.">

Of particular interest is line 4:

 onMenuClick="NavigateHttpFolder('http:\u002f\u002fmoss_servername\u002fDocuments', '_blank');"

The NavigateHttpFolder function resides in the core.js file in the \12\TEMPLATE\LAYOUTS\1033 folder (assuming 1033 is your language code). The function takes two parameters:

  • urlSrc, the hex encoded url of the folder you wish to open
  • frameTarget, the target frame you wish to open the link in should the borwser be non-compliant with the functionality

Taking this into consideration and using the Content Editor Web Part to display the link, I wrote the following source code to achieve the functionality:

1
2
3
4
<a onclick="NavigateHttpFolder('http:\u002f\u002fmoss_servername\u002fDocuments',  'blank');" 
   href="#">
     Please place your items in this folder...
</a>

The precondition is that the above link will only work on pages where the master page has loaded the core.js file.

Hope this helps someone!

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • Technorati
  • Twitter
  • MySpace
  • RSS
  • Twitthis

Tags: , ,

Scott Samuels on January 15th, 2010

In a post last week I discussed some headaches I had experienced when using SharePoint Reporting Services, based on SQL Server Reporting Services, to create a report based on SharePoint lists. In this post I wanted to discuss how the goal posts move when you are working on a report derived from data in a SharePoint Meeting Workspace as there are some subtleties worth noting.

Meeting Workspaces are a fantastic solution to the problem of coodinating and running a meeting. Their power is amplified with their ability to link a series of meetings to one workspace (Microsoft provides a great video on how to do this at http://office.microsoft.com/en-us/sharepointtechnology/HA102769611033.aspx?pid=CH100649471033). If you have created a series of meetings within a workspace, items in a list are handled differently to how they are handled in “normal” sites. Items are related to a meeting instance through a MeetingInstanceID.

Although it may appear that the workspace contains a site to handle each meeting instance, it really just handles the display and hiding of data based on the MeetingInstanceID set in the current session (not in SPContext.Current as we will see later). So how does this affect reports? I wanted to create a Meeting Minutes report and a Meeting Agenda report based of information held in lists within a Meeting Workspace. Below is an account of the challenges I faced. I hope it can help someone save some hours and sanity!

GetListItems, Meeting Instances and Reporting Services

The web service you connect to in order to get items from a list for display in a report is the Lists service (Lists.asmx). The GetListItems method returns information about items in the list based on the specified query… but from which meeting instance? Although the method takes a parameter which can set the meeting instance you wish to grab data from, it will not work in reporting services. Why?

Let’s look at the signature for GetListItems:

public XmlNode GetListItems (
    string listName,
    string viewName,
    XmlNode query,
    XmlNode viewFields,
    string rowLimit,
    XmlNode queryOptions,
    string webID
)

The parameter we are interested in is the queryOptions parameter. It takes an XML fragment that contains separate nodes for the various properties of the SPQuery object, one of which is MeetingInstanceID. So, in a normal situation, you would add the following XML node to an SPQuery to get data from a particular meeting instance:

<QueryOptions>
   <MeetingInstanceId>[your_meeting_instance_id]</MeetingInstanceId>
</QueryOptions>

where

[your_meeting_instance_id]

is the meeting instance ID of the meeting you wish to obtain the data from. You can get the Meeting Instance Id from a special list contained in every Meeting Workspace called “Meeting Series” (Sanket Shah discusses this “Meeting Series” list in his blog post titled “Challenges while working with object model to access recurring meeting workspace site information”).

For a report created in Visual Studio using the Report Designer, you would assume that you could paste the above XML in a value field of a parameter named queryOptions in your Dataset that connects to your list in the Meeting Workspace, however, this WILL NOT WORK.

Using a tool to inspect the packets that are being sent by Reporting Services (such as Fiddler) you will see that the XML gets its HTML special characters encoded prior to transport, resulting in the following being sent inside of the queryOptions XML node (parameter):

&amp;gt;QueryOptions&amp;lt;
   &amp;gt;MeetingInstanceId&amp;lt;[your_meeting_instance_id]&amp;gt;/MeetingInstanceId&amp;lt;
&amp;gt;/QueryOptions&amp;lt;

How frustrating!!! I guess it is to stop Cross Site Scripting attacks that could happen if a Dataset parameter took a Report parameter that contained malformed user data… Can you think of any other reasons?

As a result, the default behavior of the service is to return data from the list from the meeting instance that is next in the series based on the current system date (i.e. will only get data from the upcoming meeting in the series).

This is great if you are only interested in creating, say, an Agenda report that uses data on the upcoming meeting to build up the report, but what about if you want to create a Minutes report, taking data from a meeting that happened in the past… too bad so sad! You will have to create a new web service that replicates the GetListItems method but takes a Meeting Instance ID parameter as a string. This is the solution I ended up implementing.

In addition to the custom Web Service, I wanted to eliminate the need for users to select which meeting instance they wished to build the report on (my current solution had a Meeting Instance report parameter that the users had to fiddle with to generate the right report). I felt it was reasonable for the user to expect that the reports would be generated based on the meeting instance they were currently browsing within the workspace.

The solution was centred around the fact that the Report Viewer Web Part exposes report parameters for filtering via web part connections. Using this as the basis for a solution I was going to do the following:

  1. Get the SPMeeting.InstanceID from the current SPContext using SPContext.Current and put it in into a custom Filter Web Part
  2. Bind my MeetingInstanceId report parameter to the MeetingInstanceId exposed in the Filter Web Part using a connection to the Report Viewer Web Part
  3. Use the MeetingInstanceId report parameter as a parameter to send over to my custom web service.

The thinking was that the SPMeeting.InstanceID from the current SPContext using SPContext.Current would give me the MeetingInstanceId of the meeting that the user was currently browsing in the Meeting Workspace. Disappointingly, once again, SharePoint failed me….

The SPMeeting.InstanceID from the current SPContext (using SPContext.Current) only ever provides the MeetingInstanceID of the meeting instance that is next in the series based on the current system date (same behavior as the Lists.GetListItems method) and NOT what the user is browsing, which is what you would expect… right?! At least that’s what I expected!

As a result you have to have a report parameter that is manually set by the user prior to building the report that sets the meeting instance from which you want to pull the data from. I populate this parameter with ows_InstanceId values from the “Meeting Series” list within the Meeting Workspace, and label it with the ows_EventDate field from the same list for usability.

Hope this helps someone out as there are many hours of research and fiddling around to work this solution.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • Technorati
  • Twitter
  • MySpace
  • RSS
  • Twitthis

Tags: , , ,

Scott Samuels on January 7th, 2010

Merry Christmas and Happy New Year!

A poorly documented area of SharePoint 2007 is the use of the SQL Server Reporting Services (in SharePoint Integrated mode of course) to create reports. I have been working with the Lists web service (find it at http://your_moss_server_name/[sites/][site_name /]_vti_bin/Lists.asmx) to create my reports. Here are my “Best SharePoint Reporting Services Headaches” you need to be aware of:

1. Issues with GetListItemsChanged (well… sort of)

The GetListItemsChanged method returns changes made to the list since a specified date and time. When you are defining your parameters for the query from the Visual Studio interface, it gives you an option to add an Expression to the value field. Sounds handy if you would like to do something like “Get me all the items that have changed in the last month” – you would need an expression like =DateAdd(“M”, -1, Today()) in the value of the ’since’ parameter so that your users don’t have to enter the correct date every time.

Unfortunately what they don’t tell you is that you cant use VB functions in dataset queries.  This goes for any query, not just ones used on the GetListItemsChanged method. The result: to achieve something like the aforementioned you would have to create a view in the list in SharePoint (bad news… see why in a minute) or enter the date manually each time (and yes, can’t put VB functions in Report Parameters either).

I also found that the GetListItemsChanged method returned extra rows with blank data in them. Equally annoying!

2. Issues with GetListItems

You can’t return the “last modified”/”modified by” dates. The only way to achieve this is to write a custom web service.

3. Queries can’t span more than one list

If you want to run a CAML query that gets data from more than one list then you better put your coding hat on. Once again, the only way to achieve this is to write a custom web service.

4. Annoying format of some data

Sometimes you will get data that is in the format “X;#some_data” where X is a number. This number is one of two things, dependant on the column it is in:

  1. The UserID of the user who created the item. This would relate to the record with the same UserID in the User information List in the Site Collection you are calling your query from.
  2. The ID of the item.

David Wise’s post on ShareConnecting SQL Reporting Services to a SharePoint List provides a bit of code that will help you get rid of this.

5. Cannot get data from a view using its display name

On just about every SharePoint Reporting Services blog entry I have read there is a mention on whether to pass a GUID or a Display Name for the listName parameter in the GetListItems method. Unfortunately you don’t get a choice when it comes to the GetListItems method viewName parameter – you have to enter a GUID. This presents a design issue given if find yourself in one of two scenarios:

  1. You have multiple SharePoint environments (i.e. dev, test, pre-prod, prod) and you need to progress the report through the environments; or
  2. You wish to deploy the report in several locations within your farm, running it off different lists created with the same list template.

If you fall in to one of these categories BE CAREFUL! The query’s viewName GUID will need to be changed before you run your report off anything other than what it was developed off, regardless whether the view is named the same. You can modify the .rdl file (the report file – really just an XML file) to get it to work without reopening Visual Studio:

  1. Manually open the .rdl file with notepad or your favorite text editor
  2. Find the dataset where you call the GetListItems method with the viewName parameter.
  3. Modify the viewName query parameter so that it contains the GUID of the view on the different list. The quickest way to get the GUID is to navigate to the list and modify the view that you want to use in the query. You will find the GUID for the view in the URL of the Modify View page (don’t forget to change the HTML encoded characters, %7B = “{“, %2D = “-”, %7D = “}”).
  4. Save the file.
  5. Upload it to your SharePoint Report Library.

Have you had troubles with Reporting Services? I’m happy to help you out as it can be really frustrating stuff! Just leave a comment below and I will get straight on to it!

Next post I will highlight some issues with creating Reports using data from lists within a SharePoint Meeting Workspace.

http://vspug.com/dwise/2007/11/28/connecting-sql-reporting-services-to-a-sharepoint-list-redux/
Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • Technorati
  • Twitter
  • MySpace
  • RSS
  • Twitthis

Tags: , ,

Scott Samuels on November 19th, 2009

Microsoft has now opened up the SharePoint/FAST 2010 beta trial to anyone with a Windows Live login. If you don’t have one then you can sign up for one for free. Head to:

Installation of the SharePoint Server 2010 Beta requires one of the following product keys:

  • SharePoint Server 2010 Beta (Enterprise CAL features): PKXTJ-DCM9D-6MM3V-G86P8-MJ8CY
  • SharePoint Server 2010 for Internet Sites Beta, Enterprise: BV7VC-RMR6B-26P6Y-BTQDG-DX2KQ

System Requirements for SharePoint 2010 are at http://technet.microsoft.com/en-us/library/cc262485(office.14).aspx

As I mentioned yesterday the SharePoint 2010 beta is not supported and you *CANNOT* upgrade the installation to RTM when it’s released. This Beta should only be used for evaluation purpose.

Instructions for installation of this beta:
http://blogs.msdn.com/opal/archive/2009/11/16/installation-notice-for-sharepoint-2010-public-beta.aspx

Also note that there *ISN’T* a publically available WCF hotfix for those wanting to use Windows Server 2008 R2, so for now you can only use Windows Server 2008

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • Technorati
  • Twitter
  • MySpace
  • RSS
  • Twitthis

Tags: , , , ,

Scott Samuels on November 17th, 2009

The SharePoint 2010 beta and Office 2010 Beta 2 is now available for download  – if are a lucky and have an MSDN or TechNet Subscription…

If you do have a subscription, you can access it here:

Get downloading!

UPDATE: 18 November 2009

Just a quick update based on the word on the street about the MSDN install…

This beta is not supported and you *CANNOT* upgrade the installation to RTM when it’s released. This Beta should only be used for evaluation purpose.

Instructions for installation of this beta:
http://blogs.msdn.com/opal/archive/2009/11/16/installation-notice-for-sharepoint-2010-public-beta.aspx

Also note that there *ISN’T* a publically available WCF hotfix for those wanting to use Windows Server 2008 R2, so for now you can only use Windows Server 2008.

Cheers to Kirk Barrett for the heads up!

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • Technorati
  • Twitter
  • MySpace
  • RSS
  • Twitthis

Tags: , ,

Scott Samuels on November 1st, 2009

Recently I have been working creating a series of Site Definitions for one of my employer’s client’s. The tool of choice (the best of a bad bunch?) for this is the SharePoint Solution Generator 2008, bundled with the Visual Studio 2008 Extensions for Windows SharePoint Services 3.0. The tool comes fitted with a few ‘gotchas’ – subtle annoyances that really make no sense and therefore are a tad tricky to find resolutions to. In the interests of saving other developers from pulling their hair out, here a couple that I have found:

Issue 1: You get an ‘Object reference not set to an instance of an object’ error when you deploy a Site Definition.

Resolution: Remove any comment tags <!– –>in your onet.xml document. I tried commenting out List elements in the Configuration –> Lists element of the onet.xml file and it threw the error. Deleting the line instead of commenting it out worked fine. Comment tags do not throw an error until you go to deploy the solution (no error when you are editing the XML in Visual Studio).

Issue 2: Can’t deploy a second site definition in the same site collection if it was also created by the Solution Generator

Resolution: Rename the SiteProvisioning feature. You will get a feature naming conflict if you deploy a second site definition that has been generated by the Solution Generator. Simply open the WSP view (I assume you are using the VSeWSS), rename the SiteProvisioning feature to something else and click the refresh button up the top of the WSP view to update the reference in the manifest.xml file.

Other:

  1. ALWAYS make sure you are using the latest version of the Solution Generator. You can get the latest version by downloading the latest Visual Studio Extensions for Windows SharePoint Services 3.0. Don’t forget to uninstall your old version before installing the new version as this also creates hassles!
  2. When you are building your site that you are going to run the solution generator over, don’t build it as the root site in a Site Collection. The Solution Generator will pick up all the lists that the Site Collection needs to run, like the User Information List. I’ve had hassles even if I deselect the lists when I go to create the Site definition with the Solution Generator
  3. Don’t select lists that are already a part of the site definition you are deriving from. Your site definition will deploy but you may get list naming conflicts when it goes to create your site. For example, if you create a site using the Team Site site definition, don’t select the document library, task list and announcements list that it creates when you are running your Solution Generator.
  4. Reconsider your need to use the Solution Generator, or to create site definitions! In reality, the Solution Generator creates working site definitions only for really simple sites. If you have done anything fancy to your site, chances are the site definition the Solution Generator generates will not work. The time you spend debugging the code the Solution Generator creates could be better spent doing one of two things:
    1. Creating a solution in Visual Studio utilizing the SharePoint object models to make the modifications to a site post-creation. I certainly would have more confidence in this approach and you can better approximate the time it will take to use this approach.
    2. Doing nothing – just use a Site Templates – if you can! Take the performance hit and the loss in a bit of functionality for a relatively pain free solution. There are a couple of blogs that explain the pros and cons of Site Templates vs. Site Definitions. Jeremy Thake provides a great explanation in his post titled Site Features vs Site Templates vs Site Definitions.

Hope that helps. If I find any more I’ll be sure to post them up. Let me know of your experiences using the Solution Generator by posting a comment below.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • Technorati
  • Twitter
  • MySpace
  • RSS
  • Twitthis

Tags: , , , , , ,

Scott Samuels on October 21st, 2009

As of today, more information about SharePoint 2010 is available at MS Technet. Big thanks goes out to Boris Kepy for the heads-up. Be patient with the SharePoint 2010 site as it is getting a lot of hits and is responding quite slow:

SharePoint 2010 (Beta) Developer Center & Videos
http://msdn.microsoft.com/en-us/sharepoint/ee514561.aspx
http://sharepoint2010.microsoft.com/Pages/videos.aspx

PRE-REGISTER for SharePoint 2010 Beta2 Trial
http://sharepoint2010.microsoft.com/try-it/Pages/Trial.aspx

SharePoint 2010 SDK Overview
http://msdn.microsoft.com/library/ee557253(office.14).aspx

I will endeavor to plow through the plethora of information to give you all a few deeper insights and what it all means for the SharePoint future.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • Technorati
  • Twitter
  • MySpace
  • RSS
  • Twitthis
Scott Samuels on September 16th, 2009

Services Applications are a new model in Microsoft SharePoint Server 2010. Known as a Shared Service Provider (SSP) in MOSS 2007, a Service Application exposes functionality that has been configured for providing extended capabilities across site collections and Web applications or potentially across multiple SharePoint farms.

Key points on Service Applications

  • A service application can be implemented as a Web service. Service applications that are implemented as Web services are configured and hosted under the service application Web application (See Figure 1)
  • SSP’s and Service Applications, although can be mentioned in the same breath, use different protocols.
  • Settings and data used by Service Applications are stored in the Service Application database
  • Every SharePoint farm will have zero or more service applications
  • The Service Platform Topology Web Service Protocol Specification specifies the communication between the protocol client and the protocol server used to obtain a list of service applications and their properties
Configuration of Web Applications inside of IIS

Figure 1 - Configuration of Web Applications inside of IIS

SharePoint 2010 Service Applications

  • Excel Services
  • Access Services
  • User Profiles
    • User Profile Property
  • Search
  • Indexing
  • Business Connectivity Service
  • Usage Analytics
  • PeformancePoint Services

Potential uses…

  • Master Data Management
  • LOB Application Integration
  • Greater ability to centrally manage customizations e.g. centralized management of “My Site” customizations
  • Replacement of Out-of-the-box Service Applications e.g. a new Search Service Application that overloads the current Search Service Application whilst conforming to its protocols

Can you suggest any other uses? Leave a comment!

_____________________________________________________________

Information has been obtained from the publicly available Microsoft SharePoint Products and Technologies Protocols Overview documents

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • Technorati
  • Twitter
  • MySpace
  • RSS
  • Twitthis

Tags: , ,