Posts

Showing posts from June, 2008

SharePoint object disposal

Special thanks to Brian, who commented on our Creating a Page Layout posting. I had forgot to create a using statement to automatically dispose of SPWeb in my feature receiver. Brian referred me to another blog post which gives an excellent listing of disposal concerns and best practices for overcoming them in SharePoint. I strongly encourage you all to review these and ensure you are informed on when and why you should dispose of your SharePoint objects.

Visio Stencil for SharePoint Customization

If you're trying to brand/customize SharePoint you might want to check this out . It's a stencil for Visio that lets you do your design without having to work in SharePoint, HTML, or a graphics program.

ERROR: Exception from HRESULT: 0x81070201

When using STSDEV to create a custom list as a feature, I had my solution deploying and my feature activating without a problem, but then when I created the list I got the error: ERROR: Exception from HRESULT: 0x81070201 I looked through the log files and found that the Schema.xml file was not included in my feature manifest as an <ElementFile> element. Once I added this it fixed this error

Understanding Content Type IDs and a Reference

Microsoft provides a very thorough explanation of ContentTypes here but you may be left wondering what content types you can inherit from (or more likely what are their content type IDs) so you can build off of them. Well you can always go look at them in the 'ctypes' feature folder (that's the out-of-box feature that defines the WSS content types). It's available at under your 12\TEMPLATE\Features\ctypes folder in the 'ctypeswss.xml' file. Otherwise you can just refer to this list I pulled together: 0x : System 0x01 : Item 0x0101 : Document 0x010100629D00608F814dd6AC8A86903AEE72AA : ODCDocument 0x010100B4CBD48E029A4ad8B62CB0E41868F2B0 : UDCDocument 0x010101 : XMLDocument 0x010102 : Picture 0x010104 : UntypedDocument 0x010105 : MasterPage 0x010107 : DocumentWorkflowItem 0x010108 : WikiDocument 0x010109 : BasicPage 0x01010901 : WebPartPage 0x01010A : LinkToDocument 0x01010B : DublinCoreName 0x0102 : Event 0x0103 : Issue 0x0104 : Announcement 0x0105 : Link 0

Great SharePoint resource for Developers

Microsoft has a 10 part lab series which introduces several fundamental development tasks using SharePoint 2007. In addition there's a link to a VPC download that you can use to do the work. Check it out here

STSDEV and Visual Studio 2008

So we're upgrading to VS 2008 and, according to the configuration screen in STSDEV you can create STSDEV projects in .NET 3.0 for VS 2008. So we installed VS2008, added STSDEV as an external tool and created a test Workflow Project. The project was created fine but when STSDEV tried to build the project it crashed. We eventually discovered that the error was related to the fact that STSDEV was creating the .csproj file with the following line: <Import Project="$(MSBuildExtensionsPath)\Microsoft\Windows Workflow Foundation\v3.0\Workflow.Targets" /> instead of: <Import Project="$(MSBuildExtensionsPath)\Microsoft\Windows Workflow Foundation\ v3.5 \Workflow.Targets" /> You can manually go into your .csproj file and change this and your solution should build. We're looking into modifying the STSDEV code to rebuild the project so that it will do this automatically, but until we figure that out and get it blogged, here's your quick fix.

Renaming a Sharepoint 2007 / WSS 3.0 Server

I recently needed to rename my Sharepoint development machine so I could move it into a new collaborative development environment (versus standalone in a workgroup). A little searching turned up this tutorial [www.jjfblog.com] from a while back, which worked with a slight modification. I have reposted the contents of the tutorial below, with a slight modification (see original post and comments for details). Note: The new collaborative environment uses Team Foundation Server 2008, so look for a later post on collaborative Sharepoint development using TFS. First: Change each alternate access mapping for your MOSS/WSS deployment in Central Administration Open Central Administration Click on the “Operations” Tab Click on the “Alternate access mappings” link under the “Global Configuration” heading Modify each mapping item to reflect your newly chosen server name, making sure to keep port numbers the same (this also include the mapping for Central Administration, don’t worry it's

Directory of public sharepoint sites

The people over at wssdemo have put together a nice listing of public sites that use WSS or Sharepoint 2007 to some degree or another. So, if you're in the middle of a design-related mental block, these are a great for getting your mojo back.