Archive for July, 2008
Web Templates in MOSS 2007
by liquidpooled on Jul.11, 2008, under Microsoft, Office, Sharepoint Server, Visual Studio 2005, Visual Studio 2008
The following are the web templates for MOSS 2007:
| Template Title | Template Name | Template Description |
| Global Template | GLOBAL#0 | This template is used for initializing a new site.
Note: Do not use this template. |
| Team Site | STS#0 | A site for teams to quickly organize, author, and share information. It provides a document library, and lists for managing announcements, calendar items, tasks, and discussions. |
| Blank Site | STS#1 | A blank site for you to customize based on your requirements. |
| Document Workspace | STS#2 | A site for colleagues to work together on a document. It provides a document library for storing the primary document and supporting files, a tasks list for assigning to-do items, and a links list for resources related to the document. |
| Basic Meeting Workspace | MPS#0 | A site to plan, organize, and capture the results of a meeting. It provides lists for managing the agenda, meeting attendees, and documents. |
| Blank Meeting Workspace | MPS#1 | A blank meeting site for you to customize based on your requirements. |
| Decision Meeting Workspace | MPS#2 | A site for meetings that track status or make decisions. It provides lists for creating tasks, storing documents, and recording decisions. |
| Social Meeting Workspace | MPS#3 | A site to plan social occasions. It provides lists for tracking attendees, providing directions, and storing pictures of the event. |
| Multipage Meeting Workspace | MPS#4 | A site to plan, organize, and capture the results of a meeting. It provides lists for managing the agenda and meeting attendees in addition to two blank pages for you to customize based on your requirements. |
| Central Admin Site | CENTRALADMIN#0 | A site for central administration. It provides Web pages and links for application and operations management. |
| Wiki Site | WIKI#0 | A site for a community to brainstorm and share ideas. It provides Web pages that can be quickly edited to record information and then linked together through keywords |
| Blog | BLOG#0 | A site for a person or team to post ideas, observations, and expertise that site visitors can comment on. |
| Shared Services Administration Site | OSRV#0 | This template creates a site for administering shared services |
| Records Center | OFFILE#1 | This template creates a site designed for records management. Records managers can configure the routing table to direct incoming files to specific locations. The site prevents records from being modified after they are added to the repository. |
| Document Center | BDR#0 | A site to centrally manage documents in your enterprise. |
| Search Center | SRCHCENTERLITE#0 | A site for delivering the search experience. The site includes pages for search results and advanced searches. |
| Search Center | SRCHCENTERLITE#1 | The Search Center template creates pages dedicated to search. The main welcome page features a simple search box in the center of the page. The template includes a search results and an advanced search page. This Search Center will not appear in navigation. |
| SharePoint Portal Server Site | SPS#0 | This template is obsolete. |
| SharePoint Portal Server Personal Space | SPSPERS#0 | This web template defines a Personal Space for an individual participating on a SharePoint Portal. |
| Personalization Site | SPSMSITE#0 | A site for delivering personalized views, data, and navigation from this site collection into My Site. It includes personalization specific Web Parts and navigation that is optimized for My Site sites. |
| Contents area Template | SPSTOC#0 | This template is obsolete. |
| Topic area template | SPSTOPIC#0 | This template is obsolete. |
| News Site | SPSNEWS#0 | This template is obsolete. |
| Publishing Site | CMSPUBLISHING#0 | A blank site for expanding your Web site and quickly publishing Web pages. Contributors can work on draft versions of pages and publish them to make them visible to readers. The site includes document and image libraries for storing Web publishing assets. |
| Publishing Site | BLANKINTERNET#0 | This template creates a site for publishing Web pages on a schedule, with workflow features enabled. By default, only Publishing subsites can be created under this site. A Document and Picture Library are included for storing Web publishing assets. |
| Press Releases Site | BLANKINTERNET#1 | This template creates the Press Releases subsite for an Internet-facing corporate presence website. |
| Publishing Site with Workflow | BLANKINTERNET#2 | A site for publishing Web pages on a schedule by using approval workflows. It includes document and image libraries for storing Web publishing assets. By default, only sites with this template can be created under this site. |
| News Site | SPSNHOME#0 | A site for publishing news articles and links to news articles. It includes a sample news page and an archive for storing older news items. |
| Site Directory | SPSSITES#0 | A site for listing and categorizing important sites in your organization. It includes different views for categorized sites, top sites, and a site map. |
| Community area template | SPSCOMMU#0 | This template is obsolete. |
| Report Center | SPSREPORTCENTER#0 | A site for creating, managing, and delivering Web pages, dashboards, and key performance indicators that communicate metrics, goals, and business intelligence information. |
| Collaboration Portal | SPSPORTAL#0 | 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. |
| Search Center with Tabs | SRCHCEN#0 | A site for delivering the search experience. The welcome page includes a search box with two tabs: one for general searches, and another for searches for information about people. You can add and customize tabs to focus on other search scopes or result types. |
| Profiles | PROFILES#0 | This template creates a profile site that includes page layout with zones |
| Publishing Portal | BLANKINTERNETCONTAINER#0 | A starter site hierarchy for an Internet-facing site or a large intranet portal. This site can be customized easily with distinctive branding. It includes a home page, a sample press releases subsite, a Search Center, and a login page. Typically, this site has many more readers than contributors, and it is used to publish Web pages with approval workflows. |
| My Site Host | SPSMSITEHOST#0 | A site used for hosting personal sites (My Sites) and the public People Profile page. This template needs to be provisioned only once per Shared Service Provider, please consult the documentation for details. |
Configuring SQL Aliases in Windows Server
by liquidpooled on Jul.10, 2008, under MSDN, Microsoft, Office, SQL Server 2005, Sharepoint Server, Windows SharePoint Services
To configure connection specific alias, to aid in the installation of databases driven products (such as SharePoint/WSS), you can configure clients connections through the SQL Server Client Network Utility located at C:\WINDOWS\system32\cliconfg.exe.
A better way to impersonate in SharePoint (MOSS 2007/WSS 3.0)
by liquidpooled on Jul.09, 2008, under .NET, Microsoft, Office, Sharepoint Server, Visual Studio 2005, Visual Studio 2008, Windows SharePoint Services
Daniel Larson has a posting on his blog that explains running your SharePoint code in an elevated privileged environment. Here is a quick helper class.
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.SharePoint;
namespace SPLibrary
{
/// <summary>A class for working with elevated privilege</summary>
[CLSCompliant(false)]
public static class SpSecurityHelper
{
/// <summary>Returns an elevated site</summary>
/// <param name="theSite">
/// The site that you want an elevated instance of.
/// You must dispose of this object unless it is part of SPContext.Current.
/// </param>
/// <returns>An elevated site context.</returns>
/// <remarks>Be sure to dispose of objects created from this method.</remarks>
public static SPSite GetElevatedSite(SPSite theSite)
{
SPUserToken sysToken = GetSystemToken(theSite);
return new SPSite(theSite.ID, sysToken);
}
/// <summary>Gets a UserToken for the system account.</summary>
/// <param name="site"></param>
/// <returns>A usertoken for the system account user./returns>
/// <remarks>Use this token to impersonate the system account</remarks>
public static SPUserToken GetSystemToken(SPSite site)
{
site.CatchAccessDeniedException = false;
try {
return site.SystemAccount.UserToken;
}
catch (UnauthorizedAccessException) {
SPUserToken sysToken = null;
// Only use runwithelevated to grab the system user token.
SPSecurity.RunWithElevatedPrivileges(
delegate()
{
using (SPSite lolcatKiller = new SPSite(site.ID)) {
sysToken = lolcatKiller.SystemAccount.UserToken;
}
}
);
return sysToken;
}
}
}
}
Transforming string XML in C# (.NET 2.0)
by liquidpooled on Jul.08, 2008, under .NET, Microsoft, Visual Studio 2005, Visual Studio 2008
Here is a quick method to aid in transformations of strings (XML and XSL) in C# (.NET 2.0).
public string Transform(string xml, string xsl, bool useresolver)
{
System.IO.StringWriter writer = new System.IO.StringWriter();
System.Xml.Xsl.XslCompiledTransform t = new System.Xml.Xsl.XslCompiledTransform();
System.Xml.XmlReaderSettings settings = new System.Xml.XmlReaderSettings();
System.Xml.XmlUrlResolver resolver = new System.Xml.XmlUrlResolver();
resolver.Credentials = System.Net.CredentialCache.DefaultCredentials;
System.Xml.XmlReader xmlReader = System.Xml.XmlReader.Create(new System.IO.StringReader(xml));
System.Xml.XmlReader xslReader = System.Xml.XmlReader.Create(new System.IO.StringReader(xsl));
if (useresolver)
{
t.Load(xslReader, System.Xml.Xsl.XsltSettings.Default, resolver);
}
else
{
t.Load(xslReader);
}
t.Transform(xmlReader, null, writer);
return writer.ToString();
}