I haven't posted for a while, during this period I have moved to a new blog. Any new posts will be on www.davehunter.co.uk/blog.
My new blog
Sunday, 18 November 2007
Tuesday, 14 August 2007
Technorati Charts - SharePoint 2007
Technorati has a charting feature that allows you to see the volume of blog posts during a period of time graphically. Here's a few SharePoint 2007 related charts ....
Posts that contain SharePoint 2007 per day for the last 30 days.
Posts that contain SharePoint 2007 ECM per day for the last 30 days.
Posts that contain SharePoint 2007 Search per day for the last 30 days.
Posts that contain SharePoint 2007 Business Intelligence per day for the last 30 days.
Posts that contain SharePoint 2007 Forms Services per day for the last 30 days.
Posts that contain SharePoint 2007 Business Data Catalog per day for the last 30 days.
Posts that contain WSS per day for the last 30 days.
Get your own chart!
Wednesday, 8 August 2007
SharePoint 2007 Hotfix KB 936867
I recently had problems when the security inheritance was broken for a document library on a WSS site for a MOSS 2007 installation. After raising a support request Microsoft issued a hot fix. The hotfix package also addresses KB 934577, 935958, 937038.
- 934577 - Not public
- 936867 - http://support.microsoft.com/kb/936867
- 935958 - http://support.microsoft.com/kb/935958
- 937038 - http://support.microsoft.com/kb/937038
I received an email from "ISA IT Department" on this post http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1881157&SiteID=1. He was receiving forbidden errors from SharePoint, after installing the hot fix 936867 all issues were fixed.
I would recommend anyone experiencing issues with security to request this hotfix. Always backup the SharePoint SQL Server databases and do a complete farm SharePoint backup before installing. The hotfix at the time of downloading it hasn't been fully regression tested yet so backup the SharePoint environment first.
Friday, 3 August 2007
SharePoint 2007 Forms Authentication with Sql Server
Dan Attis has two great articles about configuring forms authentication against SQL Server with MOSS.
Part one - Configuring Forms Authentication with SharePoint
http://devcow.com/blogs/jdattis/archive/2007/02/23/Office_SharePoint_Server_2007_Forms_Based_Authentication_FBA_Walkthrough_Part_1.aspx
Part two - Configuring Forms Authentication with MySites
http://devcow.com/blogs/jdattis/archive/2007/03/01/Office_SharePoint_Server_2007_Forms_Based_Authentication_FBA_w_MySites_Walkthrough_Part_2.aspx
Points to note:
- If you cant resolve your SQL users in the Central Administration you need to grant database access to the identity (user) that runs under the application pool account and make sure you have added Membership provider and Role Manager to the central administration web.config.
- My deployment was configured intially for authentication with Active Directory. My SSP Admin site couldn't resolve the SQL users. I resolved this by creating a web application that extended the SSP Admin site to another port, setting the authentication to forms and specifying the Membership provider and Role Manager.
There's a useful tool on CodePlex for managing the Forms Based Authentication users in SharePoint, please see http://www.codeplex.com/fba
Tuesday, 31 July 2007
SharePoint 2007 Maximum Limitations
If during your course of using the product, you inadvertently cross these limits, then you would end up with errors. These are hard limits.
* This is the maximum number of simultaneous workflows that can be in memory executing code. (NOTE: there is no limit to the number of workflow instances in progress in the database)
Via Harsh
Monday, 30 July 2007
Get a hotfix without calling MS
You can now request hotfixes via the web. This saves time phoning up a MS customer service operator, explaining the problem, hot fix number and product the hot fix relates to.
Hotfixes that haven't been made public are also available.
Screen shot of the MS Hotfix Request Form
https://support.microsoft.com/contactus2/emailcontact.aspx?scid=sw;en;1410&WS=hotfix
Wednesday, 25 July 2007
Tip - Quickly find out an assembly's public key
When working with MOSS / WSS you need to find out the Public Key Token of your assembly for a feature, manifest or the web.config file.
One of the ways to retrieve the Public Key Token is to build the project (making sure the assembly is signed) and drop the assembly in the Global Assembly Cache (GAC).
You can however use the SN.EXE (.NET Strong Name Tool) with the -T parameter (please note the uppercase -T).
For example:
sn.exe -T MyAssembly.dll
Tuesday, 24 July 2007
SharePoint 2007 menu item feature - attach to debugger
The SharePoint team have posted an article about adding a new menu item to the site actions allowing users to easily debug SharePoint 2007. The updated menu looks like:
http://blogs.msdn.com/sharepoint/archive/2007/04/10/debugger-feature-for-sharepoint.aspx
SharePoint 2007 SQL Server Failure Audits in Event Log
Q. Are your event log's getting full of SQL Server Failure Audits for a service account or database access account you have created for MOSS?
Q. Have you also re-installed MOSS?
If you have answered yes to both of the above questions then you will have SQL Server Agent Jobs that are associated with old Shared Services databases running.
To resolve this
- Open SQL Server Management Studio.
- Expand SQL Server Agent.
- Expand Logs.
- Open the current log and look at the messages.
- You should see error messages like: Cannot open database "SharedServices3_DB" requested by the login. (see figure 1).
- Expand Jobs.
- You should see jobs named in the following format "[SSP]_[DB]_DeleteExpiredSessions" for example: SharedServices1_DB_Job_DeleteExpiredSessions" (see figure 2).
- Disable the jobs that don't relate to current Shared Services databases.
- Verify that the failure audits are no longer logged.
- Delete the disabled jobs.
Figure 1:
Figure 2:
Hope you find this helpful, it took ages to track the culprit down.
Friday, 20 July 2007
MOSS Case Study - Endsleigh Insurance
Endsleigh Insurance
Employees Gain Better Access to Corporate, Industry Information with Enterprise Search.
Wednesday, 18 July 2007
SharePoint 2007 Running SPSecurity.RunWithElevatedPrivileges
In SharePoint Portal Server 2003 you may have needed to impersonate a user with higher priveledges than the current user executing the code. You did this using WindowsIdentity.Impersonate() method. In SharePoint 2007 and WSS V3 you have SPSecurity.RunWithElevatedPrivileges call. The code looks like:
SPSecurity.RunWithElevatedPrivileges(delegate() {For more information see SPSecurity.RunWithElevatedPrivileges Method on MSDN.
// put your code here. any code within these curly brackets will run with SharePoint system rights
});
Please note: If you use the SPControl.GetContextSite(this.Context) within the SPSecurity.RunWithElevatedPrivileges call or have an variable defined before the call this will use the current user's rights and not the system's. For example:
SPSecurity.RunWithElevatedPrivileges(delegate() {
using (SPSite site = SPControl.GetContextSite(this.Context))
{
// site will be based on the current user that executes this code
}
});
You should use:
SPSecurity.RunWithElevatedPrivileges(delegate()
{
using (SPSite site = new SPSite(web.Site.ID))
{
// site will be based on the rights for the system account
}
});
MOSS SDK download updated
The MOSS 2007 SDK download has been updated and ready for download http://www.microsoft.com/downloads/details.aspx?familyid=6d94e307-67d9-41ac-b2d6-0074d6286fa9&displaylang=en.
Overview
The Microsoft Office SharePoint Server 2007 SDK is designed for solution providers, independent software vendors, value-added resellers, and other developers to learn about the new Office SharePoint Server 2007 enterprise application and platform. It features conceptual and "How to" articles, sample code, and programming references.
The download file OfficeServerSDK.exe provided for the SharePoint Server 2007 SDK contains the following:
- Compiled HTML Help files (updated with new content since RTM), OSSSDK2007.chm and WSS3sdk.chm, which contain conceptual topics, Class Library and Web Service References for SharePoint Server 2007 and Microsoft Windows SharePoint Services 3.0.
- Code samples that relate to topics in the SDK: Business Data Catalog metadata samples, Custom Single Sign-On Provider, SampleWebService, and Custom Filter Web Parts. The sample projects use Microsoft Visual C# and Microsoft Visual Studio 2005.
- Enterprise Content Management Starter Kit.
Also included in the SharePoint Server 2007 SDK, the Enterprise Content Management (ECM) Starter Kit is designed for solution providers, independent software vendors, value-added resellers, and other developers to learn about how to extend the new ECM features and platform in Office SharePoint Server 2007. It contains the following:
White Papers
- 2007 Office System Digital Signatures Developers Guide
- 2007 Office System Encryption Developers Guide
- Information Rights Management - Pluggable Rights Management, Technical Overview
- Importing Custom Actions into SharePoint Designer
- Workflow Security Topics
Code Samples
- Content Processing
- Term Replacement Document Inspector Module
- Document Converters (server-side custom property remover, docm-to-docx converter)
Records Management and Policy
- De-Duplication Router
- Document Integrity Verifier
- Records Repository Web Service Console Application
- Search, Collect, and Hold Tool
- Default Site Policy
Workflow
Note: The following workflow samples are meant to demonstrate concepts and provide a starting point for extension. They are not the same workflows that are included with Office SharePoint Server 2007.
- Custom Reports
- ECM Activities
- List Item Activities
- Hello World Sequential Workflow
- State Based Approval Workflow
- Modification Workflow
- Replication and Contact Selector Workflow ASPX Collect Feedback Workflow
- Intersystem Purchase Order
- Confidential Approval
- Group Approval
- Review Workflows
- Collect Feedback Workflow
- Multi-Stage Workflow
- Server-side Collect Signatures Workflow
Visual Studio Project Templates for SharePoint Server 2007 workflow
- SharePoint Server Sequential Workflow Library
- SharePoint Server State Machine Workflow Library
You can also view the Microsoft Office SharePoint Server 2007 SDK in the MSDN Library.
WSS V3 SDK download updated
The WSS V3 SDK has been updated and ready for download http://www.microsoft.com/downloads/details.aspx?FamilyID=05e0dd12-8394-402b-8936-a07fe8afaffd&DisplayLang=en
Overview
The Windows SharePoint Services 3.0 SDK contains conceptual overviews, programming tasks, and references to guide you in developing solutions based on Windows SharePoint Services as a platform. The SDK includes information about the following technologies:
- Web Part Framework Create, package, and deploy Web Parts on SharePoint sites.
- Server-side object model Work with individual lists and sites or manage an entire Windows SharePoint Services deployment.
- Web services Use default Web services, or create custom Web services, to interact with Windows SharePoint Services from external applications.
- Collaborative Application Markup Language (CAML) Customize the schemas that define lists and sites, define queries for use with members of the object model or Web services, and specify parameters for use with methods in Remote Procedure Call (RPC) protocol.
- Master Pages Specify all of the shared elements of your site in the master page or pages, and add content page-specific elements to content pages.
- Workflows Create workflows that encapsulate business processes to be performed on items in Windows SharePoint Services, and attach those workflows to items in Windows SharePoint Services.
- Custom Field Types Create custom field types that conform to your business data. These custom field types can be based on the base field types already included in Windows SharePoint Services, and can include custom data validation, field rendering, and field property rendering and processing.
- Information Rights Management (IRM) Specify IRM for files located in document libraries and stored as attachments to list items. Create IRM protectors for your own custom file types.
- Document Property Promotion and Demotion Use the built-in XML parser to synchronize the document properties and list column data for XML documents. Create document parsers to do the same for your custom file types.
- Search Use the new Query object model and Query Web service to retrieve search results. Search in Windows SharePoint Services now shares the same SharePoint search technology used by Microsoft Office SharePoint Server 2007.
Also included is the Workflow Developer Starter Kit for Windows SharePoint Services 3.0, which helps solution providers, independent software vendors, value-added resellers, and other developers write custom workflows for Windows SharePoint Services 3.0. It contains the following:
Visual Studio Project Templates
- Sequential Workflow Library
- State Machine Workflow Library
Sample Custom Workflow
- Simple Collect Feedback using ASPX forms
You can also view the SDK documentation online http://msdn2.microsoft.com/en-us/library/bb264594.aspx
Adding web.config settings to you WSS or MOSS site
This article describes how to add web.config settings automatically to your new web applications under WSS V3 and SharePoint 2007.
You need to create a file in the format of webconfig.[name].xml, copy the file to C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\CONFIG folder and the settings in the file will be merged with the web.config file on any new web application. Unfortunately this only works for new web applications, if you put the file in the config folder no changes will be applied on existing web applications.
The example below adds a key to the appSettings and a database connection string to the connectionStrings section.
<?xml version="1.0" encoding="utf-8" ?>
<actions>
<add path="configuration/appSettings">
<add key="MyFilePath" value="C:\temp\path\" />
</add>
<add path="configuration">
<connectionStrings />
</add>
<add path="configuration/connectionStrings">
<remove name="MySqlServerConnection" />
<add name="MySqlServerConnection" connectionString="server=[server];database=[db];Integrated Security=SSIP;" providerName="System.Data.SqlClient" />
</add>
</actions>
Blog tools - Colour code you C#, HTML or XML code
I found this great tool for formatting your code ready for your blog. http://www.manoli.net/csharpformat/.
Turns this:
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<FeatureSiteTemplateAssociation Id="4DEFA336-EDC4-43cb-9560-FE2E27E76DFB" TemplateName="SPSPERS#0"/></Elements>
Into this:
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<FeatureSiteTemplateAssociation Id="4DEFA336-EDC4-43cb-9560-FE2E27E76DFB" TemplateName="SPSPERS#0"/></Elements>
In just a couple of seconds. The styling is achieved using CSS.
Monday, 16 July 2007
SPS Site Template - Is it really obsolete?
Venkat Varkala discusses in his post whether the SPS site template is infact obsolete. In the webtempsps.xml you have the following:
<Template Name="SPS" ID="20">
<Configuration ID="0" Title="SharePoint Portal Server Site" Type="0" Hidden="TRUE" ImageUrl="../images/spshome.gif" Description="This template is obsolete."></Configuration>
</Template>
When Microsoft refer to this template being obselete they mean it's obselete from the create site template picker page and shouldn't be set to visible. The "SPS" folder is still an integral part of portal site creation.The SPSPORTAL site template (declaration below) doesn't have a folder in the 12 Hive (under 12\template\sitetemplates). This could be classed as a virtual site definition.
<Template Name="SPSPORTAL" ID="47">
<Configuration ID="0" Title="Collaboration Portal" Type="0" Hidden="FALSE" ImageUrl="/_layouts/1033/images/template_corp_intranet.png" Description="A starter site hierarchy for an intranet divisional portal. It includes a home page, a News site, a Site Directory, a Document Center, and a Search Center with Tabs. Typically, this site has nearly as many contributors as readers and is used to host team sites." ProvisionAssembly="Microsoft.SharePoint.Publishing, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" ProvisionClass="Microsoft.SharePoint.Publishing.PortalProvisioningProvider" ProvisionData="SiteTemplates\\WebManifest\\PortalWebManifest.xml" RootWebOnly="TRUE" DisplayCategory="Publishing" VisibilityFeatureDependency="97A2485F-EF4B-401f-9167-FA4FE177C6F6">
</Configuration>
</Template>
This template uses the files from the "SPS" folder when the site is created. The definition and structure of the site is defined by ther webmanifest.xml. The webmanifest.xml defines the Site Definition the virtual Site Template should be based on and what sub sites should be created. <portal xmlns="PortalTemplate.xsd"><web name="Home" siteDefinition="SPS" displayName="$Resources:spscore,PortalManifest_Home_DisplayName;" description="$Resources:spscore,PortalManifest_Home_Description;">
<webs>
<web name="News" siteDefinition="SPSNHOME" displayName="$Resources:spscore,PortalManifest_News_DisplayName;" description="$Resources:spscore,PortalManifest_News_Description;" />
<web name="SiteDirectory" siteDefinition="SPSSITES" displayName="$Resources:spscore,PortalManifest_SiteDirectory_DisplayName;" description="$Resources:spscore,PortalManifest_SiteDirectory_Description;" />
<web name="SearchCenter" siteDefinition="SRCHCEN" displayName="$Resources:spscore,PortalManifest_SearchCenter_DisplayName;" description="$Resources:spscore,PortalManifest_SearchCenter_Description;" />
<web name="Docs" siteDefinition="BDR" displayName="$Resources:spscore,PortalManifest_DocumentCenter_DisplayName;" description="$Resources:spscore,PortalManifest_DocumentCenter_Description;" />
</webs>
</web>
</portal>
Sites are created this way so that they are built the "supported way". Microsoft also say that you shouldn't modify the MySite template on the file system, you should modify the template by using Feature Stapling (see the Microsoft post). Feature stapling involving creating:- A Staplee - This feature does the work. For example it could provision files in the MySite.
- A Stapler - This feature activates the Staplee feature when a site of a particular site is created.
The following xml is an example of the feature.xml for a Stapler
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<FeatureSiteTemplateAssociation Id="4DEFA336-EDC4-43cb-9560-FE2E27E76DFB" TemplateName="SPSPERS#0"/></Elements>
So when customising a portal template you should use feature stapling and site provisioning using the webmanifest.xml.
Visual Studio .NET 2005 - Code Snippets Demo
- Simple expansion
- Template expansion (with variables)
- Surround
Ctrl+K, Ctrl+B
To activate a snippet ... start typing the name of the snippet
Tab,Tab (in C#)
?,Tab (in VB.NET)
.. and the snippet will appear. If it's a templated snippet:
Tab advances to the next field
Shift+Tab moves to the previous field
Enter completes the snippet and resumes editing at your previous cursor position
Information from Jeff Atwood
Friday, 13 July 2007
Hosting UserControls vs Delegate Control
There are two main approaches for adding user controls to your site:
- Deploying them to the "wpresources" folder
- Using the DelegateControl
Many people have blogged about each technique, but which is the best or the recommended approach?
Tony Rahbun has posted an article called "WebParticles: Developing and Using Web User Controls as WebParts in Microsoft Office SharePoint Server 2007" http://www.codeproject.com/spoint/WebParticles.asp.
Microsoft's recommended approach is to use the DelegateControl. http://msdn2.microsoft.com/en-us/library/ms463169.aspx.
Advantages of using the DelegateControl over hosting UserControls in the wpresources folder
- Using Solution deployment in SharePoint 2007 you can create a WSP to automate the deployment of your UserControls (stored in the ControlTemplates folder) and Features (used to activate a DelegateControl).
- You can control the scope of the feature.
- More closely integrated with SharePoint.
- If the feature isn't activated the DelegateControl will fall over gracefully. This would enable the component to be hidden if no longer needed.
Tuesday, 10 July 2007
SharePoint 2007 Supported Browsers and Languages
Supported Web Browsers
- Internet Explorer 6 and 7 are recommended for site administration.
- Firefox 1.5, Mozilla 1.7 Netscape 8.1, Safari 2.0 (Mac) are supported for the front-end.
For more information please see http://technet2.microsoft.com/Office/en-us/library/ff6c5b8c-59bd-4079-8f0b-de4f8b4e0a861033.mspx?mfr=true
Multi-lingual Languages Supported on the front end through variations
- Arabic
- Bulgarian
- Catalan
- Chinese (Hong Kong)
- Chinese (Simplified)
- Chinese (Traditional)
- Croatian
- Czech
- Danish
- Dutch
- English
- Estonian
- Finnish
- French
- German
- Greek
- Hebrew
- Hindi
- Hungarian
- Italian
- Japanese
- Korean
- Latvian
- Lithuanian
- Norwegian (Bokmål)
- Polish
- Portuguese (Brazil)
- Portuguese (Portugal)
- Romanian
- Russian
- Serbian (Latin)
- Slovak
- Slovenian
- Spanish
- Swedish
- Thai
- Turkish
- Ukrainian
The SharePoint Search only fully supports a sub set of the above listed languages.
Multi-lingual languages supported on the back end
- Arabic
- Catalan
- Chinese (Simplified)
- Chinese (Traditional)
- Czech
- Danish
- Dutch
- English
- Finnish
- French
- German
- Greek
- Hebrew
- Hindi
- Hungarian
- Italian
- Japanese
- Korean
- Norwegian (Bokmål)
- Polish
- Portuguese (Brazil)
- Portuguese (Portugal)
- Romanian
- Russian
- Slovak
- Slovenian
- Spanish
- Swedish
- Thai
Download the language pack here http://www.microsoft.com/downloads/details.aspx?FamilyID=2447426b-8689-4768-bff0-cbb511599a45&displaylang=en.
TechNet article about deploying language packs http://technet2.microsoft.com/Office/en-us/library/26c07867-0150-463d-b21a-a6d42aecf05a1033.mspx?mfr=true.
Monday, 9 July 2007
SharePoint 2007 Backup Failed - Cannot open backup device
You may have seen this error Error: Object SharePoint_Config failed in event OnBackup. For more information, see the error log located in the backup directory. SqlException: Cannot open backup device '\\servername\backup\spbr0001\0000001.bak'. Operating system error 5(error not found).
After reading this article http://technet2.microsoft.com/Office/en-us/library/b4dfe06a-40a5-4826-8d4b-1d758a9e621a1033.mspx?mfr=true I resolved the issue. The steps I took were:
- Set the SQL Server (MSSQLSERVER) Windows service to run as a domain account. Will require a restart of the service and IIS.
- Setup sharing on the backup folder. Grant access for the identity that the Central Administration Application Pool runs under, the database SQL account, the identity that the Timer service runs under, to change and read rights.
- On each of the SharePoint servers check you can access the share.
- On each of the database servers check you can access the share.
- Set the folder security, grant privledges for the identity that the Central Administration Application Pool runs under, the database SQL account, the identity that the Timer service runs under to all rights apart from Full Control.
This will fix backups that are performed using SharePoint 2007 Central Administration.
If you are running backups from STSADM you will need to grant access to the share and write access to the folder security for the user that runs the STSADM -o backup command.
Posted by Dave Hunter at 19:15 0 comments