Dodgy header information in MOSS SP1?

Came across this today when inspecting the HTTP headers for a site.

MOSS SP1 HTTP Headers

 Very odd because…

Sharepoint Versions

I'm guessing the headers have not been updated, and its just a typo in the expires statement for the caching.

I'll go more into the caching at a later point, still compiling research.

Renaming a site collection made easy

If you've ever tried to rename a site collection without SP1 for wss installed you know the headache it can be.  A high level overview of this is :

1. Backup Site Collection to file.
2. Delete Site Collection.
3. Create Site Collection with the new name.
4. Restore Site collection from backup taken in step 1.

Its a fairly clunky way to do it, fortunately since SP1 has been released its become really simple :

stsadm -o renamesite -oldurl http://OLDURL -newurl http://NEWURL

Its really made my life easier 🙂

Audit Log Reports

I had a forced introduction to Auditing Reports, a subject which isn't very well convered pretty much anywhere.

What is it?  A history of all actions taken on a site collection since the creation of the site collection. 
Where is it stored?  Dbo.auditData
What does it look like?  Heres a row from the table

Site Id Item Id Item Type User Id Machine Name Machine IP Document Location Location Type Occurred (GMT) Event Custom Event Name Event Source Source Name Event Data
ed91340f-e335-45d2-82f3-c6521eb23fc0 59af845e-b604-436e-9c08-0a948a27d996 Document NT AUTHORITYlocal service _catalogs/masterpage/Editing Menu/CustomSiteAction.xml URL 2008-01-02T00:44:43 View SharePoint

<Version>
<Major>0</Major>
<Minor>1</Minor>
</Version>

How do you get to it?  http://server/sitecollection/_layouts/Reporting.aspx?Category=Auditing or alternatively Site Settings > Site Collection Administratoin > Audit Log Reports

First issue you might come across starts here.  The feature has to be enabled on your site, fairly easy to do :

stsadm -o activatefeature -name Reporting -url http://server/sitecollection/ -force

That will enable the feature on your site collection, allowing you to view the URL listed above.

The usage of this page is pretty straight forward, you can view all of the audit data for your site, or if need be create a custom report.  If you do create a custom report, make sure you do not click "OK" to return to home, you'll miss your report and some of them can take a little while (minutes) to generate, especially if your site has 6 months or more of auditing data.  Even on a site with light usage your auditData table can get big very quickly, for instance one of ours hit 47,000 rows and a content viewing report was over 50 meg being generated.  This was causing timeouts from the site.

The reports will look like XML unless you have Excel installed in which case you will get a look like this :

Site Id (All)
Count of Occurred Event  
Document Location View Grand Total
_catalogs/masterpage/Editing Menu/CustomSiteAction.xml 1 1
Site Images 16 16
Style Library/Custom.css 45 45
Style Library/XSL Style Sheets/Header.xsl 3 3
Reporting Templates/audit1.xml 7 7
Site Images/kc.png 4 4
Style Library/FinalHeader.jpg 33 33
Site Images/initiatives.png 4 4
Style Library/FinalHeader.png 33 33
_catalogs/masterpage/default.master 6 6
Pages/Default.aspx 9 9
Style Library 112 112
Style Library/XSL Style Sheets 9 9
_catalogs/masterpage/Editing Menu 1 1
_catalogs/masterpage 6 6
Style Library/XSL Style Sheets/ContentQueryMain.xsl 3 3
Pages 9 9
Style Library/XSL Style Sheets/ItemStyle.xsl 3 3
administration/default.aspx 6 6
Site Images/contact_list.png 4 4
Site Images/newsletter.png 4 4
Reporting Templates 7 7
Grand Total 325 325

I should also add that if you wish to configure the audit logging you can cut it down a bit.  The "Configure Audit Settings" option under "Site Settings" will allow you to determine which events are audited, its high level but enough to significantly reduce the size of the table if needed.

Forms Based Authentication in MOSS and WSS v3

I've been looking for good documentation on FBA, and short of writing it myself, I came across these on the MS Sharepoint Team's blog.

  • Forms Authentication in MOSS 2007 and WSS 3.0 (Part 1 of 3): Introduction
  • Forms Authentication in MOSS 2007 and WSS 3.0 (Part 2 of 3): Forms Authentication Samples
  • Forms Authentication in MOSS 2007 and WSS 3.0 (Part 3 of 3): Differences Between Forms Authentication and Windows Authentication-in-office-sharepoint-server-2007-and-windows-sharepoint-services-3-0-authoritative-technical-articles-published.aspx
  • Forms based auth has been one of those features I've had difficulty getting to work smoothly, especially in a hosted environment.  Harder still is making it work with an Active Directory membership provider instead of a database.  Why would you want to do this anyway?  It looks prettier.

    A side note also, one of the things I noticed about the above documentation : While very thorough it tells you how rather than why to take certain paths.  For instance a web application is extended rather than using the default zone – why?  Setting the default zone to FBA would mean search would be unable to connect and through a plethora of fairly vague messages in the event logs.  Etc.

    Enabling Live or OCS presence information within Sharepoint

    A couple of times I've found clients asking for information on how to enable presence information for OCS or Live Messenger within sharepoint, and its actually really easy to setup – but appears to be fairly obscure information.

    The following steps are all that need to be done.

    If you are using Live do this step, it is not necessary for OCS.

    Go to http://settings.messenger.live.com/applications/websettings.aspx. Sign in with your Windows Live ID as needed.

    Turn on your Web settings to show your presence and receive IM from the Web.

     

    Now login to your sharepoint site.   Go to "Tools" > "Internet Options" in your browser.

    Click on the Security Tab, click on 'Trusted Sites', then 'Sites.

    Add your site to the list, if need be untick the 'Require Server Verification' box at the bottom if your site is not a secure site.

    Close all windows and relogin to your site.

     

    Log on to your sharepoint site.  Click on the "Welcome User" dropbox on the top right and select "My Settings"

    Click "Edit Item".  Add your Windows Live address or OCS address to the SIP address field.  Click "OK"

     

    Messenger Presence should now be displayed!