Welcome to my blog on all things SharePoint. I have a range of articles that will interest you if you've made it as far as visiting my blog. I was awarded as an SharePoint MVP by Microsoft in July 2010. I currently live in New York and am an Enterprise Architect at AvePoint Inc.. I co founded www.NothingButSharePoint.com with Mark Miller in 2010.

MVP AwardJeremy Thake Profile Photo

Whitepapers

NBSP

Check out my articles on NothingButSharePoint.com

Solution Development in SharePoint 2007

This series was inspired by the chatter amongst SharePoint blogs on the best ways to approach customisations in SharePoint using Solutions.

Part 1 - Part 2 - Part 3 - Part 4 - Part 5 - Part 6 - Part 7 - Part 8

Leveraging the SharePoint Platform

This series was inspired by a discussion had with Andrew Coates at a Perth SharePoint User Group meeting. This then turned into a 6 part series on Arno Nell's SharePointMagazine.net web site.

Initial post - Part 1 - Part 2 - Part 3 - Part 4 - Part 5 - Part 6

Webcasts

I have recorded various web casts that I present at User Groups or just on a specific topic by request:
How ASP.NET Developers can leverage SharePoint webcast
SPSource Webcast: Reverse engineer Lists to ListTemplates and much more
SharePoint Development with Unit Testing webcast
Perth SharePoint UG Web Cast on approaches to deploying artefacts (SPSource)
More...


Podcasts

I have been interviewed about Leveraging the SharePoint Platform by the SharePoint Pod Show: listen here .

RSS Feed Feed your read!

Archives

November 2012 (6)
October 2012 (8)
September 2012 (4)
August 2012 (7)
July 2012 (13)
June 2012 (4)
March 2012 (1)
February 2012 (1)
January 2012 (5)
September 2011 (2)
August 2011 (1)
July 2011 (3)
June 2011 (7)
May 2011 (3)
April 2011 (3)
March 2011 (3)
February 2011 (2)
January 2011 (1)
December 2010 (4)
September 2010 (4)
July 2010 (5)
June 2010 (4)
May 2010 (6)
April 2010 (7)
March 2010 (5)
February 2010 (7)
January 2010 (3)
December 2009 (1)
November 2009 (6)
October 2009 (9)
September 2009 (7)
August 2009 (6)
July 2009 (13)
June 2009 (4)
May 2009 (12)
April 2009 (4)
March 2009 (4)
February 2009 (13)
January 2009 (4)
December 2008 (4)
November 2008 (11)
October 2008 (16)
September 2008 (4)
August 2008 (5)
July 2008 (4)
June 2008 (8)
May 2008 (5)
April 2008 (9)
March 2008 (5)
February 2008 (6)
January 2008 (1)
November 2007 (11)
October 2007 (8)
September 2007 (24)
August 2007 (5)
July 2007 (2)
May 2007 (1)
April 2007 (1)
March 2007 (1)
February 2007 (3)
January 2007 (4)
November 2006 (7)
October 2006 (7)
September 2006 (18)
August 2006 (14)
June 2006 (3)
May 2006 (8)
April 2006 (4)
March 2006 (38)
February 2006 (30)
January 2006 (2)
December 2005 (3)
November 2005 (28)
May 2005 (1)
April 2005 (5)
March 2005 (1)
November 2004 (1)
August 2004 (11)
July 2004 (1)
Failed to render control: An error occurred during a call to extension function 'createMonthUrl'. See InnerException for a complete description of the error.

Links

Tag Cloud

Ajax, Apple, DotNetNuke, Enterprise Content Management, Error Resolution, Gadgets, General, Governance, Microsoft .Net Development, Mobile, SharePoint, Sharepoint Business Forms, Sharepoint Business Intelligence, Sharepoint Collaboration, SharePoint Development, Sharepoint Enterprise Content Management, Sharepoint Enterprise Search, Sharepoint Portal, US Migration, Web 2.0, Workflow
Mar 242008

SharePoint Australian Records Management

I was doing some research into InfoPath Forms Server and came across references to UniqueWorld's InfoView and SharePoint Forms product. Following the link took me to a message stating:

Unique World Software (UWS) is changing our focus and will shortly be release exciting news about the work we’ve been doing bringing a VERS compliant ‘add-on’ to the Records Management capabilities of Microsoft Office SharePoint Server 2007. In order for this to occur we have decided to no longer provide InfoView and SharePoint Forms, please read on for more details.

I had been told this a few months ago by a colleague in Sydney, but this now confirms their new direction. This is as far as the web site goes to confirm this and the Latest News is from 2006 so not too much PR going on here!

Published: 3/24/2008  6:49 PM | 0  Comments | 0  Links to this post

Mar 242008

Programmatically deploying an InfoPath Form Library

I was finding it hard to find a specific answer on how to write a Solution Package with a Feature that would create a InfoPath Form Library with the associated template working when you click the New button.

This approach allows for the most "hands-off" governed approach. Having to publish the form manually from the InfoPath client seemed overkill and error prone. In taking this approach I also used .udcx files to manage my Data Connections on my form. This allowed me to have different Data Connection configurations in each environment I deployed this solution too.

This is how I went about this:

Deploy to InfoPath Forms Server

I created my InfoPath form and published it to the InfoPath Forms Server by going to Central Administration | Application Management | Manage Form Templates | Upload Form Template. Once it was created here, I then activated this form on the desired Site Collection. This can be done programmatically by using stsadm commands uploadformtemplate and activateformtemplate.

Create an Forms Library

I then created a Forms Library in a blank Site and turned on Content Types from the Advanced Settings. I selected 'Add from existing site content types' option in Library Settings and selected the InfoPath Form Content Type that had been activated in the previous step.
I then changed the default content type by modifying the order in 'Change new button order and default content type' option in Library Settings.
From the Library Settings page I then clicked on the default content type that was created and selected 'Delete this content type' from the List Content Type page.
To test this I went to the List AllItems.aspx page and clicked New and it opened up my InfoPath form.

Scripting this list

Now reading around, there are two main ways of doing this sensibly, one is using the Solution Generator Tool provided with vsewss extensions or using the wspbuilder. Both will provide a way of creating a schema.xml file with the relevant files (e.g. AllItems.aspx, Combine.aspx, DispForm.aspx, EditForm.aspx, MyItems.aspx, repair.aspx, template.xml, upload.aspx and webfldr.aspx).

STSDEV

I actually used the Solutoin Generator tool and then moved the created List and files into a new STSDEV project that I created. This gave me flexibility when developing on Redeploying the Solution Package etc. from directly within the Visual Studio IDE.

Solution Installer

I then added some extra bits to the DeploymentFiles folder created by stsdev with awesome new SharePoint Solution Installer tool.

<RANT>

Building SharePoint Lists manually

The CAML code to create lists in feature files is tough! There was a helpful MSDN article on creating Fields, Content Types and deploying them. I also found this MSDN reference handy which documented the <ListTemplate> element of the elements.xml file.

Scope of Feature deployments article by Serge van den Oever is extremely useful with lots of hyperlinks off to the various areas of the MSDN reference guides.

Binding to SharePoint Lists

One downfall of the .udcx files is that if you point to SharePoint lists, it actually uses the ListId GUIDs so in each environment this is going to be different along with the Site url used. This does mean some serious modifications when deploying to a new environment. I'm sure someone will come up with a cute tool for creating these on the fly...

Feature Activating

There doesn't appear to be much out there on creating SharePoint Lists on the FeatureActivated method. There is one article on the MSDN blogs from March last year which goes into creating new columns on a List which is close enough to get my head around.

stsdev

Be careful not to change the SolutionConfig.xml file SolutionName once stsdev has created it as this will actually cause the Build process to break as this ties into where it should find particular files. The error I was getting was this: 'The system cannot find the file specified'. Fortunately I was changing these things incrementally and caught that this had broken the build ;-)

Some home truths about the SharePoint Solution Generator

Sezai pointed me in the general direction of this article on the drawbacks of using this tool. Sezai also pointed me to this stsadm extension from Waldek Mastykarz that has the same functionality at the command line. This was basically written because the SharePoint Solution Generator (SSG) doesn't work in Visual Studio 2008. I must admit this seemed to create the same Schema.xml as the SSG did.

</RANT>

<ERRORS>

Teething problems with Feature Deployment

As a side note I did have some issues and the logs were awesome at debugging this ...was quietly surprised!

#20001: Cannot open file "schema.xml" for reading.    
(#3: Cannot open file "schema.xml" for reading.)    
Failed to retrieve the list schema for feature a26fdbe7-7835-4d8f-b3cb-761cbc830ccd, list template 10001; expected to find it at: "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\Template\Features\InvoiceTracking\InvoiceList".    
Failed to find the list schema for FeatureId 'a26fdbe7-7835-4d8f-b3cb-761cbc830ccd', list template ID 10001.  Cannot create list in web "
http://scoltsp/jeremy"
at URL "(null)".    
Unknown SPRequest error occurred. More information: 0x81070201
 

So basically my hunch about it assuming where the schema.xml file was correct, and the project has placed the Schema.xml file in my .wsp file, but when the feature deploys it doesn't copy the schema.xml file into the feature folder! Turns out the <ElementFile> element is required here under the <ElementManifests> element in the feature.xml file (ref: MSDN Feature.xml Files).

Teething problems with creating the SharePoint List from ListInstance

I had some issues with declaring a ListInstance object, this useful article gives a list of TemplateIds to use and notes that you need to define the FeatureId also for it to work.

    <ListInstance
        FeatureId="00BFEA71-1E1D-4562-B56A-F05371BB0115"
        TemplateType="115"
        Title="InvoicesLibrary"
        Url="InvoicesLibrary"
        Description ="This library will store the Invoices for tracking purposes."
    />

</ERRORS>

Published: 3/24/2008  5:50 PM | 1  Comment | 0  Links to this post

Mar 242008

STSADM Import: FatalError: Could not find WebTemplate

Being new to the environment I'm currently in, I wanted to move some of the Sites into a development VM. I used stsadm -o export to backup the files and then wanted to run stsadm -o import to restore them into my VM environment. I came across this error:

[3/12/2008 7:25:11 AM]: Start Time: 3/12/2008 7:25:11 AM.
[3/12/2008 7:25:11 AM]: Progress: Initializing Import.
[3/12/2008 7:25:12 AM]: FatalError: Could not find WebTemplate CPMININGCOMMUNITY#10006 with LCID 1033.
   at Microsoft.SharePoint.Deployment.ImportRequirementsManager.VerifyWebTemplate(SPRequirementObject reqObj)
   at Microsoft.SharePoint.Deployment.ImportRequirementsManager.Validate(SPRequirementObject reqObj)
   at Microsoft.SharePoint.Deployment.ImportRequirementsManager.DeserializeAndValidate()
   at Microsoft.SharePoint.Deployment.SPImport.VerifyRequirements()
   at Microsoft.SharePoint.Deployment.SPImport.Run()
[3/12/2008 7:25:13 AM]: Progress: Import Completed.
[3/12/2008 7:25:13 AM]: Finish Time: 3/12/2008 7:25:13 AM.
[3/12/2008 7:25:13 AM]: Completed with 0 warnings.
[3/12/2008 7:25:13 AM]: Completed with 1 errors.

The reason I wrote this post was to document the approach I took to resolving this issue because it may help others. The use of the word WebTemplate is confusing as basically this means that the Site Template is not available. I believe this is because in the API they use the word Web for Site...just to keep us all on our toes! Anyway, I found the Site Template.

Second Warning

Warning: The Office SharePoint Server Publishing Infrastructure feature must be activated at the site collection level before the Publishing feature can be activated.

In MOSS, there are two features that must be activated to support publishing. One is at the site collection level, the other is at the site level. The site collection feature must be activated before you activate the site feature.

Debugging in SharePoint logs

clip_image001[6]

clip_image001[8]

On finding a bunch of Solutions with Features to deploy I found that when I hit Site Actions | Settings from the root I got a "File not found." Error. I have my logs set up really high and could not find any line entries relating to this! There must be some guidelines on what to filter the logs by depending on what you are debugging somewhere! SharePoint Logging Spy helped out when I found:

Exception Type: System.Web.HttpException  Exception Message: The file '/_layouts/application.master' does not exist.

One tip is if you see the word "Error" in the header of the SharePoint branded error page...search your logs for 'Exception Type' within the message column.

So I copied the application.master from a base SharePoint install and it fixed the error.

Published: 3/24/2008  4:56 PM | 2  Comments | 1  Links to this post

Mar 102008

SharePoint stsadm -o import FatalError resolution

I was trying to import a Site Collection from one environment to another. I fired of the import command from a backup file created from stsadm -o export command. Then I created a new web application and a new  Blank Site Collection. I then ran the stsadm -o import command but received this error:

"FatalError: The specified user [username] could not be found"

There wasn't much on this, reading around I found that the person you are running the command line as must be the Site Collection administrator. I guess this makes sense, but would have been nice for the error just to say so!

Once I overcame this error I got a subsequent error:

"Error: Unable to read cabinet info from [filelocation]
FatalError: Failed to read package file."

SharePoint land didn't have any answers for this one either...but I did notice that some posts exported to a .bak file extension and others used .cmp. Using .cmp created multiple files and this worked fine.

Published: 3/10/2008  11:09 PM | 0  Comments | 0  Links to this post

Mar 102008

SharePoint Debugging: No symbols loaded

I've been reading a lot of posts on how to get debugging going when attaching to the w3wp.exe process.
Disable 'Enable Just My Code' in Visual Studio
This blog post started me off in the correct direction by setting the Tools | Options | Debugging setting correctly.

Modify the web.config

Furthermore, it prompted me to change the web.config value from debug="false" to debug="true". The web.config file can be found in the Inetpub\wwwroot\wss\VirtualDirectories\ folder, each folder in there maps to an IIS Web Application which you can find by going to IIS Manager and looking at the Home Directory.

To get full blown ASP.NET errors rather than SharePoint branded "useless" ones follow these steps:

Setting CallStack=true
By default, WSS will redirect a user to the error page whenever an unhandled exception is encountered during the render cycle.  To disable this behavior, open your web.config and set CallStack="true" in the <SafeMode> node.  This allows you to see a typical Asp.net error page.


Setting customErrors mode…
The next step would be set mode=”Off” in the <customErrors> node.  This instructs Asp.net to show you a complete error report rather than a generic “Server Error” page.

Creating pdbs

For each project you wish to debug, you need to ensure that you are creating pdbs. I am using the really cool stsdev app to create my projects and had to modify it to create pdbs by going to Project Properties and on the Build tab in the Output Section click the Advanced button.

clip_image001

Then ensure that Debug Info is set to pdb-only.

clip_image001[4]

Attach to Process

The author of the previous referenced post also pointed me to running iisapp on the command line to output a list of all the running instance to know which process to attach to:

clip_image001[6]

Then when you select Debug | Attach to Process the ID matches to the PID in the output of iisapp. Note you need to check 'Show processes from all users' as w3wp.exe will be typically running as another account.

clip_image001[8]

You can check that you have the correct id by pressing CTRL-ALT-U and this will list all the Modules that are loaded with statuses on the symbols that are available (e.g. that when you create a breakpoint it'll work rather than giving you a 'No symbols loaded' errror).

clip_image001[10]

Notes for Visual Studio Debugging Newbies

Once you are actually debugging and can step through code after it breaks on a breakpoint...you can also use the Immediate window to inspect objects by pressing CTRL-ALT-I. From here you can get up intellisense on any object in context which is a great way to inspect things like whether a SharePoint list has an Event Receiver on it or not.

Published: 3/10/2008  10:49 PM | 3  Comments | 0  Links to this post