Wednesday, January 28, 2009

How to identify the template used to create a site..

hi Friends


I use to wonder in case solution (WSP files) when deployed on the server globally

If the solution are available the sites are also made using those solution . Now I had a Question in my mind that how could I find which templates are bening applied on the site .In case site are moved i.e server is backup is restored over a new server , Creation on new configuration database , Solution are removed etc

At last we end up in getting message

"Page not found' or "Internet Explorer could complete this request " or " Unkown Error"


I created a Aspx file usign the code snipet given below

Code Snippet [ before every tag, '--' is added, you need to remove the hyphens]

==========================================================

<--script type="text/javascript" <--%@ Assembly Name="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"%>
<--%@ Page Language="C#" MasterPageFile="~/_layouts/application.master" Inherits="Microsoft.SharePoint.WebControls.LayoutsPageBase" %>
<--%@ Import Namespace="Microsoft.SharePoint" %>

<--script runat="server">
protected override void OnLoad(EventArgs e){
SPSecurity.RunWithElevatedPrivileges(delegate()
{
using (SPWeb thisWeb = this.Web)
{
lblWebTempalte.Text = thisWeb.WebTemplate;
lblWebTemplateID.Text = thisWeb.WebTemplateId.ToString();
}
});
}
<--/script>
<--asp:Content ID="Main" runat="server" contentplaceholderid="PlaceHolderMain" >

Web Template: <--asp:Label ID="lblWebTempalte" runat="server" />

Web Template ID: <--asp:Label ID="lblWebTemplateID" runat="server" />
<--/asp:Content>

<--asp:Content ID="PageTitle" runat="server" contentplaceholderid="PlaceHolderPageTitle" >
Site Template Information
<--/asp:Content>

<--asp:Content ID="PageTitleInTitleArea" runat="server" contentplaceholderid="PlaceHolderPageTitleInTitleArea" >
Site Template Information
<--/asp:Content>

<--/script>
===========================================================

Web Template: ----->Web Template ID:

============= ================

ABSENCE ----> Absencevacationschedule ----> 75811


PROJMULTI ---->Budgetingtrackingmultipleprojects ----> 75819


BT ----> Bugdatabase ----> 75801


CALLCENTER ---->Callcenter ---->75812


PROJCHANGE ---->Changerequest ----> 75818


COMPROC ---->Complianceprocesssupport ---->75813


DR ---->Documentlibraryreview ---->75803


EVENTPLAN ----> Eventplanning ---->75814


EXREPORTS ---->expensereimbursementapproval ----> 75815


HELPDESK ---->HELPDESK ---->75816


IT ---->InventoryTracking ---->75804


ITTEAM ---->ITTeamWorkspace ---->75817


JRIM ---->JobRequisition ---->75805


KB ---->KnowledgeBase ---->75806


LL ---->LendingLibrary ---->75807


PATM ---->PhysicalAssetTracking ---->75808


PROJSING ---->ProjectTrackingWorkspace ----> 75820


RER ---->RoomEquipmentReservations ---->75809


ST ---->SalesLeadPipeline ---->75810


List of Out of the box MOSS 2007 Template ID Information

========================================================

NAme ---->Web Template: ----> Web Template ID:

============= ================

GLOBAL ---->Global template" ----> 0

STS ---->Team Site,Blank Site,Document Workspace ----> 1

MPS ---->Basic Meeting Workspace ----> 2

MPS ---->Blank Meeting Workspace ---->2

MPS ---->Decision Meeting Workspace ---->2

MPS ---->Social Meeting Workspace 2

MPS ---->Multipage Meeting Workspace 2

CENTRALADMIN ---->Central Admin Site ----> 3

WIKI ---->Wiki Site ---->4

BDR ---->Document Center ----> 7

BLOG ---->Blog ---->9

SPS ---->SharePoint Portal Server Site ---->20

SPSPERS ---->SharePoint Portal Server Personal Space ---->21

SPSMSITE ---->Personalization Site ---->22

SPSTOC ---->Contents area Template ----> 30

SPSTOPIC ---->Topic area template ---->31

SPSNEWS ---->News area template ---->32

SPSNHOME ---->News Home template ---->33

SPSSITES ---->Site Directory area template ----> 34

SPSCOMMU ---->Community area template ---->36

SPSREPORTCENTER ----> Report Center Site" ---->38

CMSPUBLISHING ---->Publishing and Team Collaboration Site ----> 39

OSRV ----> Shared Services Administration Site ----> 40

SPSPORTAL ---->Corporate Intranet Site ---->47

SRCHCEN ---->Search Center ---->50

PROFILES ---->Profiles ----> 51

BLANKINTERNETCONTAINER ---->Internet Presence Web Site ---->52

BLANKINTERNET ---->Publishing Site ---->53

BLANKINTERNET ---->Press Releases Site ---->53

BLANKINTERNET ---->Publishing Site ---->53

SPSMSITEHOST ----> My Site Host ---->54

SRCHCENTERLITE ----> Search Center Lite ---->90

PWA ---->Project Web Access Site ----> 6221

PWS ----> Project Workspace ---->6215

OFFILE ----> Records Repository ----> 1483

OFFILE---->Records Repository ---->14483


To find out how many Solutions are deployed on the server we can achieve by

Central administration > operation> solution management

We would be finding the List of WSP file or Cab files installed

To find the solution from the Configuration database to you configuration database (Eg Wss_config)

Go to the databases open the table Dbo.objects .you would be finding the List of Solution in inside the tables

Note:- Above Steps would be senario Specfic .before doing any step Its advisable to take a full farm back and Sql back up to be on safe side

5 comments:

Anonymous said...

hi Pious

Thanks you Your blog helped me a lot saved my lot of time ,we have migrated our server and some sites where showing the same symptoms which you have mentioned in blog . This blog helped me a lot

Mitch wright

Anonymous said...

hi

Sorry I don't have a ID there I don't see much blog in your name but this one was the best. Come to my place we would have drink and would discuss about some more querriesss which i have

thanks
R Dean

Anonymous said...

It's really a nice blog. I like it. It's really informative blog. Keep it up nice blogging.
Add, add your website in www.directory.itsolusenz.com/

Balaji said...

Hi friend very nice and needed information given by you. I need a template to my site it will be some what useful to me thanks for sharing this blog.

Alexander said...

Thank you so much, this information is much appreciated.