Raghu's SharePoint Corner: May 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.

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.