SharePoint
SharePoint related, WSS v2, WSS v3, SPS 2003, MOSS 2007...
When you’re accessing built in SharePoint fields (such as Title) from code, do you go: listItem["Title"] = xVar;
listItem[0] = xVar;
Don’t! Have a look at SPBuiltInFieldId that keeps tracks of the Id’s for the built in fields for you:
string title = myListItem[SPBuiltInFieldIds.Title];
I’ve been working for a while on a project and filled up the Site Collection Images list with a lot of images get the user experience going in my virtual dev environment. When we got access to the customer environment I wasn't in the mode to manually upload all the images again. So I wrote the following little console application that dumps out the content from the Site Collections Images list. The output from the app is:
Feature.xml - file containing the feature def and all elements
images.xml – file containing the Module...
Every now and then I get a gig where I go in to a customer to help sort out an exiting problem with their SharePoint environment (get us engaged early in the projects folks, that eliminates quite a bunch of these panic engagements). When trying to get a grip on a existing environment I use a couple of tools, one of which is ULS Viewer. (Then name says it all :)). Jie Li has a good write-up on using ULS Viewer for trouble shooting over on his blog, check it out. (And of course it’s the...
This is one that my colleague Mattias showed me. When I code SharePoint solutions I’m always to put in some diagnostics logging just so that I can turn it on and se what happens. There is (as always) a couple of options here. Write to the ULS logs, which I guess is the preferred way to do it and then use event throttling to turn it on and off. However sometimes its just a bit to much work. So, here’s the trick.
Sprinkle Trace.Writer's in your code where it makes sense. So for example i might want do put the following...
A while back Service Pack 2 for SharePoint was released. That’s all good. But unfortunately you might run into some snags installing it. This post is an attempt at doing a write-up of the issues I've seen on blogs, in support kb’s and that myself and my colleagues at Microsoft Services Sweden have encountered, being out there in the field close to the metal. I’ll come back and update the list if necessary. Before we get to the lists, be sure to do your homework. Read: Deploy upgrade instructions for MOSS 2007 and WSS 3.0...
Finally! Adobe released a 64 bit version of the PDF iFilter. You can get it here: http://www.adobe.com/support/downloads/detail.jsp?ftpID=4025. But before you decide if this is the iFilter you wanna go with. Check out Je Li’s performance measurements comparing Adobes and Foxit’s iFilter: http://blogs.msdn.com/opal/archive/2008/12/10/pdf-ifilter-battle-foxit-vs-adobe-64bit-version.aspx
A while ago I stumbled upon this issue. Doing my usual day-to-day stuff on the SharePoint farm, I entered the the Search Settings page under the SSP and instantly got a 403 Forbidden in my face. We had not experienced any problems with this earlier. So I looked around a little and the Profile Import page also showed immense weirdness: I found some articles on similar problems but that did not help. After trying a bunch of things I gave in and thought to my self: f**k it, I'll just create a new SSP and configure...
In my current project I last Monday ran in to some DST issues on our MOSS farm. As you can guess we had a DST (daylight saving time) here in Sweden during the weekend just before this very frustrating Monday. I experienced it by getting huge problems while trying to deploy my wsp solution packages. The thing that tipped me of was that went to lunch with a deployment in "Deploying..." and when I got back it succeeded. As you probably figured by now we did not have Service Pack 1 installed.
So I read trough the Planning and Deploying...
This post is mostly a note to self, but hopefully it can save a little time for someone. I was just cranking up a new VPC to demo some document management features for a customer. Browsing the SharePoint webs worked like a charm, creating document libraries was no problem. But when I tried to save a document from word 2007 to a document library I got an annoying: "This file cannot be saved to this location because there is no connection to the server. Check your network connection and try again." Also, the document panel failed to...
Ever wanted to do something with the groups within SharePoint 2007 programmatically? Here is some sample code you might find useful. Iterating:public IList<string> GetAllUserGroups(string url)
{
IList<string> groupList = new List<string>();
using (SPSite site = new SPSite(url))
{
SPGroupCollection groups = site.RootWeb.SiteGroups;
foreach (SPGroup g in groups)
{
groupList.Add(g.Name);
...
I'm a little late out of the start blocks here. The 6th of november the public announcements came from Microsoft for a couple of new products, namely the Serach Server 2008 family.
Product page
Press release
The big news her imho is the Express version wich (as the rest of the Express products) is free. This will get a lot of people to try out search without making a very big investment. Meaning you still have to have a server to run it on an the time to set it up.
First off we released a new whitepaper on the subject:
Data protection and recovery for Microsoft Office Server 2007 in small to medium sized deployments
Short, neat title ah... Anyways a really good read where guidance have been somewhat mediocre.
Second, Data Protection Manager (DPM) 2007 is RTM:ed and it has the ability to help protect data on your SharePoint farms.
Nice writeup of Bob Fox on how to use SharePoint’s built in backup tools (stsadm -o backup). He also talks about scheduling your backup jobs and verirying them. MOSS 2007 Backup and Restore Operations
Are you one of those people saying that you can’t have code behind pages in SharePoint v3? Heck, I used to think that it was the case. I had this epiphany a while back. But never put it into writing, good thing some people are better at this. Check out Andrew Connell’s article on the subject, he always does a good write up. Using ASP.NET 2.0 Code Behind Files in SharePoint v3 Sites
Yep that’s the way it is today. Speaking with my customers the Content Deployment feature in MOSS 2007 gets a lot of negative critique. Some of it is justified but some of it is... well, pure BS. I recently had a customer that complained that Content Deployment doesn’t work between their test servers. I took a look at it and found out that the servers had no way of finding each other, no DNS, no host file, no nothing. Well, then it’s not very strange that you can’t deploy content between them. I don’t have a clue how they...
I've been trying to find out what User Agent string the MOSS Crawler uses when crawling http-sites. After writing a web app that logs HTTP_USER_AGENT and then crawling it to get ahold of the string. I figured there had to be a easier way. And there is. Check the registry on the index box and navigatie to:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office Server\12.0\Search\Global\Gathering Manager
Check the string value for UserAgent: Mozilla/4.0 (compatible; MSIE 4.01; Windows NT; MS Search 5.0 Robot)
A client of mine wanted to use the MOSS search only to return hits from document and images libraries. My first idea was to use Crawl Rules for this. Worked pretty good but every time I tried to put an exlude rule for everything else at the bottom, that emptied my index. Besides, if we at a later date want to use the search from something else to, we wouldn't get a lot of hits. Change of strategy. I started looking at scopes and how the out-of-the-box scopes look. They use the contentclass property to match against users for example:...
The information on msdn how to do this has so far been pretty thin. Now it just got a little better, a two part step-by-step guide on how to migrate our favorite MCMS 2002 site. Yep, you guessed it - WoodGrove Bank (why oh why...): Part 1 of 2 - Upgrading an MCMS 2002 Application to SharePoint Server 2007 Planning Your Migration Understanding the WoodGroveNet Sample Application Migrating the Application Content Migrating the Application Code Part 2 of 2 - Upgrading an MCMS 2002 Application to SharePoint Server 2007 Migrating the Application Code (cont'd) Other Controls...
Finally we released some guidelines on how to do moss development in teams! Haven't had a chance to read it yet but just the fact that it's out there is a huge step in the right direction. Check it out: http://msdn2.microsoft.com/en-us/library/bb428899....
Is really simple! Here is a small sample where I extend the content type "Document" by adding the field "Office". Not really useful but shows how it's done. SPSite site = new SPSite("http://moss.litwareinc.com");
SPWeb web = site.OpenWeb("/SiteDirectory/t2");
//Create Content Type (extending Document content type)
SPContentType documentContentType = web.AvailableContentTypes["Document"];
SPContentType newContentType = new SPContentType(documentContentType, web.ContentTypes, "Niklas Document");
web.ContentTypes.Add(newContentType);
Console.WriteLine(newContentType.Id.ToString());
//Add FieldLink
SPField fieldOffice = web.AvailableFields["Office"];
SPFieldLink fieldLink = new SPFieldLink(fieldOffice);
newContentType.FieldLinks.Add(fieldLink);
newContentType.Update(false);
This is a really good post on how to leverage the solution and feature framework in SharePoint 2007.
The MOSS team realized a little too late that they sealed the AspMenu-class for extension in WSS v3 / MOSS 2007. So doing the next best thing and released the source code for it. Read this post and download the source.
I've started thinking about accessibility in MOSS 2007 (especially WCM scenarios) and this could be a way to get the menu-control to emit a little less html-tables. Tough what I really would like to do is to get CssAdapters to work with AspMenu, but that is still at the idea-stage in my mind...
In this post I'm going to try to explain what a Feature Receiver is in SharePoint 2007 and show you an example of how to use it. First things first. What is a SharePoint Feature A feature is kinda tricky to explain. It's a functional unit that can be activated and deactivated in different scopes (site collection, web etc). There is a bunch of features out of the box as seen below. Problem definition In a recent project we decided to deploy a big chunk of meta data columns (site columns) as a feature. A couple of these columns...
This is a great little time saving tip form Heather Solomon. When working with files in the style library for example, it's a tidious process of publishing them. You got to check in, approve and publish. Well the way to circumvent that proces is to navigate to Site Settings -> Manage Content and Structure. Navigate to the file(s) in question and chose Publish from the Actions meny.
It's actually a great timesaver. Read the original tip here.
Remember all those application templates you could download for WSS v2? Well, soon there will be a bunch of them for v3 as well. To be exact 40 of them.
"Microsoft will release a new set of 40 application templates for Windows SharePoint Services 3.0. Some of the previous scenarios, such as Help Desk, Project Site, Knowledge Base and the Employee/HR templates will be improved to incorporate and highlight new capabilities in Windows SharePoint Services 3.0. New scenarios will also be added to address specific customer needs and business requirements."
So, keep your eys pealed at this site in the beginning of next...
I've used Telerik's r.a.d Editor Lite for Microsoft Content Management Server 2002 before and I can say that it was not a dissapointment! I had to tweak it a little to get fully compliant xhtml, but that was due to a by design issue in MCMS 2002.
Now Telerik delivered thier r.a.d editor for SharePoint 2007. Which has a lot of nice features, such as:
Cross browser support
Accessibility - Section 508 compliant
Support for listings, list items and more
And what's more, it's free for all Microsoft Office SharePoint...
Lawrence Lui have set up a nice SharePoint Community Serach at Live.com. Nice going!
You can easely set up you own search engine at live.com if you like.
Finally we released Windows SharePoint Services extension for Visual Studio 2006. Templates available in this release is:
Team Site Definition
Blank Site Definition
ListDefinition
Web Part
Grab the bits here.
Ever felt like you wanted to extend SharePoint's administration utility stsadm.exe with some of your own commands? Well now in MOSS 2007 it's possible. Some xml configuration and implementation of the ISPStsadmCommand interface. Tony Bierman has an excellent post here on how to do this and Andrew Connell has written a few custom extensions.
I've been messing around a lot with the feature called feature in Microsoft Office SharePoint Server 2007 (MOSS 2007). When encountering problems and not finding my answer in the SDK I've been hitting www.live.com to search for solutions (yeah, ok. sometimes I google to, but live is getting quite good in my opinion).
Anyway, when ever I search I seem to hit Ton Stegman's blog. Which I found to be really good when it comes to working with moss.