Raghu's SharePoint Corner: 2008

My blog has moved!

You will be automatically redirected to the new address. If that does not occur, visit
http://www.sharepointcolumn.com
and update your bookmarks.

November 14, 2008

Visual Studio 2010 Add Ins For Sharepoint

Recently the GM of Visual Studio announced and demonstrated what are the features and tools that will be included in Visual Studio 2010 for sharepoint.

It was clear that Microsoft is reducind dev effort for sharepoint projects at an random pace.
Here is the brief summary of the tools that will be included in Visual Studio 2010

  • Server Explorer for SharePoint viewing Lists and other artifacts in SharePoint directly inside of Visual Studio

  • Windows SharePoint Services Project (WSP file) Import to create a new solution

  • Added a new web part project item and showed the Visual web part designer which loads a user control as a web part for SharePoint

  • Showed adding an event receiver for SharePoint and using the wizard to choose the event receiver and to just create a source file with that event receiver.

  • Added an ASPX workflow initiation form to a workflow project and showed how this workflow initiation form has designer capability

  • Showed the packaging explorer and the packaging editor which lets you structure the SharePoint features and WSP file that is created


    Want to know more details about Visual Studion 2010 go though the below link and jst wait for 2010 to  be relased :)

    http://msdn.microsoft.com/en-us/vs2008/products/cc948977.aspx


November 13, 2008

How to retrieve User Profile Properties of User From SSP

This article will be concentrating on how to retrieve user profile properties from SSP.In order to retreive user profile properties from SSP you need to first import all the Active Directory users to SSP.

Once the users are imported you can start accessing the user profiles. The following are the assmblies that will be used in order to achieve this

1. Microsoft.Office.Server
2. Micorsoft.Office.Server.UserProfiles
3. Microsoft.Office.Administration
4. And finally Microsoft.SharePoint

using (SPSite site = new SPSite(SSPsiteURL))
                {
                    using (SPWeb web = site.OpenWeb())
                    {
                        UserProfileManager manager = new UserProfileManager(ServerContext.GetContext(web.site));
UserProfile profile = manager.GetUserProfile(web.CurrentUser.LoginName);
                        string deptName = profile["Department"].Value.ToString();
                    }
                }

Department is a user profile property in ssp. Similarly you can access all the properties of a user from ssp

In order to iterate through all the user profiles in ssp, please go through my below post

Happy coding !

GMAIL Video And Audio Voice Chat


Hats off to cool  google applications... Once again google has created a cool application which allows gmail users to have a audio and video voice chat by using GMAIL user interface

You can download the plugin from the below URL



Enjoy Surfing :)



November 11, 2008

Wiki Migration Tool



Migration is a common requirement for all the projects. Recently I had been asked to create a TOOL for migration of wiki articles from different site collection level. The best way of creating a tool is by providing a UI.

All wiki’s which are created resides in a wiki library. Microsoft has defined a set of Basic List Templates for document libraries, custom list, picture library etc. I will be talking here about the basic list template associated with wiki library. There are almost 38 different kinds of basic list templates.

 

The entire wiki document library is associated to WebPageLibrary list template. You can download the tool from the below link

http://www.esnips.com/doc/fb8894cb-26c7-47dd-bb8e-13bea75c991b/WikiMigrationTool


How to use the Wiki Migration Tool


In the source site URL text box enter the top level site URL of the share point site and click show sites. A list of sub sites in the top level sites will be displayed in the list of sites. By clicking on any one of the sites under this list, a list of wiki document library present in this site will be populated.

Specify the destination url is the wiki document library to which the wiki’s need to be migrated. \Click on Migrate Wikis button, within few minutes all the wikis will be migrated. Of course there is scop for improvement for the tool.

I want to thank my friend shiva for giving me knowledge on Basic List Templates

Hope this tool saves some of your time.

October 8, 2008

Iterating UserProfiles in Shared Service Provider (SSP)

Iterating UserProfiles in Shared Service Provider (SSP)

This article deals with retrieving user profiles of all the user that exists in shared service provider. There may be many scenarios where you need to iterate through all the userprofiles that exist in ssp. There is no such method available out of the box in MOSS where you can get list of user in Shared Service Provider. In order to iterate each profile in shared service provider we need to use Ienumerators

I had a scenario where I need to activate features on all the mysites that exist. In order to activate feature on individuals mysite, I first need to check whether the user has a mysite and then activate the feature.

When you are trying to do this you may come across some Permission and Access Denied exception. Here is the links which will help you to solve the issue

http://edinkapic.blogspot.com/2007/08/enumerating-user-profiles.html

You can retrieve users from SSP by using web services. The below code iterates a list of user from SSP

using System;
using System.Collections.Generic;
using System.Data;
using System.Text;
using System.Web;
using System.Collections;
using System.IO;

using Microsoft.SharePoint.Administration;
using Microsoft.SharePoint;
using Microsoft.SharePoint.Utilities;
using Microsoft.Office.Server;
using Microsoft.Office.Server.UserProfiles;
public namespace SSPUsers
{
public class Program
{
static void Main(string[] args)
{
using (SPSite searchSite = new SPSite("http://sspsiteurl"))
{
UserProfile currentProfile;
bool checkPersonalSite;

// Use the ServerContext to get the SSP associated to the site collection of interest

ServerContext context = ServerContext.GetContext(searchSite);

// Get the user profile enumerator for the targeted SSP

UserProfileManager profileManager = new UserProfileManager(context);

long count = profileManager.Count;

IEnumerator enumerator = profileManager.GetEnumerator();

bool continueEnum = true;

while (continueEnum)

{

try

{

continueEnum = enumerator.MoveNext();

}

catch (Exception e)

{

Console.WriteLine("EXCEPTION in enum - try to move to next: " + e.ToString());

continueEnum = enumerator.MoveNext();

}

currentProfile = (UserProfile)enumerator.Current;

}

}

}

The currentProfile object will give you access to all the properties of a user availabel in the ssp

How to Retreive My Sharepoint Sites Links in a Publishing Site

The main theme of this article is to retrive the list of sites to which a user belongs. In a publishing sharepoint site , you have a hyperlink called “My Links”at the top right side of the site, when you click on this link you will get a drop down menu for “My Sharepoint Site”. If you are not getting this then you have not been added to the sites member group. After verifying if you find that you exist in a Sites member group and still the My Sharepoint Sites links are not getting populated in that case wait for few hours or a day. Microsoft has a time job which updates a users My Sharepoint Sites.

I wanted to create a custom menu where I can show a list of site to which a user belongs. There are 2 different approach

1 Is to loop through site collection and check the user membership and permission, if he his authorized then store it in some array list

2.Is try to find out how Microsoft is able to populate My Sharepoint List and follow the same.

I searched a lot on this but found very few article. Paul Liberand as a written a very good blog on this

http://liebrand.wordpress.com/2007/11/29/moss-2007-and-user-memberships/

The Approach which I am discussing is similar.I createa a stored procedure to retrive a list of site to which a user belongs. This stored procedure will be placed in a content database of Shared Service Provider on which the site is hosted

CREATE PROCEDURE [dbo].[proc_MySharePointSites]
(
@userName VarChar(400)
)
AS
BEGIN
SET NOCOUNT ON;
DECLARE @RecordId int
SELECT @RecordId = RecordId FROM dbo.UserProfile_Full WHERE NTNAME = @userName;

EXEC dbo.QuickLinksRetrieveAllItems @RecordId,@ViewerItemSecurity=31,@RequestedItemSecurity=16

END

QuickLinksRetrieveAllItems: It’s a stored procedure defined by microsoft which retrives Quick Links For My Sharepoint Sites. The main input parameter for this stored procedure is the RecordID which is unique for a user in a ssp(please correct me if I am wrong)

dbo.UserProfile_Full : This table consist of list of use in a ssp. You can retrieve a Record ID of any user from dbo.UserProfile_Full table by passing email id, login name or domain name of a user. Once you get a RecrodId you can pass this to the stored procedure proc_MySharePointSites create above and you can easily retrieve a list of a site to which a user belongs.

You can locate the table dbo.UserProfile_Full and the store QuickLinksRetrieveAllItems in the content database of a ssp, which you can open through SQL Server 2005 Management Studio

You can execute the stored procedure and get the list of site to which a user belongs programmatic ally

This is a workaround but not a right approach has it deal with SSP Content database

September 23, 2008

How to create wsp (solution package) using WSPBuilder.exe (WSP Builder Project Template)

The easiest way of create solution package (WSP) is by using WSPBuilder. You can download the WSPBuilder.exe from the link provided below.

Download WSPBuilder.exe

Step 1: Install the wsp builder extensions and create a new project using WSP Builder Project Template


Step 2: The project structure will be as show below

Step 3: Add a feature to the project, Click Project->Add New Item->Select FeatureWithReceiver and click Add, in a similar way add event handler, The strucutre will be as shown below.
Step 4: Perform the coding as requirement and build the project. Inorder to create a wsp file Click Tools->WSP Builder -> Build WSP. A wsp package will be created, the project strucutre under widows explore will show a wsp file as shown below


Step 5: You can deploy solution directly from the tools menu or you can create a deployment folder Called Deployment on desktop,
copy all the required files to this folder. You can deploy using stsadm commands.
a. To add solution use stsadm.exe –o addsolution –filename “FileLocation”
b. To deploy solution use stsadm.exe –o deploysolution –name test.wsp –immediate –allowgacdeployment -force

September 22, 2008

Customization of application.master and default.master

Recently i had been into scenario where i have to change the default top navigation menu provided by MOSS OOB to a customized menu. Typically the navigation menu has site tabs.

I create the user control Menu and started to Integrate with the master page of the site.

I followed the following steps to add a user control to default.master

a.       Register the user control

b.       Import the namespace of the usercontrol

c.      Register the dll of the usercontrol

d.      Commented out the sharepoint:aspmenu  contro with id =”TopNavigationMenu”

e.      Add my user control in the place of the above commented control

f.      Added the dll to the gac

g.      Added safe control entries to the web.config file fo the site.

 I was happy to see the change on my site with new menu control. But that was not my final task, when I clicked on the View All Site Content link on the site, I saw that the my customized menu control was not rendering over this page. Later I found out that all the list level page and site collection level pages had the OOB menu. After searching on net I found a article on MSDN which fixed my problem.

 http://support.microsoft.com/kb/944105


 There are 2 solutions for this problem, since my website was a site collection, I followed the second approach.

 I made the modification in the application. master in the same way as default. master. It worked well for me. Both the approach have certain limitations and disadvantages. If anyone has an alternate approach for this, feel free to leave a comment

September 15, 2008

Create list with lookup column assosciated with the same list or other list.

I had run into a scenario where I need to have a lookup column in the same list and many views which are based on the look up column, at first I thought this is simple to implement, but once I started implementing it, I realized that it’s not so simple. I googled on net to find an alternate for my solution, but the soultions didn’t work for me.

Before entering the implementation part I would like to disccuss about lookup column archintecutre in list. Lookup column has two important attribute lookup list and the lookup field.

Lookup List: Indicates to which list the lookup filed should refer.
Lookup Field: Which column or filed need to be refferd or showed from the list specified above.

As a regular methodology I started implementing the list using feature since it would be easy to maintain views, I created a list using feature, b ut the prob was the lookup comun was not showing up any data. Later I came to know that internally look up column uses list id to keep the track of which list it should reffer. So I googled to find out how we can update the list id of a lookup column. You cannot update the lookup column using OOB UI if you have created a list using feature or list template. I went through the following blogs

1. http://www.sharepoint-tips.com/2007/04/fixing-lookup-fields-in-list-definition.html

2. https://www2.blogger.com/comment.g?blogID=20371103&postID=4251369915225974613

Since the lookup column requires List ID, there was no point in creating list using feature because the list id will be known only when the list is created.

I thought of another alternate is to create a list using feature and than to delete and create lookup column again by programmatically, but by doing this all my views related to the lookup column failed and when I tried to create a new item in the list, all the column which were created were not visible in the newform.aspx.

Finally I came up with a solution, which has a nice amount of coding effort. The solution was to create a list, lookup column and views programmatically (using code).

Here’s the code to fix the solution of Lookup Column in the same list.
SPList list = web.Lists[listName];
list.Fields.AddLookup("ParentMenu", list.ID, false);
SPFieldLookup parentMenu = (SPFieldLookup)list.Fields.GetField("ParentMenu");
parentMenu.LookupField = "MenuName";
parentMenu.Update();
list.Update();

Here’s the code to fix the solution of Lookup Column in other list.
SPList list = web.Lists[listName];
SPList newlist = web.Lists[newlistName];
list.Fields.AddLookup("ParentMenu", newlist.ID, false);
SPFieldLookup parentMenu = (SPFieldLookup)list.Fields.GetField("ParentMenu");
parentMenu.LookupField = "ColumnInNewList";
parentMenu.Update();
list.Update();

This is a work around and a long approach, feel free to respond or comment if u have any other alternate or better solution.

How To Create List Programmatically using Custom List Template (OOB)

How To Create List Programmatically using Custom List Template (OOB)
There are many ways to create a list as follows
1. Creating list Using OOB UI.
2. Creating list Using List Templates
3. Creating list Using Features
4. Creating list programmatically or by a code behind approach
Programmatically a list can be created by writing a console application or by creating exe. The advantage of creating list programmatically will also help you tp retain lookup column in the same list or some other list. I will be discussing regarding lookup column in my next article
This article is written to create a list using out of the box (OOB) custom list template using a code behind approach.The snippet belows shows how to create a list.

SPSecurity.RunWithElevatedPrivileges(delegate()
{
using (SPSite site = new SPSite("siteurl”))
{
SPWeb web = site.OpenWeb();

web.AllowUnsafeUpdates = true;
Console.WriteLine("Creating Menu List..");

Guid listGuid = web.Lists.Add("ListName”, "Menu Contents For Intranet", SPListTemplateType.GenericList);
}
});
Console.WriteLine("List Created...");

The SPListTemplateType has all the OOB cusotm list template such has Announcements, Tasks, Comments etc. The GenericList is a custom list template which I have used in my code

How To Create List Programmatically using Custom List Template (OOB)

How To Create List Programmatically using Custom List Template (OOB)

There are many ways to create a list as follows
1. Creating list Using OOB UI.
2. Creating list Using List Templates
3. Creating list Using Features
4. Creating list programmatically or by a code behind approach

Programmatically a list can be created by writing a console application or by creating exe. The advantage of creating list programmatically will also help you tp retain lookup column in the same list or some other list. I will be discussing regarding lookup column in my next article
This article is written to create a list using out of the box (OOB) custom list template using a code behind approach.The snippet belows shows how to create a list.

SPSecurity.RunWithElevatedPrivileges(delegate()
{
using (SPSite site = new SPSite("siteurl”))
{
SPWeb web = site.OpenWeb();

web.AllowUnsafeUpdates = true;
Console.WriteLine("Creating Menu List..");
Guid listGuid = web.Lists.Add("ListName”, "Menu Contents For Intranet", SPListTemplateType.GenericList);
}
});
Console.WriteLine("List Created...");

The SPListTemplateType has all the OOB cusotm list template such has Announcements, Tasks, Comments etc. The GenericList is a custom list template which I have used in my code

September 9, 2008

Best Practices and Resources For Custom Coding, Perfomance and Capacity Planning

Best Practices and Resources For Custom Coding, Perfomance and Capacity Planning

Perfomance of a MOSS site is the most important factor for a MOSS site. Its not so easy to write custom application using Sharepoint Object MOdel.
Recently Microsoft has Added technical articels as follows

Performance and Capacity Planning Resource Center for SharePoint Server 2007

This page contains resources to help you with performance and capacity planning for your SharePoint Server deployment—map your solution design to a farm size and set of hardware that supports your business goals.

http://technet.microsoft.com/en-us/office/sharepointserver/bb736741.aspx

Best Practices Resource Center for SharePoint Server 2007
To avoid common pitfalls and keep your Office SharePoint Server 2007 environment available and performing well, follow these best practices based on real-world experience from Microsoft Consulting Services and the product team.

http://technet.microsoft.com/en-us/office/sharepointserver/bb736746.aspx

Best Practices: Common Coding Issues When Using the SharePoint Object Model

http://msdn.microsoft.com/en-us/library/bb687949.aspx

September 8, 2008

MCTS: Microsoft Office SharePoint Server 2007 Configuration Study Guide: Exam 70-630

Hi Friends,

People who are interested in doing certification in Microsoft Office Sharepoint Server 2007 Configuration and seeking a  book for preperation of exam, can download the book from the follow below link


I searched a lot to get a book of 70-630 and finally ended up by finding this book.. 
Hope this would help many to prepare for the exam 
ALL THE BEST

September 5, 2008

Google Chrome 0xc0000005 Error

Google is unveiling its own New Browser christened as “Google Chrome” – This is gonna be a interesting fight now!! 
You can download the google chrome from the google web site
Here goes the link http://www.google.com/chrome

As always there is a Google touch in this browser as well.

In my opinion, The Architecture of Chrome is built upon an entirely different approach than the browsers we have in the market

 

-          looks like they have designed the browser with Process Isolation instead of multi-threading == STABILITY + SECURITY

-          And they are using WebKit for Rendering UI (used by Android)  == SPEED

-          V8 Core Engine == AMAZING JAVASCRIPT PERFORMANCE + BETTER INTERACTIVE WEB APPS

-          Omnibox == MORE USABILITY

-          SandBoxing per Process == REMOVAL OF PROCESS BOUNDARY BUT WITH SECURED RIGHTS [MALWARE CAN COMPUTE BUT CANNOT TOUCH COMPUTER RESOURCES]

-          Integration with Google Gears == EXTENSIBILITY

 

Seems to have a pretty solid foundation w.r.t Design and Architecture… 

I faced few problems after the installation of google chrome, Got a pop up message saying "Failed to Initialize the application properly", was totally annoyed after seeing this message. This was my first installation of google chrom on my laptop. Later consulted with my colleagues many of them had the same problem, and this was due to Symantec End Point Protection i guess.. Following was the tweak performed to get it working

 

Use the following:

 

-------

1.       Right-click the shortcut for “Google Chrome” on your desktop and goto “Properties”.

2.       In the target field, append “--no-sandbox” and Save.

-------

And if the above doesn’t work – then try:

-------

1.       Back up the registry on an affected system.

2.       Open the registry on the Agent system by entering regedit from a run prompt.

3.       Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services \SysPlant.

4.       Open the Start DWORD.

5.       Change the value to 4 to disable the drivers.

6.       Reboot the system to commit the changes. It started working fine after restarting the system. I followed the 2 nd step. Enjoying surfing Using Google Chrome



June 27, 2008

Parser Error: Direct Dependencies and The Limit Has Been Exceeded

Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.





Parser Error Message: The page '/sites/blah/_catalogs/masterpage/blah.master' allows a limit of 11 direct dependencies, and that limit has been exceeded.

During deploying user control on the master page, in one of our project I used to get the above error. Generally such kind of exception is thrown will rendering a page. The reason behind this is the number of controls allowed on the page to render exceeds the limit specified in the web.config file



The solution of this problem can be fixed in two different ways.
Solution 1: Modify the control dependencies in the web.config file.
Solution 2: Optimize the usage of controls on the master page; this can be done either by deleting the duplicates, or integrating 2 or more control in one control.
The solution 2 is a complex one, where as the solution 1 is a simple modification as show below


Search for the following tag in the web config file and chage the DirectFileDependecies

<- SafeMode MaxControls="200" CallStack="true" DirectFileDependencies="20" TotalFileDependencies="50" AllowPageLevelTrace="false">
By default the DirectFileDependecies will be set to 10, you can change to any limit u require.

June 13, 2008

Integrating AJAX Control Toolkit with SharePoint

So far you have configured SharePoint to support AJAX, In order to use Ajax Control Toolkit You need to do the following two modifications to web. Config file of the site.

1.You need to register Ajax Control Toolkit assembly, add the following tag in the <-assemblies> section
<-add assembly ="”AjaxControlToolkit," version ="1.0.10618.0," culture =" neutral," publickeytoken =" 28f01b0e84b6d53e”">
Please Note: For future release the version number changes
2.Add the following tag under the <-controls> section of the <-pages>
<-add namespace="”AjaxControlToolkit”" assembly ="”AjaxControlToolkit”" tagprefix="”ajaxToolKit”">

June 3, 2008

Performance Tuning Using GZIP

Performance Tuning By Enabling HTTP Compression Using GZIP
NOTE: Make sure that you are logged in with an account that has Administrator rights onto the server.
Enabling HTTP Compression on your Windows 2003 Server.
Step 1: Open IIS manager, type “inetmgr” on the run command, you will see IIS Manger window opened.


Step 2: Right click on your local computers, click properties and check mark the box for “Enable direct Metabase Edit” as shown in the figure below and click ok.

Step 3: Expand the server node, right click on the websites node and click properties, you will get a window opened as shown below


Step 4: Click on the service tab on the website properties window, check mark the boxes for compression application files and compress static files under HTTP Compression and click ok



Step 5: Right click on the Web service Extension node on the right pane of the IIS Manager, click on add button, you will get a pop up window for new web service extension, in the extension name textbox type name has HTTP Compression as shown below
Step 6: Click on the Add button on the New Web Service Extension properties window, you will get a add file pop up window, click browse button on the add file popup, A open window dialog box will appear, navigate to “C:\WINDOWS\system32\inetsrv”, click on the file gzip.dll on the open window and click open, click ok, check mark the box “Set extension status to allowed” and click ok.




Step 7: Configure Metabase.xml, Open up Windows Explorer and go to C:\Windows\System32\inetsrv. Find MetaBase.xml and make a copy (you can just highlight it and do a Ctrl-C, then a Ctrl-P to make a copy of MetaBase.xml). Now open up MetaBase.xml in a text editor. Find the section. Be careful, there are two sections here: one for deflate and one for gzip. We want gzip so the Location attribute of the element will have the following value:
Location ="/LM/W3SVC/Filters/Compression/gzip"

Step 8. Look for the HcScriptFileExtensions section. Your default should have: asp, axd, and exe. Now add aspx file extension as shown below.
Step 9: Finally close all the windows and reset the IIS.

May 20, 2008

Ajax Integration With Microsoft Office Sharepoint Server

ü MOSS 2007 (installed with site collection created on port: 80)
ü Visual Studio 2005
ü
SharePoint 2007 Extensions for Visual Studio 2005
ü
ASP.NET 2.0 AJAX 1.0
ü
Ajax Control Toolkit

Configuring Web.config file for the site which you have created.
1.Edit your SharePoint web.config file on which you are going to deploy Ajax based web parts, typically in a directory like C:\inetpub\wwwroot\wss\virtualdirectories\80

2.Add the following Section Group tag under the <-configSections>
<-configSections>
<-sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<-sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<-section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/> <-sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<-section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="Everywhere" />
<-section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication" />
<-section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication" />



3. Add a <-controls> section as a child of the <-system.web>/<-pages> tag.
<-pages>
<-controls>
<-add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>


4. Add the following tag to the tag, within :
<-assemblies>
<-add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>


5. Add some new registrations to the end of the <-httpHandlers> section:
<-httpHandlers>
<-add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<-add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<-add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>

6. Add a new registration to the HttpModules section, beneath any existing registrations.
<-httpModules>
<-add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

7. Add a SafeControl entry for the System.Web.UI namespace from Microsoft Ajax Extensions, within the <-SharePoint>/<-SafeControls>section:
<-SafeControls>
<-SafeControl Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Web.UI" TypeName="*" Safe="True" />


8. Finally, add the following configuration tags at the bottom of web.config, near the bottom before the end <-configuration> tag.
<-system.web.extensions>
<-scripting>
<-webServices>
<-!-- Uncomment this line to enable the authentication service. Include requireSSL="true" if appropriate. -->
<-!-- <-authenticationService enabled="true" requireSSL = "truefalse"/>
-->
<-!-- Uncomment these lines to enable the profile service. To allow profile properties to be retrieved and modified in ASP.NET AJAX applications, you need to add each property name to the readAccessProperties and writeAccessProperties attributes. -->
<-!-- <-profileService enabled="true" readAccessProperties="propertyname1,propertyname2" writeAccessProperties="propertyname1,propertyname2" />
-->

<-!-- <-scriptResourceHandler enableCompression="true" enableCaching="true" />
-->
<-/scripting>
<-/system.web.extensions>
<-system.webServer>
<-validation validateIntegratedModeConfiguration="false"/>
<-modules>
<-add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

<-handlers>
<-remove name="WebServiceHandlerFactory-Integrated" />
<-add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<-add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<-add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<-/handlers>
<-/system.webServer>


Add The Script Manager To Master Page Of The Site
This is done in order to avoid multiple script managers on the same page

1. Open the master page from the SharePoint Designer under _catalogs folder
Ex:
http:machinename:8888/_catalogs/masterpage/default.master
2. Add the following tag (preferably below <-WebPartPages:SPWebPartManager id="m" runat="Server" />)
<-asp:ScriptManager runat="server" ID="ScriptManager1">

May 7, 2008

Steps to install MOSS (Microsoft Office SharePoint Server 2007) on Windows 2003 (How to install MOSS?)

This article mainly concentrates on how to create a Development environment for Microsoft Office SharePoint Server 2007.This article would give you a brief idea about the installations steps required for MOSS.

NOTE: I would assume that reader of the article has prior installation experience on how to install SQL Server 2005 and Visual Studio 2005 has this article will not be covering the installation detail for SQL and Visual Studio.
Software Requirement:
a. Windows Server 2003 and Windows Server 2003 Service Pack 2.
b. Microsoft Office 2007 Enterprise Edition (Excel Services Feature will be available only in Enterprise and Higher versions) or Standard Edition (Excel Services Will Not be Available).
c. MOSS Enterprise Edition (Excel Web Services only in Enterprise Edition) or Standard Edition (Excel Web Services Will Not be Available).
d. SQL Server 2005 Developers Edition.
e. Ajax Extension Setup and Ajax Control Toolkit.
f. Visual Studio 2005 Professional Edition.
g. Dotnet Framework 3.0.
h. WSS Service Pack 1.
i. Office Server 2007 Service Pack 1.
j. Windows SharePoint Services 3.0 Tools: Visual Studio 2005 Extensions(VSeWSS)

Installation Steps:
The complete installation would require a space minimum of 15GB on your C drive. So it would be better to create a C Drive of 20GB space.
Step 1: Install Windows 2003 Server standard or enterprise edition, after installation completes install Windows 2003 service pack 2. Finally install IIS for windows 2003. If you require active directory authentication for MOSS, Create a domain name server and create user and configure your client machine.
Step 2: Once the Windows 2003 is configured completely install Microsoft Office 2007 Enterprise or Standard Edition depending upon your requirement of Excel Services, SQL Server 2005 and Visual Studio 2005.
Step 3: Install ASP.net Ajax Extension which will be used in my next blog which describes how to perform Ajax Integration with MOSS
Step 4: Install Dotnet Framework 3.0(WSS) which is a prerequisite for MOSS installation.
Step 5: Install WSS 3.0 Tools for visual studio 2005 extensions.
Step 6: This step would describe in detail how to install MOSS 2007
i. Insert the MOSS Enterprise Edition CD and run the setup.exe file, a insert product key windows pop’s up as shown below, enter the key and click continue



ii. Next you will get a license pop up window, select the “I accept the terms of this agreement “ check box and click continue



iii. Next screen which you will be getting is the type of installation, click on the “Advanced” button
iv. Next window which you will be getting is the Server Type window select the “stand alone” radio button and click install now.


v. The installation continues with a progress bar window finally once the installation is complete, it automatically runs the SharePoint Product and Technology wizard.


vi. After installation has completed, you'll be given the chance to run through the SharePoint Products and Technologies Configuration Wizard.You'll use this wizard to commit the initial configuration options for your new SharePoint farm.

You will get a prompt restarting some services during installation click on yes button.

vii. Next you will get a server farm configuration window, select “No, I want to create a new server farm” and click next.


viii. A configuration database settings windows comes up enter the details according to your requirement and click next, you will get a window to configure sharepoint central administration web application, choose the NTLM as authentication provider and click next.




ix. A windows is displayed which shows configuration for SharePoint product and technologies. After the completing the configuration of all the 9 tasks, Sharepoint Cetral Administration will be up.


x. Once the SharePoint central administration is up and running you can configure the services running on it.