Archive

You are currently browsing the archives for the Windows SharePoint Services 3.0 category.

Feb

27

SharePoint’s Memory Leak

By Cory

Todd Carter over at todd-carter.com has posted his very in-depth findings regarding a pretty significant memory leak in SharePoint 2007. The problem lies around the HttpApplication object and ultimately around the SPHttpApplication object.

For each HttpApplication which is leaked a potential huge number of child references are too rooted and therefore leaked.

The memory leak has proven to be pretty significant for certain clients as you can see below…

After having the customer install the fix I have described here the process which would normally grow to 10 GB an hour and recycle never went above 2.5 GB! And even after taking all servers out of the load balancer and running the entire farm off one WFE the memory never went above 3.3 GB!!

To learn more read the whole post at Todd’s blog.

Feb

2

Setting up Anonymous Access

By Cory

I always seem to leave out a step when configuring anonymous access for a SharePoint site so I’ve finally put together a full guide so I don’t leave out any steps in the future.

Deactivate Hidden Features

If you are getting “Access Denied” for lists and libraries then you probably for got this step. There is a hidden feature that secures the lists and libraries by default for all sites that have anonymous access enabled. If you have already enabled anonymous access prior to deactivating this feature then you will need to turn all anonymous access off and back on to refresh this functionality.

  1. For each site collection that requires anonymous access execute the following stsadm command.
    stsadm -o deactivatefeature -url http://sitecollection -name ViewFormPagesLockDown

Read more »

Sep

29

Undocumented List Definition Properties

By Cory

While the MSDN article gives most of the properties that you can use when configuring your list definition it does miss a few. I’ve documented the missing properties that I’ve found below:

Attribute

Description

ForceCheckout Optional Boolean. TRUE to require documents to be checked out before they can be edited.
EmailAssignTo Optional Boolean. TRUE to automatically send emails to the user when an item is assigned to them.
MajorVersionLimit Optional Integer. Specifies the number of major versions to retain when versioning is enabled.
MajorWithMinorVersionLimit Optional Integer. Specifies the number of draft versions to retain for each major version when versioning is enabled.

Sep

24

Querying a SharePoint List with LINQ

By Cory

I am continuously seeing the value in LINQ and I think with the upcoming changes in SharePoint 2010 I plan on making LINQ an even bigger part of my normal development practice.

First establish an SPList object of the list you would like to query data from.

SPList list = web.GetList("/Lists/ListUrl");

Next query the list; taking advantage of the filtering and sorting capabilities built into LINQ

var listItems = from SPListItem item in list.Items
                            orderby item.Title
                            ascending
                            select item;

And with a where query utilizing a custom field!

var listItems = from SPListItem item in list.Items
                            orderby item.Title
                            ascending
                            where ((DateTime)item["CustomExpirationField"]).DayOfYear >= DateTime.Now.DayOfYear
                            select item;

Now feel free to loop through your data and take care of business!

foreach (SPListItem item in listItems)
{
     // item.Title
     //etc
}

Sep

13

Five SharePoint Technologies to Invest In

By Cory

With SharePoint 2010 around the corner I bring you five SharePointe technologies to invest in. Not in any particular order…

Silverlight

silverlight

What is Silverlight?

“Silverlight helps you create rich web applications that run on Mac OS, Windows, and Linux. Welcome to a new level of engaging, rich, safe, secure, and scalable cross-platform experience.”

In short Silverlight is the Microsoft competitor to Adobe Flash. Silverlight runs on the client side and is designed to communicate with backend systems via web services. It provides a rich experience with functionality such as playing videos, music, charting and rich web based user interfaces.

Why Should I Invest In It?

SharePoint 2010 is shipping with a new web part out of the box appropriately named the “Silverlight Web Part”. This web part will be a container or shim for any Silverlight applications that you would like to host within SharePoint. SharePoint 2010 also comes with a Client Object Model which will allow you to interface with the SharePoint objects using client side Silverlight code and avoid the need for building or using one of the out-of-the-box web services. This should greatly speed up development and allow developers to write rich interfaces, views and dashboards surfacing SharePoint data using custom Silverlight web parts. Read more »

Jul

29

10 Essential SharePoint Developer Tools

By Cory

#10 XML Notepad 2007


XMLNotepad2007
Download Now

Why You Need It

  • Perfect for editing large XML files such as List Definitions, Site Definitions (onet.xml) and large XML feature filesĀ (Content Types, Site Columns, etc)
  • Great support for expanding / collapsing nodes
  • Good for testing XSL transformations

Read more »