Welcome Guest!
Create Account | Login
Locator+ Code:

Search:
FTPOnline
Channels Conferences Resources Hot Topics Partner Sites Magazines About FTP RSS 2.0 Feed

Free Trial Issue of Visual Studio Magazine

email article
printer friendly
get the code
more resources

Manage SharePoint Lists
Use the Lists Web service and CAML to update Windows SharePoint Services' MSDE database.
by Roger Jennings

Posted December 8, 2003

Technology Toolbox: VB.NET, SQL Server 2000, XML, Windows Server 2003, Windows SharePoint Services

Windows SharePoint Services (WSS) is Microsoft's recent reincarnation of SharePoint Team Services (STS) as an industrial-strength, scalable portal for sharing documents, contacts, calendars, Web links, and other information. WSS lets teams and workgroups bypass IT bureaucracy and budget constraints by designing and managing their own collaboration sites. WSS is a no-charge add-on to Windows Server 2003, and it doesn't require WSS-specific client access licenses, so you can expect a substantial increase in SharePoint installations as the new Windows Server System products gain traction. Microsoft Office's Word, Outlook, Excel, Access, and InfoPath 2003 have built-in WSS hooks to simplify the document- and data-sharing process.

ADVERTISEMENT

One of the significant changes from STS to WSS is the move to SQL Server Desktop Engine (MSDE) 2000 SP3 as the default data store for all site-configuration and content-management metadata. Installing WSS under Windows Server 2003 sets up a SERVERNAME\SHAREPOINT MSDE named instance with two databases—STS_Config and STS_servername_1 for the primary site. You can scale up to SQL Server 2000 clusters and scale out with load-balanced Web server farms as your WSS workload increases. Microsoft claims that WSS can scale to "hundreds of thousands of users."

A quick overview of the STS_servername_1 database's tables in SQL Server Enterprise Manager is enough to discourage even the most intrepid database developer from working directly with the tables. Fortunately, WSS delivers a full complement of ASP.NET XML Web services for remote site administration, content generation, and other create, retrieve, update, and delete operations on the SQL Server tables (see Additional Resources.) WSS also offers a set of .NET Framework 1.1 Microsoft.SharePoint namespaces for extending WSS, but manipulating SharePoint objects in VS.NET involves a steep learning curve. The new XML Web services offer the most accessible and flexible path to integrating WSS with applications and processes that don't have built-in SharePoint connectivity.

Lists form the backbone of WSS sites, so I'll show you how to read and update SharePoint lists with a general-purpose VB.NET WinForms client that consumes WSS' Lists Web service at http://servername/[sitename/]_vti_bin/Lists.asmx (download the ListsWSUpdate project). You'll find it's easy to extend the Web service approach I'll show you to other basic SharePoint administrative chores, such as managing site users, groups, and permissions with the UserGroup and Permissions WSS Web services. You must be a member of the WSS site's Administrator, Web Designer, or Contributor group to update list information; the administrative account you use to install WSS becomes a member of the Administrator group.

Consuming the Lists Web service requires you to add a Web reference to ..._vti_bin/Lists.asmx?wsdl to generate a client proxy. Most WSS sites require Windows authentication, and WSS needs your credentials to permit site access. Gain access to lists with your Windows logon account by adding this line before you invoke a Web method on an intranet:

proxyName.Credentials = _
   System.Net.CredentialCache. _
   DefaultCredentials

Provide digest authentication to connect through a firewall:

Dim uriLists As New Uri( _
   "http://any-uri.com")
Dim crdLists As New CredentialCache()
Dim nwcAdmin As New 
   NetworkCredential("AdminUser", _
   "password", "domain")
crdLists.Add(uriLists, "Digest", _
   nwcAdmin)
proxyName.Credentials = _
   crdLists.GetCredential(uriLists, _
   "Digest")



Back to top














Java Pro | Visual Studio Magazine | Windows Server System Magazine
.NET Magazine | Enterprise Architect | XML & Web Services Magazine
VSLive! | Thunder Lizard Events | Discussions | Newsletters | FTP Home