in

SharePoint Blogs

The Best Place for SharePoint-related Blogs

adnan's blog

  • Best Practices forProject Server 2007 Large Server Farm Deployment with Office SharePoint Server 2007

    I have posted an article, which cover the key steps required to deploy Project Server 2007 on Large Server Farm with MS Office SharePoint Server 2007.
     
    You can find this post on by Project Server Blog Site:
     
  • Integration of Project Server 2007 with MOSS 2007 on a two separate servers

    Last week, I came across a problem on How to integrate Project Server 2007 with an existing SharePoint Portal Server 2007 installation in such a way that Project Server Workspace will create on SPS box and Project Server will get benefit from SharePoint Enterprise Features expecially Enterprise Search and possibly Form Services in the future.

     Microsoft has released three types of scenarios but none of them address this issue. I am still struggling to provide a recoommended solution for this approach. If any body came across similar type of issues, please feel free to share your experience.

     Last week, I have also launched a community site (http://www.projectservergurus.com/) for Project Server folks to share their ideas and find useful resource on one platform. If any one of you want a blog on my site, please do let me know at adnan@projectservergurus.com.

    Please do visit my site and give your feedback.

     

     

  • Extending SharePoint Server 2007 by using Features

    I have posted an article on CodeProject.com, discussing about Feature Framework and how can we use Features to associate events.

    See detail here: http://www.codeproject.com/spoint/ExtendingSPS.asp

     

  • How to install Server Admin Templates for WSS 3.0/MOSS 2007

    Microsoft has released 20 server admin templates for windows SharePoint services. Server admin templates were created as site definitions, enabling tighter integration and enhanced functionality within the Windows SharePoint Services platform. They require a server administrator to install. These templates include:

    ·         Absence Request and Vacation Schedule Management

    ·         Budgeting and Tracking Multiple Projects

    ·         Bug Database

    ·         Call Center

    ·         Change Request Management

    ·         Compliance Process Support Site

    ·         Contacts Management

    ·         Document Library and Review

    ·         Event Planning

    ·         Expense Reimbursement and Approval

    ·         Help Desk

    ·         Inventory Tracking

    ·         IT Team Workspace

    ·         Job Requisition and Interview Management

    ·         Knowledge Base

    ·         Lending Library

    ·         Physical Asset Tracking and Management

    ·         Project Tracking Workspace

    ·         Room and Equipment Reservations

    ·         Sales Lead Pipeline

    How to install Server Admin Templates for WSS 3.0/MOSS 2007 

     

    • Download 20 server templates from here.
    • Create a temp folder in C:\drive i.e.c:\temp\
    • Run ServerAdminTemplates.exe file to extract server templates files in C:\temp\ folder.
    • Copy the follwing command lines in a notepad file to create a batch file. 

    call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution  -filename "C:\temp\AbsenceVacationSchedule.wsp"
    call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "AbsenceVacationSchedule.wsp" -allowgacdeployment -immediate -force
    call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution  -filename "C:\temp\ApplicationTemplateCore.wsp"
    call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution  -name "ApplicationTemplateCore" -allowgacdeployment  -allowgacdeployment -immediate -force
    call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution  -filename "C:\temp\BudgetingTrackingMultipleProjects.wsp"
    call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "BudgetingTrackingMultipleProjects.wsp" -allowgacdeployment -immediate -force
    call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution  -filename "C:\temp\BugDatabase.wsp"
    call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "BugDatabase.wsp" -allowgacdeployment -immediate -force
    call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution  -filename "C:\temp\CallCenter.wsp"
    call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "CallCenter.wsp" -allowgacdeployment -immediate -force
    call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution  -filename "C:\temp\ChangeRequest.wsp"
    call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "ChangeRequest.wsp" -allowgacdeployment -immediate -force
    call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution  -filename "C:\temp\ComplianceProcessSupport.wsp"
    call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "ComplianceProcessSupport.wsp" -allowgacdeployment -immediate -force
    call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution  -filename "C:\temp\ContactsManagement.wsp"
    call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "ContactsManagement.wsp" -allowgacdeployment -immediate -force
    call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution  -filename "C:\temp\DocumentLibraryReview.wsp"
    call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "DocumentLibraryReview.wsp" -allowgacdeployment -immediate -force
    call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution  -filename "C:\temp\EventPlanning.wsp"
    call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "EventPlanning.wsp" -allowgacdeployment -immediate -force
    call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution  -filename "C:\temp\ExpenseReimbursementApproval.wsp"
    call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "ExpenseReimbursementApproval.wsp" -allowgacdeployment -immediate -force
    call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution  -filename "C:\temp\HelpDesk.wsp"
    call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "HelpDesk.wsp" -allowgacdeployment -immediate -force
    call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution  -filename "C:\temp\InventoryTracking.wsp"
    call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "InventoryTracking.wsp" -allowgacdeployment -immediate -force
    call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution  -filename "C:\temp\ITTeamWorkspace.wsp"
    call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "ITTeamWorkspace.wsp" -allowgacdeployment -immediate -force
    call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution  -filename "C:\temp\JobRequisition.wsp"
    call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "JobRequisition.wsp" -allowgacdeployment -immediate -force
    call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution  -filename "C:\temp\KnowledgeBase.wsp"
    call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "KnowledgeBase.wsp" -allowgacdeployment -immediate -force
    call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution  -filename "C:\temp\LendingLibrary.wsp"
    call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "LendingLibrary.wsp" -allowgacdeployment -immediate -force
    call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution  -filename "C:\temp\PhysicalAssetTracking.wsp"
    call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "PhysicalAssetTracking.wsp" -allowgacdeployment -immediate -force
    call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution  -filename "C:\temp\ProjectTrackingWorkspace.wsp"
    call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "ProjectTrackingWorkspace.wsp" -allowgacdeployment -immediate -force
    call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution  -filename "C:\temp\RoomEquipmentReservations.wsp"
    call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "RoomEquipmentReservations.wsp" -allowgacdeployment -immediate -force
    call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution  -filename "C:\temp\SalesLeadPipeline.wsp"
    call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "SalesLeadPipeline.wsp" -allowgacdeployment -immediate -force

    • Run the batch file.
    • Reset IIS.
    • Now go to Site Action and click Create Site. You will see list of server admin templates inside "Application Templates" tab, see figure below:

    Note: Make sure that "Windows SharePoint Services Administration" is running on the SharePoint Server.
     

  • Summary of Sessions covered in Microsoft EU SharePoint Conference

     

    I have tried to summarise the main points covered in Microsoft EU SharePoint sessions for those who didn’t get a chance to attend the conference and hopefully it will be interested for you to remember before new MOSS 2007 implementation.

    §  WSS Object Model

    o   .NET Reflector     www.aisto.com/roeder

    o   WSS 3.0 Assembly: Microsoft.SharePoint.dll

    o   MOSS 2007 Assembly: Microsoft.Office.Server.dll

    o   If you want to access list item then the class hierarchy would be as follows:

    §   SPFarm à SPWebServer à SPWebApplication à SPSite à SPWeb à SPList à SPListItem

    o   3rd Party Tool available to browse SharePoint Hierarchy

    §  SharePoint Explorer

     

    o    How to access SPSite Object

    §  If you don’t have a context

    SPSite sitecollection1 = SPContext.Current.Site;

    §  If you have a context

    SPSite sitecollection1 = new SPSite (@”http://litwareinc.com”);

    o   Always dispose SPSite or SPWeb objects.

    o   Best Practice: Always test your web part with least security permission

    o   Impersonation:

    Impersonate with an account which has privileges e.g.

    SPUser user = SPContext.Current.Web.Users [@”litwareinc\administrator”];

    Here litwareinc\administrator is an administrative account in SharePoint.

    o   Query with CAML

    §  Best Practice and recommended approach to use CAML Query to access SharePoint Objects like list, document library etc

    §  Class available

    ·         SPQuery

    ·         SPSiteDirectory

    §  Query Scope

    ·         Recursive to a web site

    ·         All Site Collection

    §  Remote connection using web service

    ·         http://[portal]/_vti_bin/Lists.asmx

    o   Event Handler

    §  Cancel able Event

    ·         Now you can access an event, which can be used to cancel the deletion of a document of list item etc.

    o   New Classes in WSS Object Model

    §  Navigation

    §  Audit

    §  Content Type

    §  Disaster Recovery

    o   Content Recovery

    §  Options available in SharePoint 2007

    ·         Recycle Bin (End User and Admin), Versioning, Web Delete Event

    o   Recycle Bin

    §  Pros:

    ·         Individual Document, List Item, document library, lists can be recovered either through end user recycle bin and even can be recovered if deleted from end user recycle bin from Site Collection recycle bin.

    ·         No need Database administrator intervention to recover individual document

    ·         No need to use 3rd party component like CommVault for SharePoint to recover individual item

    §  Cons

    ·         No facility to recover Content Type, Site Column, Site, Site Collection

    o   Versioning

    §  Cons:

    ·         No Support for folder, website

    ·         Functionality needs to be turned own per list or document library

    o   Web Delete Event

    SharePoint Object Model allows developer to develop custom build backup solutions by using Web Delete Event.

    §  Pros

    ·         Extensible

    §  Cons

    ·         No out of the box solution

    ·         Will have to write code

    o   SMigrate Tool

    §  This tool is now obsolete in SharePoint 2007-02-17

    o   Content Migration Options by using STSADM Command Line Tool

    §  Pros:

    ·         STSADM Import and Export Routine can migrate contents of a site or site collection

    §  Cons

    ·         Cannot migrate workflow, alerts, feature solutions, recycle bin state etc.

     

    o   WEB UI based SharePoint Backup/Restore Option

    §  Pros:

    ·         Best suited for Small/Medium size organisation

    ·         Can take backup of individual web application or whole farm

    ·         UI based tool

    §  Cons

    ·         No out of the box scheduling mechanism

    ·         High restore time

    ·         Low availability

     

    o   High Availability Solution

    §  Database Clustering and Log Shipping

    §  Active Passive Mirror Farm

    ·         Note: Secondary should be read-only e.g. Auditing should be turned off on secondary farm

     

    §  40 New Site Templates and 7 Role bases My Sites

     

    o   Microsoft recently released 20 site templates and hopefully remaining 20 templates will be releases in the coming weeks.

    o   First 20 templates are STP files and remaining 20 would be site definitions, so user can customise them and source code will be available.

    o   1 Role based MySite is released and remaining 6 My Site templates will be released till May 2007.

    o   Now Microsoft Support will also be provided for 40 site templates.

    o   You can create new site based on site templates and can still use your own default.master page, in order to use same look and feel of your site.

    §  WSS Site Customisation

     

    o   Master Page user core.css file for style sheet

    o   Custom CSS files are stored in _styles folder.

    o   Master Page defines “Place holders”, which can be overridden by using SharePoint Designer 2007.

     

    §  Developing Visual Studio Workflows and Activities for SharePoint Sites

     

    o   Limitation of using SharePoint Designer: You cannot associate workflow with Content Type

    o   Visual Studio Tools for Office (VSTO) soon to be released, which includes new templates for workflow

    o   Requirement

    §  Visual Studio 2005 Extensions for Workflow Foundation (RC5)

    §  SharePoint 2007 SDK

    §  Visual Studio Templates for SharePoint Workflow

    §  Create Project of Type “SharePoint Sequential Workflow Library”

    o   Steps required to build workflows by using VS.NET

    §  Create workflow project in VS.NET 2005

    §  Model Workflow in Visual Studio

    §  Create and bind InfoPath Form

    §  Sign and build the assembly

    §  Deploy to SharePoint Server

    §  Debug the assembly by attaching the w3wp process

     

    §  Capacity Planning

    o   Factors directly affecting the Performance

    §  Content Query Web Part -- Use it when its absolutely essential

    §  Item Level Permission  -- Use it when its absolutely essential

    §  More than 2000 list items per library without using Folders – use folders in a list for more than 2000 items.

    §  IFilters can seriously affect server performance. Care should be taken when selecting 3rd party iFilters

    §  No. of domain controllers per web application - - 3 Front End Web Server to 1 Domain Controller using NTLM is for optimal performance.

     

    o   Authentications affect performance in the following order:

    §  Anonymous     --- Fastest authentication

    §  Kerberos

    §  NTLM

    §  Basic

    §  Form   -- Slowest authentication

    o   Latency

    §  Server Processing (40%)

    ·         #SQL round trips, AJAX Processing, Security Trimming

    §  Client Processing (45%)

    ·         JavaScript, CSS, AJAX requests, HTML load, client machines specifications

    §  Wire Transfer (5%)

    ·         Bandwidth, Size of download

     

    o   Latency Recommendations

    §  Test custom web parts thoroughly and take extra attention on object lifecycle.

    §  Test custom web parts on testing machines first, then deploy on production server

    §  Re-user existing client side code versus adding more

    §  Design Code for performance e.g. HTML table definitions

    §  Profile your solution

     

    o   Data Scale Recommendations

    §  Minimise # of web applications and application pools

    §  Limit # shared service providers

    §  Plan for database growth

    §  Follow data and feature best practices and suggested limits

    §  Use 3 worker processes for web applications and 2 work processes for Shared Services

    §  Note: STSADM command line tool uses existing worker process, so if you use only one worker process for web application then STSADM tool will use the same for processing.

    §  Performance Guide Lines

     

    Item Scope Guideline
    Site Collections Database 50,000
    Web Sites Site Collection 250,000
    (Sub) Web Sites Web Site 2,000
    Lists Web Site 2,000
    Items List < 200,000
    Documents Document Library 50,000
    Documents Folder 2000
    Document Size File 50 MB
    Indexed Documents (MOSS) SSP 50 M
    Search Scopes (MOSS) Site Collection 1000
    No. of Profiles (MOSS) SSP 5 M
    Content Database Size Site Collection 50 GB (Optimal 25 GB)

     

    §  Features don’t scale across site collections

    ·         Content Types

    ·         Shared Columns

    ·         Content by Query Web Part

    ·         Workflow

    ·         Information Management and Retention Policies

    ·         Document Links

    ·         WSS V3 Search cannot spread across site collection

    ·         Site Quotas

     

    §  Possible approach for Taxonomy Design

    ·         Create 1 Site Collection per department or business unit like HR Site, Sales, Projects Site etc and limit the content to 50 GB

     

    §  Improved Disaster Recovery and Performance

    ·         Database Server: Plan for 1.2 à 1.5 * file system size for SQL Server

    ·         Index Server: 30% of total size of all contents

    ·         Query(Search) Server: Same size as Index Server

    ·         Use 64 bit Servers

     

    §  Other performance Recommendations

    ·         Scale the servers in the following order:

    o   64 bit SQL Server first

    o   64 bit Index and Application Servers

    o   64 bit Web Servers

    o   Note:

    §  All web servers should be either 32 or 64 bit system. (Don’t Mix the combination)

    §  You can’t attach more than one Index Server.

     

    ·         Use Built-in Cache Mechanism

    o   Site Collection Cache Profiles

    o   Web Page Out put Cache

     

    §  Test the Solution before Deployment

    ·         Use Visual Studio 2005 Tool for MOSS 2007 Load Test (This plug-in is only available with Server tester Version)

    ·         Use WSSDW Command Line Tool

    §  Web Content Management

       o   Variations

    By using variations in Web Content Management, you can create multi-lingual sites. English can be a source label and German and French can be a target labels. If you will create a page in English, it will automatically be created in target languages. Then content editor can translate these pages at his convenience.

    Note: variation is one direction process and is always from source to target (can be multiple targets), but a page created in target language cannot be created in a source label. Source label will always be a language in which MOSS 2007 is deployed.

    §  InfoPath Development

     

    o   New Features In InfoPath 2007

    §  Form Template Parts

    ·         Piece of form that can be used across forms (.xtp file format)

    ·         Template part should not contain managed code.

    §  Design Checker

    ·         Checks the compatibility of form on the browser

    §  Logic Inspector

    ·         To help debug declarative business rules.

     

    §  Business Data Catalogue (BDC)

     

    o   BDC comes with enterprise edition of MOSS 2007.

    o   BDC can connect to OLEDB databases like Oracle, SQL Server via ADO.NET or LOB System like SAP, SIEBEL via web service.

    o   BDC columns can be used as a column in List or document library.

    o   Pre-requisite

    §  Communication

    ·         SOAP for LOB applications like SAP or SIEBEL

    ·         ADO.NET for OLEDB databases

    §  Authentication

    ·         MOSS 2007 SSO

    ·         Kerberos

    §  Composition

    ·         LOB vendor middleware

    o   SAP Enterprise Services

    ·         Biz Talk Server

    ·         3rd Party Middle Ware

    o   Sitrion iQL

    ·         Custom Components

    o   Useful site for BDC

    §  http://www.mossbdcmetadatamanager.com

    §  CodePlex, GotDotNet etc

     

     

    §  Deploying Project Server 2007 with MOSS 2007

    o   Deployment Options

    §  Project server 2007 with WSS 3.0

    §  Project Server 2007 with MOSS 2007

    Note: Project Server 2007 can be used with SQL Server 2000 or SQL Server 2005 as back-end database.

     

    o   Project Server 2007 Databases

    §  Draft

    §  Published

    §  Archived

    §  Reporting

    Note: Draft, Published, Archived must on the same SQL Server Box but Reporting database can point to any other SQL Server.

    o   Project Server does not manage username and password anymore, but you can still use form authentication with Project Server 2007.

     

     

  • Microsoft SharePoint EU Conference 2007

    Last week, I attended Microsoft SharePoint EU Conference held in Berlin. It was fascinating moment for me to meet SPS gurus came for Europe and across America and Canada.

     

    Most of the sessions were excellent except some of those presented by Microsoft Partners. Especially sessions of Patrick from U2U, Steve Smith from Combined Knowledge, Mike Ammerlaan, Steve Heaney from Ninetex, Bob Sutton from Microsoft, Arphan Shah was worth while to spend time and audience took special attention of the demos.

     

    Below are some of the pics taken during the session and a dinner arranged by Microsoft.

     

     

     

     

     

     

     

     

     

  • Move MOSS 2007 Web Application to another server

    How to migrate MOSS 2007 Web Application to across servers

    SharePoint Portal Server 2007 central administration provides web interface to take Web Application (formerly called portal site in SPS 2003) backup and restore, but sometime, database restore fails due to number of reasons. The work around to move SharePoint 2007 web application is to take content database backup and restore it on destination (either same or different domain) and attach the database by using STSADM command line tool.

    Steps required moving web application is defined below:

    Step # 1: Identify Content Database (s) of Web Application

    • Open MOSS 2007 Central Administration
    • Go to "Application Management" Tab and Click link "Site Collection List" under "SharePoint Site Management".
    • You can Content Database Name under database column as shown in the figure below.

    Step # 2: Content Database Backup

    • After identifying the content database in the previous step, take the identified database backup by using SQL Server 2005 Management Studio.

    Step # 3: Restore Content Database on Destination Server

    • Logged into Destination Server and restore content database by using SQL Server 2005 Management Studio

    Step # 4: Create New Web Application on Destination Server

    • Open MOSS 2007 Central Administration on destination server.
    • Go to "Application Management" Tab and Click link "Create or extend Web Application" under "SharePoint Web Application Management".
    • Next Screen click "create a new web application".

    Step # 5: Detach/Remove Content Database of Web Application

    • Click "Content Databases" under "SharePoint Web Application Management" on Application Tab.
    • Next Page, Select you’re newly created web application and then click content database as shown in the figure below.

    Note:  Normally content database name is WSS_Content_[GUID].

    • Next Page, Choose "Remove Content Database", you will get a warning message.
    • Click "OK".

    See figure below:

    • Click "OK" button at the bottom of the page to remove content database.

    Step # 6: Attach Content Database of Web Application

    • Now there is no content database associated with web application.
    • In order to attach content database restored on Step # 3, we will use STSADM command line tool.
    • Open Command Prompt, navigate to folder "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\"

    ·         Run the following Command:

            stsadm -o addcontentdb -url [http://webapplication:port] -databasename [WSS_Content_GUID] -databaseserver [Database Server Instance]

    • Replace URL, databasename and database server name according to your scenario.
    • After running the command you will get a message “Operation completed successfully”.
    • Now restart IIS by running IISRESET Command on command prompt.

    Browse the web application again and you will see that web application is restored successfully with full functionality.

  • HOWTO: Restore deleted user profiles of SharePoint Portal Server 2003

    Restoration of SharePoint is always a mission critical task. You need to give full attention to the procedure that you will follow and you need rollback plan as well, if anything goes wrong.

    I face this problem, when someone deleted (I presume) the user profiles and approx. 100 users already updated their profiles. So, I look for internet to find out the way to restore only user profile instead of whole _PROF database. But, unfortunately, I was unsuccessful.

    So, I decided to test the whole action plan on virtual machine. Once, I satisfied the behavior of SharePoint that was expected, so I decided to restore the _PROF database from the backup that was taken last night.

    The only way to recover user profiles with My Site is to restore the previous backup.

    I restarted the SQL server services from SQL Server 2005 Management Studio in order to give exclusive access to restore activity. Once _PROF database is restored, I reset the IIS to clear the cache and here you go.

     

     

  • Installation Steps and Pre-requisite: SharePoint Portal Server 2007 Beta 2

    SharePoint Portal Server 2007 installation is not straight forward and there are steps that need to follow to do the proper installation and configuration. There is a list of pre-requisite that should be considered before installing SharePoint Portal Server 2007.

    Yesterday, I installed and configured SharePoint Portal Server 2007 Beta 2 on Virtual PC, It all goes fine without any much difficulty. I am summarizing each step, so you guys can follow it and I am open to receive any comment or suggestion, if you point out any changes in the installation guide or any suggestion or any problem that you face according to your scenario.

    The following steps are especially written for Single Box installation, but it should work with small server farm scenario as well.

    Pre-Installation Guide

    There are several things that you should install and configure prior to SharePoint Portal Server 2007.

    • Windows Server 2003 with Service Pack with all latest windows update
    • IIS 6.0 with ASP.NET Component Enabled
    • Disk Partition should be NTFS (SPS installation does not support FAT partition)
    • Install SQL Server 2000 SP4 or SQL Server 2005 (Typical Installation)
    • Create a domain account that you will use to logged in and installed SharePoint Portal Server 2007 Beta 2
    • Add domain account as local administrator on Virtual Machine
    • Use the same account for application pool identity, SharePoint Administrator, Index Crawler Account etc
    • Assign domain user to DB creator, sysadmin and security admin rights on SQL Server
    • Join Virtual Machine to a domain controller.
    • Install Windows Workflow Foundation
    • You can download it from: http://www.microsoft.com/downloads/details.aspx?FamilyId=A2151993-991D-4F58-A707-5883FF4C1DC2&displaylang=en

     

    SharePoint Portal Server 2007 Installation Steps

    You are now ready for SharePoint Portal Server 2007 beta 2 installations. Follow the following steps:

    • Insert SharePoint Portal Server 2007 Beta 2 CD (if you have ISO Image, then make CD First)
    • First step, it will ask you to enter CD Key and license agreement
    • In the next screen choose Advanced as it Basic installation will install MSDE version of SQL Server
    • On next screen, installation program will give warning that it will stop services mostly related to IIS, click Yes to proceed.
    • Next screen, you will be asked to create farm configuration, select No, I want to create new server farm
    • Next screen, provide database server name and database account details (DOMAIN\USERNAME)
    • Leave database name as default. Click "Next"
    • Next screen you will see the summary screen, click Next to start the installation.
    • Installation step can take around 30 to 45 minutes to install SharePoint Portal Server depending on the VM configuration and RAM
    • In the end, you will get a screen, click Finish to end installation.

    Common Issues:

    • Install error: This product requires ASP.net web server extensions to be enabled in Internet Information Services (IIS). Enable this setting and re-run setup.

                Resolution: Run  aspnet_regiis -i  on command prompt

     

     

    I do hope these steps are correct in the best of my knowledge, please give you comments and feed back on this article.

    Best of luck

    Adnan

     

     

     

  • Security Consideration for Custom Web Part Development

     

    Web Parts can be deployed in two different places:

      • Deploy a Web Part library DLL inside a virtual server's \bin directory.
      • Deploy a Web Part library DLL in the Global Assembly Cache (GAC). A Web Part library DLL in the GAC can be loaded into any virtual server on the hosting Web server machine.

     

    The fact that Web Part Pages are stored inside the SharePoint content database poses a security risk. In order to overcome security threat, WSS protects itself by processing Web Part Pages in safe mode. The Web Part architecture only loads Web Parts and ASP.NET controls that have been explicitly configured as a safe control.

    We can configure Web Parts and ASP.NET controls using the <SafeControls> section of the hosting virtual server's web.config file that look like this.

     

    <!– In web.config of hosting virtual server -->

    <configuration>

      <SharePoint>

        <SafeControls>

          <SafeControl Assembly="MyWebParts"

                       Namespace="MyWebParts"

                       TypeName="*"

                       Safe="True" />

       </SafeControls>

      </SharePoint>

    </configuration>

     

     

     The security layer provided by the Web Part architecture goes beyond requiring that Web Parts and ASP.NET controls are configured as safe controls. A Web Part library DLL running inside the \bin directory is further restricted in what actions it can perform by the <trust> element defined within the web.config file that look like this.

     

    <configuration>

      </system.web>

        <!-- set trust level to (1) WSS_Minimal (2) WSS_Medium or (3) Full -->

        <trust level="WSS_Minimal" originUrl="" />

      </system.web>

    </configuration>

     

     

    The <trust> element contains the level attribute. The value of the level attribute configures Code Access Security (CAS) permissions that restrict Web Part library DLLs from performing potentially dangerous actions such as connecting to a SQL Server database and accessing the local file system. The <trust> element's level attribute is set to WSS_Minimal by default.

    These three trust level can be categorized as below:

      • WSS_Minimal (by default)

    A setting with WSS_Minimal trust severely restricts Web Part libraries.

      • WSS_Medium

    A setting of WSS_Medium trust usually allows for testing and debugging Web Part without security-related problems.

      • Full

    A setting with Full trust completely disables all CAS-related security restrictions

     

    Note:

    Keep in mind that a <trust> element's level attribute setting in a web.config file only affects Web Part library DLLs running within the \bin directory. It does not affect Web Part library DLLs that have been installed in the GAC. Web Part library DLLs in the GAC are considered to be fully trusted and always run without any CAS restrictions.

     

    Best Practices for Custom Web Part Deployment

    • Use WSS_Medium trust level to enforce security on Web Part Library DLLs.
    • Only deploy those Web Part Library DLLs to GAC that are coming from fully trusted source.

     

  • Getting ready for the Microsoft Office System Developers Conference 2006

     

    The registration for the 2007 Microsoft Office System Developers Conference is now open. You can register for event here: http://www.microsoft.com/uk/business/devcon/

    Hurry up and try to get your name down early if you want to go. There will be quite a few sessions on SharePoint 2007 although if you’ve been on the TAP or Beta1 program you may already have seen quite a lot of what will be presented.

    Agenda: http://download.microsoft.com/documents/uk/business/DevConAgenda.doc

    Key benefits for attending:

     

     


Need SharePoint Training? Attend a SharePoint Bootcamp!

Posts (c) their respective authors. Everything else (c) 2007 SharePoint Experts