SharePoint 2007 Alerts not working!

December 17th, 2009 by tigirry
 

I have read many blogs that talk about SharePoint alert issue – basically alerts just don’t work as they are supposed to. I suppose you checked to make sure if you are set up correctly by reading other posts. I am putting this post together based on my experience for those who haven’t found a solution hoping this may help. First of all, before you even try to fix anything,  make sure you check the following items to ensure your SharePoint farm is correctly configured to send alerts…

  1. You should check Timer Job status in the Central Administration site (Operations > Timer Job Status). The job status should display “Succeeded” message if an alert has been successfully created - Immediate Alerts  servername Succeeded  100%  12/17/2009 3:50 PM
  2. You get a notification email shortly after you created an alert in SharePoint with the following subject: ”You have successfully created an alert for …”. However, you may not get any real alerts afterwards – this will be addressed below. If you are not even getting the first notification email, you should check your outgoing e-mail settings in CA.
    alertcreate
  3. You should make sure ”On” is selected for ”Alerts on this server are” in your web application general settings in CA (Application Management > Web Application General Settings).
    alerton
  4. You should check the content database that contains site collection(s) having the alert problem to see if “” (for immediate alerts) and “SchedSubscriptions” (for scheduled alerts) tables contain rows for created alerts – if you have empty tables, alerts are not getting created.
    dbtable
  5. Make sure you have the following stored procedures in content databases - if any of these is missing, you can copy from your Dev/QA environment content databases to test your alerts):
    proc_AddSubscription“,
    proc_DeleteSubscription“,
    proc_GetMatchingSubscriptionsData“,
    proc_GetWebSubscriptions“,
    proc_GetWebSubscriptionsForBackup“,
    proc_GetWebSubscriptionsUniqueUsers“,
    proc_MatchSubscriptions“,
    proc_ModifySubscription” and
    proc_UpdateSchedSubscriptionTimes

I usually review the configurations listed above to fix lots of my alert problems. But in some cases, I had to apply one of the below solutions to fix the issue. Some of these solutions are:

  1. Setting the property values for SharePoint site(s) to make sure the alert is enabled: stsadm.exe -o setproperty -url http://site -pn alerts-enabled -pv true
  2. Setting the proeprty values for SharePoint site(s) to make sure the alert is being sent immediately: stsadm.exe -o setproperty -url http://site -pn job-immediate-alerts -pv “every 5 minutes”
  3. Restarting “Windows SharePoint Services Timer” service in all SharePoint server(s) to trigger the timer service.
  4. Upgrading your SharePoint environment with service packs and/or cumulative updates – this seems to solve the issue for most cases. Make sure you backup your environment if you are planning to do so. Also, be patient when the upgrade is in progress. In some environments, I had to wait 8+ hours per server in a farm to complete the update. After the update is applied completely to your SharePoint farm, all congested alerts will be flushed out (so, you should plan to warn your users if you have had this problem for a long time because end users may be receiving sever hundreds of alerts at once).
  5. Making sure the SMTP relay configuration includes all SharePoint servers’ IP addresses (including all SQL database IP addresses) - your relay restriction settings should grant access to all SharePoint servers including all SharePoint related SQL servers. A lot of times, I have seen people excluding IP addresses for SQL servers when granting access but this will result in no alert or random alert behavior.

I hope this post helps! If you have a unique case, please share your story here. I may be able to help :)

Disabling Actions menu items in SharePoint

July 21st, 2009 by tigirry

If you are interested in how to disable menu items in "Actions" menu in SharePoint, you will probably think of several options. You can certainly develop features at site collection level to apply the settings globally. Here, I would like to share a script that you can insert into a Content Editor Web Part. Simply, add a Content Editor Web Part to a page that has a list view web part for a document library and you are all set. You can be creative with this if necessary. 

<script>
function GetElementByText(tagName, title)
    {
        var a = document.getElementsByTagName(tagName);
        for (var j=0; j < a.length; j++)
        {
            if (a[j].text)
            {
                if (a[j].text === title)
                {
                    return a[j];
                }
            }
        }
        return null;
    }
function hideWinExp()
{
 var o = GetElementByText("ie:menuitem","Open with Windows Explorer");
            if (o)
            {
                o.disabled = true;
            }
var p = GetElementByText("ie:menuitem","Edit in Datasheet");
if (p)
            {
                p.disabled = true;
            }
var q = GetElementByText("ie:menuitem","Export to Spreadsheet");
if (q)
            {
                q.disabled = true;
            }
var w = GetElementByText("ie:menuitem","View RSS Feed");
if (w)
            {
                w.disabled = true;
            }
var e = GetElementByText("ie:menuitem","Add to My Links");
if (e)
            {
                e.disabled = true;
            }
}
_spBodyOnLoadFunctionNames.push("hideWinExp");
</script>

Good Luck! Smile

SharePoint (WSS 3.0, MOSS 2007) and Project Server 2007 Service Pack 2 Installation Order

July 21st, 2009 by tigirry

I would like to share my experience with those who are trying to install SP2 on SharePoint server. I defined 3 environments below: WSS 3.0, MOSS 2007 and MOSS 2007/PS 2007. Please try the following sequences in your testing environment before applying to your production environment as yours may be unique. Let me know if you have any comments.

Download links:
1.
Windows SharePoint Services 3.0 with SP2 (x86)
2. Windows SharePoint Services 3.0 with SP2 (x64)
3. Windows SharePoint Services 3.0 SP2 (x86 & x64)
4. Windows SharePoint Services 3.0 with SP2 (x86)
5. Windows SharePoint Services 3.0 with SP2 (x64)
6. Windows SharePoint Services 3.0 with SP2 (x86)
7. Infrastructure Update for Windows SharePoint Services 3.0 (x64)
8. Infrastructure Update for Microsoft Office Servers (x64)
9. Infrastructure Update for Microsoft Office Servers (x86)
10. Infrastructure Update for Windows SharePoint Services 3.0 (x86)
11. The 2007 Microsoft Office Servers Service Pack 2 (x86 & x64)

 

A. WSS 3.0

·         New Deployment

1. Download and install Windows SharePoint Services 3.0 with SP2 and you are good to go.
2. Done.

·         WSS 3.0 RTM, with SP1 or Infrastructure Update
1. Download and install Windows SharePoint Services 3.0 SP2 on every SharePoint server in your farm.
2. Done.

B. MOSS 2007

·         New Deployment
1. Download and install Microsoft Office SharePoint Server 2007 with SP1 on every SharePoint server in your farm.
2. Download and install Windows SharePoint Services 3.0 SP2 and The 2007 Microsoft Office Servers Service Pack 2 in order on every SharePoint server in your farm.
3. Done.

·         MOSS 2007 RTM
1. Download and install Windows SharePoint Services 3.0 SP2 and The 2007 Microsoft Office Servers Service Pack 2 in order on every SharePoint server in your farm.
2. Done.

·         MOSS 2007 with SP1
1. Download and install Windows SharePoint Services 3.0 SP2 and The 2007 Microsoft Office Servers Service Pack 2 in order in your farm.
2. Done.

·         MOSS 2007 with Infrastructure Update
1. Download and install Windows SharePoint Services 3.0 SP2 and The 2007 Microsoft Office Servers Service Pack 2 in order in your farm.
2. Done.

·         MOSS 2007 with SP1 and Infrastructure Update
1. Download and install Windows SharePoint Services 3.0 SP2 and The 2007 Microsoft Office Servers Service Pack 2 in order in your farm.
2. Done.

C. MOSS 2007 and PS 2007

·         New Deployment
1. Download and install Microsoft Office SharePoint Server 2007 with SP1 on every SharePoint server in your farm.
2. Download and install Infrastructure Update for Microsoft Office Servers on every SharePoint server in your farm.
3. Download and install Project Server 2007 with SP1 on SharePoint servers that will host Project Application Service.

·         MOSS 2007 RTM
1. Download and install Windows SharePoint Services 3.0 SP2 and The 2007 Microsoft Office Servers Service Pack 2 in order on every SharePoint server in your farm.
2. Download and install Project Server 2007 with SP1 on SharePoint servers that will host Project Application Service.
3. Download and install The 2007 Microsoft Office Servers Service Pack 2 on every SharePoint server in your farm.
4. Done.

·         MOSS 2007 with SP1
1. Download and install Infrastructure Update for Microsoft Office Servers on every SharePoint server in your farm.
2. Download and install Project Server 2007 with SP1 on SharePoint servers that will host Project Application Service.
3. Download and install Infrastructure Update for Microsoft Office Servers on servers that Project Server 2007 with SP1 is installed.
4. Download and install Windows SharePoint Services 3.0 SP2 and The 2007 Microsoft Office Servers Service Pack 2 in order on every SharePoint server in your farm.
5. Done.

Or

1. Download and install Windows SharePoint Services 3.0 SP2 and The 2007 Microsoft Office Servers Service Pack 2 in order on every SharePoint server in your farm.
2. Download and install Project Server 2007 with SP1 on SharePoint servers that will host Project Application Service.
3. Download and install The 2007 Microsoft Office Servers Service Pack 2 on every SharePoint server in your farm.
4. Done.

·         MOSS 2007 with Infrastructure Update
*You should have applied SP1 before Infrastructure Update because it is the recommended approach.
1. Download and install Windows SharePoint Services 3.0 SP2 and The 2007 Microsoft Office Servers Service Pack 2 in order on every SharePoint server in your farm.
2. Download and install Project Server 2007 with SP1 on SharePoint servers that will host Project Application Service.
3. Download and install The 2007 Microsoft Office Servers Service Pack 2 on every SharePoint server in your farm.
4. Done.

·         MOSS 2007 with SP1 and Infrastructure Update
1. Download and install Project Server 2007 with SP1 on SharePoint servers that will host Project Application Service.
2. Download and install Infrastructure Update for Microsoft Office Servers on servers that Project Server 2007 with SP1 is installed.
3. Download and install Windows SharePoint Services 3.0 SP2 and The 2007 Microsoft Office Servers Service Pack 2 in order on every SharePoint server in your farm.
4. Done.

After applying any updates, run the SharePoint Products and Technologies Configuration Wizard or "psconfig –cmd upgrade –inplace b2b -wait” in command line. This needs to be done on every server in the farm with SharePoint installed and the version of content databases should be 12.0.0.6421 after successfully applying SP2. 

During the installation of the 2007 Microsoft Office servers Service Pack 2, a product expiration date is activated incorrectly. This means that your SharePoint will expire 180 days after Service Pack 2 is deployed, as if it were a trial installation. The activation of the expiration date will not affect the regular function of these products until the expiration date passes, 180 days after Service Pack 2 is deployed. If the product expires, it will not affect data, configuration, or application code. However, it will make the Office Server product inaccessible for end-users. (More information can be found here: KB Article 971620). Microsoft already released updates to resolve this issue and below are download lins:

Update for 2007 Microsoft Office Servers (KB971620), 32-Bit Edition
Download the Download the Update for 2007 Microsoft Office Servers (KB971620), 32-Bit Edition package now.

Update for 2007 Microsoft Office Servers (KB971620), 64-Bit Edition
Download the Download the Update for 2007 Microsoft Office Servers (KB971620), 64-Bit Edition package now.

Room and Equipment Reservations SharePoint Template Can't Reserve

June 11th, 2008 by tigirry

As many of you have already experienced, "Room and Equipment Reservations" template from Fantastic 40 Application Templates is weak and poorly designed. Default list and calendar views for lists such as Reservations only display current user's reservations and if an administrator tries to change or create a all item calendar view, this view will display all items including "non-reservation" item. This "non-reservation" item is created in Reservations list when a user creates a new resource in Resources list. This is due to Microsoft's "brilliant" hidden field called RERStatus.

The way "Room and Equipment Reservations" template works is that users with Contribute or higher permission can create a new resource (room, equipment, etc) in Resources list and the workflow will start as soon as the item is created to make the same item in Reservations list with Available status. When this happens, this "non-reservation" item is created in Reservations list. The value for the hidden field, RERStatus, is changed during the workflow and all pre-defined views in the template make a use out of it. By default, you won't be able to see the value of this hidden field nor change the value. However, Kenneth Scott has a great post in his blog on how to make the hidden field visible but not editable: http://programmerramblings.blogspot.com/2008/03/adventures-with-wss30-room-and.html.

Another thing that I found was that with you logged in as System Account, "setup" workflow in Resources list will not automatically start. Basically, if the workflow does not start automatically or fails to start, you will NOT be able to make reservations – the resource will appear as if it is fully reserved forever.

However, if you create a resource with any other account with Contribute or higher permission, the "setup" workflow will work smoothly. So, keep this in mind when you are using System Account as a service account for testing "Room and Equipment Reservations" template.

You can also customize your "Room and Equipment Reservations" template to integrate with Microsoft Outlook and Patrik Luca has a great post in his blog (Patrik Luca's Blog) that talks about this customization in SharePoint Designer: http://patrikluca.blogspot.com/2008/03/extension-to-rooms-and-equipment.html. I tried this customization but I figured out that Outlook with Exchange Server does not work – I get the javascript error.

Hope this helps!

Reporting Services Add-In for SharePoint integration Error Code: 8

April 4th, 2008 by tigirry

Recently, I failed to install Microsoft SQL Server 2005 Reporting Services Add-in for Microsoft SharePoint Technologies. I tried after server reboot and iisreset but I could not get it to work. This bothered me a lot because I thought I was very familiar and confident with SharePoint Integrated Mode and I have run numerous installations and setups successfully in the past. First thing I did was to look at the installation log file. It is located at C:Documents and Settings<USER NAME>Local SettingsTemp folder of the server you're running the installation on. The log file starts with RS_SP_0.log and the number in this filename will increment as you attempt to install more than once.

Looking at the log file, I found my error:

Calling HCInstal for lcid '1043'

   Outcome code is: 256

Install error: C:Program FilesCommon FilesMicrosoft SharedWeb Server Extensions12inhcinstal.exe return error code: 8

Also, I found this line at the end of the log file:

SSRSCustomActionError: C:Program FilesCommon FilesMicrosoft SharedWeb Server Extensions12inhcinstal.exe return error code: 8

As soon as I got this error, I started to look for what the error code 8 means. Unfortunately, I could not find anything that talks about the error code. Well, I knew that LCID '1043' indicates Dutch (Netherlands) and "hcinstal.exe" is successfully installed on other LCID's. So, the next thing I did was to "pause" all web applications in IIS manager and ran the same installation and finally, I could install the add-in. I still do not know what the exactly problem is but I think it is related to any SharePoint site running that prevents this installation. Good luck!

Easy way of Editing Customized Theme in MOSS 2007

July 27th, 2007 by tigirry

Recently, I have observed that many MOSS 2007 and/or WSS 3.0 administrators want to apply their custom theme to site collections. In my opinion, this is a good practice because you never want to edit the "core.css" file – it is just stupid :)  For those who still want to modify the "core.css" file in spite of my advice, the file is in "C:Program FilesCommon FilesMicrosoft Sharedweb server extensions12TEMPLATELAYOUTS1033STYLES folder".

When using SharePoint Portal Server 2003, you could easily test and apply your customized .css file by inserting a html tag after

<Link REL="stylesheet" Type="text/css" HREF="/_layouts/1033/styles/ows.css">

in <HEAD> section of .aspx files. "Ows.css" file in SharePoint Portal Server 2003 was the "core" stylesheet file and by inserting a new stylesheet link tag after this line, any style attribute in "ows.css" file gets overwritten by your customized .css file.

HOWEVER, you cannot do this in MOSS 2007 and WSS 3.0. By default, there exists no stylesheet link tag for "core.css" in the <HEAD> section of any .aspx file. "Core.css" will be applied automatically at the end of any tag in the <HEAD> section.

Here I will explain how to edit and apply your custom theme in SharePoint Designer 2007 and this is the easiest way to modify your custom theme.css file.

1. First create a custom theme; you can refer my other post: /tigirry/archive/2007/07/03/custom-site-theme-for-sharepoint-2007-moss-2007-and-wss-3-0.aspx

2. Go to "Site Actions" -> "Site Settings" -> "Site Theme" in your SharePoint site collection and choose your custom theme and apply. Let us assume that the site collection's url is http://mycustomsite.

3. Now launch SharePoint Designer 2007 and go to "File" -> "Open Site…" and type http://mycustomsite in "Site name" field. Click "Open" to open the site.

4. In the left side, you should see "Folder List". If you don't see this, press ALT & F1 or go to "View" and select "Folder List".

5. In the "Folder List", browse to "_themes" folder. You should have a subfolder which is your custom theme folder. Let us assume that the name of the custom theme applied is "CustomBrown" and the subfolder name is "CustomBrown" as well. Editing this subfolder will not change your original theme folder at "C:Program FilesCommon FilesMicrosoft Sharedweb server extensions12TEMPLATETHEMESCustomBrown". What you see in the "Folder List" is the copy version of your custom theme folder.

6. In "CustomBrown" folder, look for the "Cust1011-65001.css" file. This file is created by the site collection when you apply any new theme and it is copied over to overwrite the site collection's "core.css" file. This file does not physically change "core.css" file but this file will be read after the "core.css" file. The format of this file is always "****1011-65001.css" and first 4 characters are always the first four characters of your custom theme name.

7. Make changes to this "****1011-65001.css" file as needed and you can also add/edit .jpg and .gif files as you make changes to the "****1011-65001.css" file.

8. When you want to apply and review the custom theme, simple save the .css file and you will see the changes you have made. If you don't see any change, click F5 to refresh or go to "View" and select "Refresh".

9. After you have finished modifying the .css file, copy its content and replace the content of "C:Program FilesCommon FilesMicrosoft Sharedweb server extensions12TEMPLATETHEMESCustomBrown heme.css" file with it. You also want to copy and paste any image file you have added or edited to this local folder.

10. Apply a different site theme to your site and apply the "CustomBrown" theme back to the site. You should see all your changes.

Hope you enjoy customizing!!

IE7 does NOT like InfoPath 2003's "Non-Default Printer"

July 26th, 2007 by tigirry

Here I am going to describe a bug that I found recently with InfoPath 2003 and Internet Explorer 7 (IE7).

Here is my scenario: an InfoPath form library exists in a SharePoint site created by SharePoint Portal Server 2003 and the form library has an InfoPath form template. If anyone with Internet Explorer 6 (IE6) opens an InfoPath document in the library and print to a printer that is not the default printer, there is no problem. HOWEVER, if you have Internet Explorer 7 (IE7) installed on your machine and try to print to any non-default printer in InfoPath 2003, the document will automatically be printed to your default printer.

This bug has been around for a long time but no update or fix has been created by Microsoft. Maybe it will be a different story if you have IE7 and InfoPath 2007. I have not yet tested this with IE7 and InfoPath 2007 but I do not think IE7 and InfoPath 2007 will have any problem. They must be fully compatible since they are tightly connected according to Microsoft.

There is also a compatibility issue between Microsoft Office Outlook and InfoPath. Outlook 2007 does not like InfoPath 2003 form submission and Outlook 2003 does not like InfoPath 2007 form submission to SharePoint 2003 form libraries. If you are planning to upgrade to Internet Explorer 7 or Windows Vista, you might want to consider purchasing Microsoft Office 2007. Or, if you are going to stick to Microsoft Office 2003, you just have to keep using Internet Explorer 6 and Windows XP :)

Custom Site Theme for SharePoint 2007 (MOSS 2007) and WSS 3.0

July 3rd, 2007 by tigirry

The easiest and the fastest way to apply the same look and feel on any SharePoint site is creating a site theme. A SharePoint site theme basically consists of theme.inf, theme.css, and image files. Theme.inf file simply represents the title of the theme. Theme.css is a stylesheet file that defines colors, header images and layouts of a site and image files can be referenced here to display on the page. By creating a custom site theme, you can easily change the style but in fact, writing and editing the stylesheet can be somewhat chanllenging when you have more than a hundred of elements to deal with.

Here is a short procedure of creating a custom site theme named "Ghost":

1. Copy any theme folder in "C:Program FilesCommon FilesMicrosoft Sharedweb server extensions12TEMPLATETHEMES" folder and paste with its name replaced with "Ghost". In this example, copy GRANITE folder.

2. In Ghost folder, rename GRANITE.INF file to GHOST.INF in upper case.

3. Open GHOST.INF file with notepad.

4. Change the value of title under [Info] to Ghost.

5. Replace every word, Granite, under [titles] with Ghost.

6. Open "C:Program FilesCommon FilesMicrosoft Sharedweb server extensions12TEMPLATELAYOUTS1033SPTHEMES.XML" file with notepad.

7. Add the following lines under <SPThemes> tag:
 <Templates>
  <TemplateID>Ghost</TemplateID>
  <DisplayName>Ghost</DisplayName>
  <Description>Ghost theme.</Description>
  <Thumbnail>images/thghost.gif</Thumbnail>
  <Preview>images/thghost.gif</Preview>
 </Templates>
Notice that preview and thumbnail paths are images/thghost.gif. By default, MOSS 2007 and WSS 3.0 will not have such image files.

8. In order to display thumbnail and preview correctly, you will need to capture the screen and save the file in "C:Program FilesCommon FilesMicrosoft Sharedweb server extensions12TEMPLATEIMAGES" folder with thghost.gif name. You can change the .gif file name if you change the thumbnail and preview file names in <Templates> tag.

9. Do an iisrest for the server to recognize the new theme.

Pretty simple procedure. Now you are ready to test your new theme. In Site Settings, you can now choose Ghost theme; however, the theme will not differ from Granite theme. Now, it is time for you to play with theme.css file!

Custom Site Definition with Custom Master Page for SharePoint Portal Server 2007 (MOSS 2007) and WSS 3.0

July 3rd, 2007 by tigirry

As a SharePoint administrator, if you want to customize your SharePoint sites, the first step is to create a custom site definition with a custom master page.

In order to create a new site definition, you pretty must have two options: design from scratch or copy and edit the existing template. The former will be more difficult than the latter. Designing your own site definition from scratch can be quite challenging if you are not comfortable with what you are doing. In this exercise, I will explain the "easy" way to do this.

1. You need to start with copying the existing site template from. On the server computer, browse to "C:Program FilesCommon FilesMicrosoft Sharedweb server extensions12TEMPLATESiteTemplates" folder. Each folder represents a site definition. Copy STS folder and paste with new name. In this exercise, we are going to name this site definition "Business" so rename it BUSINESS.

2. In this site definition, a custom master page will be used because in the future, you might want to change the master page of thie site definition and not unghost it. To do this, copy "C:Program FilesCommon FilesMicrosoft Sharedweb server extensions12TEMPLATEGLOBALdefault.master" file to "C:Program FilesCommon FilesMicrosoft Sharedweb server extensions12TEMPLATESiteTemplatesBUSINESS" folder with its name changed to businesscustom.master.

3. Open "C:Program FilesCommon FilesMicrosoft Sharedweb server extensions12TEMPLATESiteTemplatesBUSINESSdefault.aspx" file with notepad. In the first line, change
    MasterPageFile="~masterurl/default.master"
        to
    MasterPageFile="~masterurl/custom.master"
Doing so will allow the default.aspx file to use the custom master page. Repeat this step for "defaultdws.aspx" file.

4. Open "C:Program FilesCommon FilesMicrosoft Sharedweb server extensions12TEMPLATESiteTemplatesBUSINESSxmlONET.XML" file with notepad.

5. Add the following line under <ListTemplates> tag:
     <ListTemplate Name=”mplib” DisplayName=”$Resources:MasterPageGallery;” Description=”$Resources:global_onet_mplib_desc;” SetupPath=”globallistsmplib” Type=”116″ BaseType=”1″ Path=”GLOBAL” Hidden=”TRUE” HiddenList=”TRUE” NoCrawl=”TRUE” Unique=”TRUE” Catalog=”TRUE” OnQuickLaunch=”FALSE” SecurityBits=”11″ AllowDeletion=”FALSE” AllowEveryoneViewItems=”TRUE” Image=”/_layouts/images/itdl.gif” AlwaysIncludeContent=”TRUE” DocumentTemplate=”100″ />

6. Locate the first <Configuration> tag under <Configurations> tag.

7. Change
    <Configuration ID="0" Name="Default">
        to
    <Configuration ID="0" Name="Default" MasterUrl="_catalogs/masterpage/businesscustom.master">
Notice that I am assigning businesscustom.master value to MasterUrl.

8. Locate <Modules> tag under <Configuration ID="0"…..> tag and add the following tag under <Modules> tag:
    <Module Name="CustomMasterPage" />

9. Repeat step 6-9 for <Configuration ID="1"…..> and <Configuration ID="2"…..> tags.

10. Locate <Modules> tag after </Configurations> and add the following lines to <Modules> tag:
    <Module Name="CustomMasterPage" List="116" Url="_catalogs/masterpage" RootWebOnly="FALSE">
      <File Url="businesscustom.master" Type="GhostableInLibrary" IgnoreIfAlreadyExists="TRUE" />
    </Module>
Notice the file url is the assigned to the custom master page.

11. So far, we have successfully created a site definition. All we have to do now is to register this definition to the site definition list. To do this, create "WEBTEMPBUSINESS.XML" file in "C:Program FilesCommon FilesMicrosoft Sharedweb server extensions12TEMPLATE1033XML" folder. Notice that there exists "WEBTEMP.XML" file in the folder and we are not editing this file. We are creating a new xml file to register a new custom site definition.

12. Open the file with notepad and insert the following lines:
 <?xml version="1.0" encoding="utf-8"?>
 <!– _lcid="1033" _version="12.0.4518" _dal="1" –>
 <!– _LocalBinding –>
 <Templates xmlns:ows="Microsoft SharePoint">
  <Template Name="BUSINESS" ID="5">
     <Configuration ID="0" Title="Business Tools Team Site" Hidden="FALSE" ImageUrl="/_layouts/images/stsprev.png" Description="A Business 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." DisplayCategory="Corporation">   
    </Configuration>
     <Configuration ID="1" Title="Business Blank Site" Hidden="FALSE" ImageUrl="/_layouts/images/blankprev.png" Description="A blank Business site for you to customize based on your requirements." DisplayCategory="Corporation" AllowGlobalFeatureAssociations="False" >
    </Configuration>
     <Configuration ID="2" Title="Business Document Workspace" Hidden="FALSE" ImageUrl="/_layouts/images/dwsprev.png" Description="A Business 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." DisplayCategory="Corporation" >
    </Configuration>
  </Template>
 </Templates>
Notice DisplayCategory="Corporation"; this will create a another tag named Corporation and the three items will be inserted to it. You can change titles, descriptions, and imageUrl's based on your needs. Save and close the notepad.

13. Last but not least, do an iisreset for the server to recognize the new site definition.

Comments and feedbacks are welcome. Smile