Monthly Archive: February 2005


How to programmatically add users to a SPS 2003 (or WSS v2.0) portal

This sample code demonstrates how to programmatically add users in SharePoint Portal Server 2003 or Windows SharePoint Services v2.0 (exception handling omitted) In C# 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 using Microsoft.SharePoint; using Microsoft.SharePoint.WebControls;   public class MyUserAdminClass { public void AddUser(string username, string emailAddress, string fullName, string comments) { // get a reference to the current SharePoint site SPWeb PortalWeb = SPControl.GetContextWeb(Context);   // get a...


Extending SharePoint Workflow with Event Sinks – Part 2

In my Part 1 of my post on extending SharePoint workflow with event sinks, I talked briefly about essentially creating event sinks to handle events triggered by user interaction with a SharePoint portal and providing custom implementation to handle those events above and beyond that supplied out-of-the-box by SPS 2003.  I showed some high level code prototypes on how event sinks are implemented in the context of handling events triggered when posting content to SharePoint doc libraries. ...


Extending SharePoint Workflow with Event Sinks – Part 1

It’s of no surprise that the workflow capabilities within SharePoint Portal Server 2003 leaves a lot to be desired.  SharePoint does have decent, but limited, content approval workflow capabilities, however, for large enterprise customers with complex business processes, the limitations of SharePoint’s “out-of-the-box“ content approval flow far outweigh its usefulness.  However, what SharePoint lacks in its out-of-the-box feature set, it makes up with a robust and extensible API. There are many out there who say that in...


SharePoint Web Parts and SqlClientPermission Errors

If you are developing custom web parts that need to connect to a SQL Server database to retrieve data, you may be confronted with the following error: {"Request for the permission of type System.Data.SqlClient.SqlClientPermission, System.Data, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed." } This is due to SharePoint Portal Server and Windows SharePoint Services implementation of .NET Code Access Security (CAS).  A solution that addresses the aforementioned error is cited below: Locate and open the wss_minimaltrust.config file (NOTE:...

This site is protected by WP-CopyRightPro