Dotnetdreamer's Weblog

SharePoint, Silverlight and Azure

Introduction to Site Templates

Posted by Ramprasad Navaneethakrishnan on May 9, 2009

Sharepoint 2007 comes with some out-of-the-box site templates that allows Administrators or Information Workers to readily create sites by choosing one of the available templates that suites their requirement.

The out-of-the-box Site Templates available with Sharepoint 2007 are broadly classified into 4 categories as mentioned below.

  1. Collaboration
  2. Meeting
  3. Enterprise
  4. Publishing

Collaboration Templates

  • Team Site:
    • This site is for team members to collaborate on any tasks or projects. To facilitate this type of collaboration, it includes the following webparts
      • Document library : To manage documents associated with the task / project
      • Announcement List : Create / Manage announcements with the project team
      • Discussion Board : A forum to discuss on tasks / issues assocaited with the project
      • Calendar Lists : Keeps track of the various schedules associated with team members / project
      • Task Lists : A list that keeps track of task items assigned against members of the project
      • Links : A single place to keep track of  links to sites that are needed for the project



  • Blank Site:
    • As the name suggests, its just a blank site with no webparts populated by default. This is a good place for building a fully customized site.



Document Workspace:

  • This template is suitable for a team documentation project or a team of technical writers where there is a need in creation and modification of common documentation.
  • It has the following webparts associated with it.
    • Document Library
    • Tasks List
    • Links



  • Blog Site:
    • A site for a team or person to post ideas and observations which site visitors can comment to.

Meeting Templates

Basic Meeting:

  • A general purpose meeting template that helps to plan, organize and capture the results of the meeting using the following webparts associated with the site
    • Objectives list
    • Attendies
    • Agenda
    • Document Library


  • Blank Meeting:
    • A blank meeting site that can be customized to suite the requirement
  • Decision Making Meeting:
    • This template is suitable when the purpose of the meeting is to reivew doucments, lists and other informations in order to make a decision. The webparts included are
      • Objectives list
      • Attendies
      • Agenda
      • Document Library
      • Tasks List
      • Decision List



  • Social Meeting:
    • This template comes handy when organizing a team picnic or party.  The web elements included are
      • Attendies list
      • Directions
      • Image Log
      • Thing to bring List
      • Photo Library
  • MultiPage Meeting:
    • This is similar to Decision Making template but it is designed to accomodate complex decision process. This site comes with two webpages by default and it can accomodate upto 10 individual pages. It includes
      • Objective Lists
      • Attendies Lists
      • Agenda


Enterprise templates are normally used as a top-level or high-level sites in an organizations site collection. It facilitated enterprise level activities in the areas of document management, records management and report management

  • Document Center:
    • A Site to centrally manage enterprise level documents. It has several document management features enabled by default like Major / Minor versionaing, Require check out etc. This templates includes the following webparts.
      • Document Library
      • Relevant documents
      • Upcoming tasks
      • Treeview webpart
  • Records Center:
    • This site template is used to centrally manage organizations data and data sources. The webparts included are
      • Records vault
      • Records routing list
      • Information management policy
      • Unassigned Records library



  • Site Directory:
    • A site template for listing, categorizing important sites in the organizations site collection. The webparts included are
      • Categorized Sites
      • Top Sites
      • Site Map
  • Report Center:
    • This site template as part of Sharepoint business intelligence solution communicates metrics, goals, statues and business intelligence informations by means of the foll0wing web elements
      • Dashboards
      • KPI indicators
      • Webpages



  • Search Center:
    • A site that enables users to seach for information. It includes webparts
      • SearchResults
      • Advanced Search
  • Search Center with tabs:
    • This is similar to search center except it comes with two tabs. One tab to search through information in the sites and the other tab ‘people’ that enables to search through peoples.


  • News Site:
    • A site for publising news articles and links to news articles. The default webparts includes
    • Sample news page
    • Archive for storing older news

Hope this is useful.

A post on creating custom templates can be found here



Posted in MOSS 2007 | Tagged: , , , , , , , , , , , , , , , , , | 2 Comments »

Access Denied – Activating Microsoft Office Server Publishing Infrastructure

Posted by Ramprasad Navaneethakrishnan on April 27, 2009

Hi Fellas,

Stuck up with the error “Access Denied” while activating the Publishing Infrastructure feature?? Read this post for solution

I was trying to create a sharepoint site with the Report Center template under the Enterprise tab.


I got the message that I need to activate Publishing Infrastruture Feature in Site Collection before creating site of this type.


I went to Site Collection Features in the section Site Collection Administration through Site Actions – > Site Settings


When tried to activate the Publishing Infrastructure Feature, I got the Access Denied error.


Solution 1:

Run the following command

stsadm -o activatefeature -name PublishingResources -url <siteurl>

Solution 2:

After some analysis, I found out that the AppPool for the current web application is having limited privileges. I did the following steps to resolve the problem

1. Open IIS. Locate the Web Applications. Go to properties. Select the Home Directory tab. Change the Application Pool to the one used by the Central Administration


3. Go the Site Collection Features. Activate the feature. Now it gets activated!

4. Go to IIS. Change the Application pool of the web application to the original one.


6. Now go back and create the Report Cente Site

Hope this will be useful. Forgive me for the horrible screenshots 🙂



Posted in MOSS 2007 | Tagged: , , , , , , , , , , , | 5 Comments »

Silverlight 3 – Out-of-the-Browser Applications

Posted by Ramprasad Navaneethakrishnan on April 24, 2009

Hi fellas,

This post was in my draft for quite a time now. Finally publishing it. 🙂

Silverlight 3 Beta is released and have already written a post on ‘Element to Element Binding’ which is one of the coolest additions to the latest version of Silverlight. When explored further, I came across this astonishing feature called Out-of-the-Browser Applications – which means your Silverlight Apps can run without the browser, in offline, just like a normal desktop applications will. Remember this kind of feature is not even present in Adobe AIR or Flash.

Now the obvious question in your mind is, should I write additional code to take advaentage of this feature? No there is no extra coding involved. However you need to make samll changes in the AppManifest.xml file. What are those changes?

  • Add two properties ‘EntryPointAssembly’ and ‘EntryPointType’ in the Deployment tag.  EntryPointAssembly should contain the value of your application name and EntryPointType should have the value of your applicationname.App. It should look like this.

<Deployment xmlns=”” xmlns:x= EntryPointAssembly=”YourApplicationName” EntryPointType=”YourApplicationName.App”

  • Now add the following section under the deploument tag


<ApplicationIdentity ShortName=”Your Application’s Name” Title=”Your Applications’s Title”>


Type text that will be displayed as tooltip for your application




  • Now run your application. Right click on your browser screen. You will get an option “Install this application onto your computer” in addition to the “Silverlight Configuration” option. Select “Install this application onto this computer” option. Now windows will prompt for the shortcut locations to select.  When clicked Ok, the application will be installed locally.


Pleasea leave your comments. 



Posted in Silverlight | Tagged: , , , , , | Leave a Comment »

Silverlight 3 – Element to Element Binding

Posted by Ramprasad Navaneethakrishnan on April 24, 2009

Hi Folks..

Silverlight 3 Beta 1 is released and as expected, Microsoft has added some cool features. I am very excited about this new feature called Element to Element binding and lets do a walk through.

Element To Element Binding let binding a control’s property directly with another control’s property. For example, we can bind the value property of a slider control directly to the width property of a Rectangle control in the XAML iteself. Let’s see the example..

  1. Make sure you have installed the followng Silverlight 3 sdk and tools
  2. Create a Silverlight application in the visual studio and in Page.xaml paste the following lines
  3. < Grid x:Name=”LayoutRoot” Background=”White”>  <RowDefinition></RowDefinition>

     <RowDefinition ></RowDefinition>


      <Slider x:Name=”mySlider” Grid.Row=”0″ Minimum=”0″ Maximum=”400″ Value=”50″ Orientation=”Horizontal” ></Slider>

      <Image Source=”DSC00443.JPG” Width= “{Binding Value, ElementName=mySlider}” Height=”{Binding Value, ElementName=mySlider}” Grid.Row=”1″ ></Image>




    <Grid.RowDefinitions> Note that we have binded the width property of the image with the value property of the Slider control like this

    1. Width =”{ Binding Value, ElementName=mySlider}”
  4. Now go ahead and hit the F5 button
  5. Drag the Slider control and see the width of the image getting changed according to the value of the Slider control.

Cool. Isn’t it.

Please give your feedback on this post.




Posted in Silverlight | Tagged: , , , , , , , , , | 2 Comments »

Azure Services – Method Not Allowed (405)

Posted by Ramprasad Navaneethakrishnan on March 21, 2009

Hi Folks,

This is my first post on Windows Azure and I hope I will add more as time goes on.. Now lets get to the business!

This is what I was trying to do..

1. I was trying to learn Azure Services. So as a first step I installed all the necessary setups

2. I completed my HelloWorld App with Windows Azure and I had no problem.

3. Now I tried to try my had at incorporating WCF into Windows Azure.

4. So I wrote a WCF service and this service write some data into the Azure Local Resource.

5. When I pressed F5, Boom.. I got this “Method Not Allowed (405)” Error.

6. So as a good boy, I googled “Method Not Allowed (405) + Winodws Azure” and got some help  and the prominent result says IIS7 did not have handlers to SVC files. They wanted me to run ServiceModelReg -i from the location “C:\Windows \Microsoft NET\Frameworv\v3.0\Windows Communication Foundation”.

7. But there is an alternate solution too..

8. Open Server Manager –> Click Features –>Add Features

9. Select .NET Framework 3.0 features – > Install.

10. This is how the screen looks after the feature is installed


11. Now SVC files are added to the IIS 7 handlers. This is how the Handler Mappings in the IIS 7 looks..


Now method not allowed (405) error is gone and my WCF service is working just fine..

Hope this is useful. Please give your comments on this post.



Posted in Windows Azure | Tagged: , , , , , , , , , , , , , , | 1 Comment »

Debugging Silverlight Application

Posted by Ramprasad Navaneethakrishnan on March 5, 2009

Yesterday, few of my collegues tried their hands on Silverlight application for the first time and they faced this issue, a simple one which will be faced by most of the Silverlight novices. The issue  is “Debugger not getting hit in the Silverlight project . So why is this? How to solve this?


All Silverlight applications will have a hosting application which will be an ASP.NET web application..

1. Right click the ASP.NET web application – -> Properties

2. In the properties window, select the tab Web.

3. In the debugger’s section, check the Silverlight checkbox.


4. Save the project properties.

5. Hit F5. Now you will be able to debug the Silverlight project

Leave your comments please.


Posted in Silverlight | Tagged: , , , | 19 Comments »

Silverlight 2 Tools – Offline Installation

Posted by Ramprasad Navaneethakrishnan on March 3, 2009


Ever wondered why the error “Hash value is not correct. ” is coming while installing Silverlight Tools?  This is because, while installing Silverlight Tools, the setup tries to download silverlight developer runtime, ‘Silverlight.2.0_Developer.exe’ from internet. If you have an internet connection, a connection that does not block downloading exe’s then you should not face any problem during the installation. But if you are not connected to internet, or your firewall blocks downloading exe’s, then you will get this error – “Hash value is not correct.”

So how to install Silverlight Tools offline, without internet connection?

The solution is simple..

1. Download Silverlight tools and Silverlight developer runtime from a computer that has internet connection.

2. Go to command prompt

3. Navigate to the folder containing the Silverlight tools setup “Silverlight_Tools.exe“.

4. Run the command Silverlight_Tools.exe/x.

5. The windows will show a popup that asks for a location to extract files. Specify a location. The tools setup now extracts all the contents to this location

6. Paste the setup ‘Silverlight.2.0_Developer.exe’ in the above mentioned location. Now the ‘Silverlight Tools offline installation package‘ is ready!

7.  Go to the computer(the one without  internet connection)where you want to install Silverlight tools.

8. Paste the Silverlight Tools offline installation package.

9.  Run SPInstaller.exe (this is present inside the package)

10.  Now you can see the message ‘Installation completed successfully’.


Let me know your comments please..



Posted in Silverlight | Tagged: , , , , , , , | 8 Comments »

Retrieving SharePoint List Data using CAML

Posted by Ramprasad Navaneethakrishnan on February 9, 2009

Lets see how to retrieve data from a SharePoint list and display it in a Web Part.


We have a SharePoint custom list with the name ‘MySPList’ which has the following columns.Title, AssignedTo and Status. We want to get all the data from the list for which AssignedTo has a value of ‘Ramprasad’.

CAML Query:

For the above scenario, the CAML query should look like the following..

<Where><Eq><FieldRef Name=’AssignedTo‘/><Value Type=’Text‘>Ramprasad</Value></Eq></Where>

Note here that in SharePoint list, ‘AssignedTo’ column is of type ‘Single Line of  Text’. The corresponding type in CAML is ‘TEXT’ which is mentioned in the CAML query.

Query Execution:

SPList mylist = web.Lists[“MySPList”];
SPQuery query = new SPQuery();
query.Query = “<Where><Eq><FieldRef Name=’AssignedTo’/><Value Type=’Text’>Ramprasad</Value></Eq></Where>”;
SPListItemCollection items = mylist.GetItems(query);

This statement execute the CAML query and stores the results as SPListItemsCollection object.

Loop through the results:

Now loop though the SPListItemsCollection object and get the needed column data .

foreach (SPListItem item in items)
DataRow _row = _table.NewRow();
_row[0]  = SPEncode.HtmlEncode(item[“Title”].ToString());
_row[1] = SPEncode.HtmlEncode(item[“AssignedTo”].ToString());
_row[2] =  SPEncode.HtmlEncode(item[“Status”].ToString());

Step by Step:

1. Open Visual Studio 2008. File -> New -> Project.

2. Select WebPart project template from Sharepoint project type.

3. Copy paste the following code

using System;
using System.Data;
using System.Runtime.InteropServices;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Serialization;

using Microsoft.SharePoint;
using Microsoft.SharePoint.Utilities;
using Microsoft.SharePoint.WebControls;
using Microsoft.SharePoint.WebPartPages;

namespace SharePointListDataRetrival
public class SharePointListDataRetrivalWebPart : System.Web.UI.WebControls.WebParts.WebPart
DataSet _listData;
public SharePointListDataRetrivalWebPart()

protected override void CreateChildControls()
DataGrid dgSpListData = new DataGrid();
dgSpListData.DataSource = GetListData();

private DataSet GetListData()
_listData = new DataSet();
DataTable _table = new DataTable();
DataColumn dc = new DataColumn(“Title”);
dc = new DataColumn(“AssignedTo”);
dc = new DataColumn(“Status”);
using (SPWeb web = SPContext.Current.Site.RootWeb)

SPList mylist = web.Lists[“MySPList”];
SPQuery query = new SPQuery();
query.Query = “<Where><Eq><FieldRef Name=’AssignedTo’/><Value Type=’Text’>Ramprasad</Value></Eq></Where>”;
SPListItemCollection items = mylist.GetItems(query);
foreach (SPListItem item in items)
DataRow _row = _table.NewRow();
_row[0]  = SPEncode.HtmlEncode(item[“Title”].ToString());
_row[1] = SPEncode.HtmlEncode(item[“AssignedTo”].ToString());
_row[2] =  SPEncode.HtmlEncode(item[“Status”].ToString());
return _listData;

4.  Project Properties -> Debug -> Under ‘Start Action’ section,Select ‘Start browser with url’ -> Give the name of your sharepoint site. Eg : http://vm:1002

5. Build the project.

6. Deploy the solution

7. Open SharePoint site. Site Settings -> Edit Page -> Add New WebPart -> Locate your webpart by the name – >Select Ok.

Now, you will be now able to see the SharePoint list data in your webpart.

Let me know your comments. Thanks.

Posted in MOSS 2007 | Tagged: , , , , , , , , , | 32 Comments »


Posted by Ramprasad Navaneethakrishnan on February 7, 2009

In Silverlight, While using the control MediaElement the error ‘AG_E_NETWORK_ERROR’ might occur when you try to run the page..

Simply put the media source inside your ClientBin directory. This will resolve the issue.

Posted in Silverlight | 4 Comments »

Silverlight 2 DataGrid – Frozen Columns

Posted by Ramprasad Navaneethakrishnan on January 31, 2009

Not long ago, we had a requirement in our project where a datagrid should hold 14 columns, out of which the first column should be static and the remaining should be scrollable.

ASP.NET datagrid does not support such requirements or for that matter no control in ASPNET toolbox. So ultimately we had to deal with multiple tables and messy javascripts to satisfy that requirement. Now that piece of code is difficult to manage and not friendly for change.

Now, Silverlight 2 DataGrid is released which comes with new in-built features like Auto-Sizing, Multiple-Column Sorting, Frozen Columns etc..

Frozen Column:

Forzen Column makes the column to freeze(remain static while other columns are scrolling). When you have 14, 15 columns in a datagrid, you might want the first column or the first two column to remain static while scrolling thorough the other columns.


The FrozenColumnCount property of the Silverlight 2 DataGrid takes the number of columns the user want to freeze starting from the left most column.


This is my Silverlight 2 DataGrid..

<my: DataGrid
</my: DataGrid>

It has 10 columns and by default all the columns are scrollable..

Silverlight 2 DataGrid

Silverlight 2 DataGrid

When FrozenColumnCount is set to 1, the first column will remain static and the scroll bar appears only for the remaining 9 columns.

<my: DataGrid
</my: DataGrid>

this is how the DataGrid looks

Silverlight 2 DataGrid with Frozen Column

Silverlight 2 DataGrid with Frozen Column

In case, if we want to make the first two columns to remain static, then the FrozenColumnCount should be set to 2.

<my: DataGrid
</my: DataGrid>

Silverlight 2 DataGrid with Frozen Columns

Silverlight 2 DataGrid with Frozen Columns

Posted in Silverlight | Tagged: , , , , , , , , , | 1 Comment »