Mar 30, 2010

Enabling Publishing Infrastructure throws error message: Access Denied

To leverage the Output or Page Caching feature of SharePoint 2007, we need to enable publishing infrastructure onto the website.

At times when using the Site Level Admin Console to activate this feature, it fails giving error message.




This is when you use stsadm commandline utility onto the SharePoint Server as follows:

stsadm -o activatefeature -name PublishingSite -url http://sitecollectionurl/


SharePoint Enabling Output and Page Caching prerequiste is the publishing infrastructure.

Now, as a site collection administrator you can:
  • Enable the Office SharePoint Server Publishing  feature from Site Features
  • Enable Output Caching and Page Caching from Site Admin Page.

Mar 26, 2010

Backup Restore SharePoint or Restore SharePoint Site

SharePoint Sites like TeamSite, Collabration Site, Blank Site... with or without extensive custom code customization in functionality, can be moved from one server farm to another regardless of the farm size. This is obviously not the best practice but based on the external/internal factors in an organization, can be persued and sites can be migrated. BTW, undoubtely with hands up this is by far the winner when it comes for POC sites.


Came across different organization/people of all level and they spent hours trying different options, but finally what worked is (the following process proposed by me):

stsadm.exe -o restore -url "URL" -filename "filename" -overwrite -restoremethod new

Before executing the above command:
* Create a site collection with blank site
* Install all the third party webparts/templates
* Deploy all the custom code (wsp) to the farm
* Make sure SharePoint Version is same

The backup might be taken using the one mentioned below method or any other way:

stsadm -o backup -url  "URL -filename "FileName"

Other available options:
* Central Admin Backup/Restore
* SharePoint Designer, Yes the SPD
* Stsadm import/export
* SQL Content DB backup/restore
* Site templates
* and so on

Success rate almost 100% when you are using stsadm restore. Even though stsadm restore is not meant for migration but it serves the purpose.

Update:

Migrated a Highly Customized SharePoint Portal from one farm to another farm using the above technique.

Mar 25, 2010

SharePoint Workflow and Warmup Scripts

TOPIC
SharePoint Workflow creates task in the associated task list, once it's been initated and thereafter to have the status available for endusers . Can also do custom work like updating a custom database table, sending emails and so on.


SCENARIO
We had a scenario, where the first user every day faces the issue caused because of the workflow taking long time to update the custom database.


RESOLUTION
The Application pool for the SharePoint Web Application gets recycled on nightly basis. So, the caching is not there any more and we need to warmup the SharePoint Workflow Engine.

Create a custom aspx page and initate a workflow on calling the aspx page which will try to start the workflow and eventually fail. This way we will atleast warmup the SharePoint Workflow Engine.

Mar 23, 2010

Create SharePoint Site

Quickly Create SharePoint Intranet Site using SharePoint Designer and Out oF Box features

Need to create a sharepoint intranet site for a department / team, the following points will expedite the site creation:

Tools/Access Required

- SharePoint Farm Administrator privilege
- SharePoint Site Collection Admin privilege
- SharePoint Designer
- IE Developer Toolbar

Basics

- Make sure SharePoint server is upto date (All SharePoint 2007 Updates)
- Create a blank site, use managed path specific to the department or team

- Enable Publishing Infrastructure
- Install WSS Fab 40 Template
- Create desired page layout for default.aspx using SharePoint Designer (SPD)
- Sample website link
- Enable site usage reporting at Site Collection Administrator Level
- Create Groups as required and use audience targetting in the webparts as required


Look and Feel

- Use pre existing theme
- Write CSS inside Content Editor WebPart for the Content Area / Page Layout.
- Use SharePoint Designer to write inline CSS for the Master Page

Customize MasterPage / Default.aspx (Home Page)

- Embed logo images via SPD as required
- Hide components
    -- View All Site Content
    -- Site Actions
    -- Left Navigation
    -- etc
  by using the following tag as the wrapper around what you want to hide



SharePoint:SPSecurityTrimmedControl ID="Control2" runat="server" PermissionsString="ManageSubwebs"


Now here is the description what we had done.
SPSecurityTrimmedControl as the name suggest, the control check the SharePoint permission and if user is permitted (if the user have permission) then it will access the content inside this control.
And if the user don’t have a permission then the content inside this control will not been accessed.

Page Content

* Free Third Party World Clock and Weather WebPart

* Free Third Party Stock Ticker WebPart

* NEWS/RSS Ticker WebPart (mostly at the bottom of the page)

Add a RSS WebPart to the page and open the tool pane.

Goto XSLT Editor replace the existing XSLT from the following blog's XSLT ...

link

Set the property of RSS WebPart and you are all set.

Tip: Generate custom XSLT for SharePoint using SharePoint Designer (SPD)

* Use DataView WebParts for showing snippets from blog / tasks / lists in a customized manner

* Add a Calender webpart for Upcoming Events

* Use RSS WebPart to recieve news

* Use a List WebPart, rename it to My Bookmarks/My Links. i.e. Create a View and customize the view to have only one column called detail link and in the where condition use [Me]

* Use SPD to have Page Hit Count

Post your comments if you find something missing ... and yes don't forget to add the following:

Footer

- Feedback - link to a List View
- Contact Us
- Copyright
- Terms of Usage and so on

SharePoint Warmup Script for Extranet or Intranet Site

Sharepoint Warmup Script Myth DeMystified

Accessing SharePoint Site in the morning is like warming up the car on a cold winter morning before you can expect optimal performance on takeoff.

SharePoint Site resources are recycled from the server memory by default IIS configuration on a regular/nightly basis similar to the concept that after driving certain miles you need to re fuel your car.

To keep things notch up, like cars which start automatically when the temprature falls below cetain fahrenheit. For SharePoint we need to schedule warmup script to run automatically when the application pool memory gets recycled.

SharePoint Sites are hosted on top of WSS, which runs on top of .Net framework hosted on IIS Servers. Same like cars have different types of engine but basically they move the piston/wheel. Abstraction is the key, if you note above.

In a scenario, where you have a 2wd/4wd car still you have to make sure to warmup the engine for optimum performance. Same is the case with SharePoint, (for a given Site) whether it's the Extranet / Intranet Site URL both uses the same Site Collection (and also the same application pool) to access the information need to be displayed to the end user.

From the above you can note that in your warmupscript whether you access the intranet url or extranet url, it doesn't make any difference both works exactly the same helping the ASP .Net JIT compilation and hence site performance doesn't degrade drastically during the wee hours of the morning.

You can use the well known warmup script located at: link

Mar 16, 2010

SharePoint Performance or SharePoint Optimization - Real Time Data

A Share Point Site mainly using forms, workflows, custom views, custom master page, and interacting with custom application database on SQL Server. Users are authenticated via FBA using LDAP.

Time to load the site is:

1) After IISReset, Browser cached cleaned, logged onto the server itself and using (127.0.0.1 in host file for the URL)

around 34 Seconds

2) After Warmup Script, IISReset with browser cached cleaned on the server itself and using (127.0.0.1 in host file for the URL)

around 21 Seconds

3) Subsequent access after closing and reopening the browser only

No IISReset, No Browser cache cleaning

around 11 Seconds


Environment: IE 6.0 on 64 bit box 2GB Ram and only one web app in the farm (1 App Server, 1 Web Server, 1 DB running on VM)
Win 2003 SP2


To Improve the Performance further Enabled the following caching:
* Caching at IIS Level
* Enabled BLOB caching via web.config (Does caches some 30 kb of data)
* Enabled http compression for static and dynamic files at IIS level (Does caches some 40 kb of data)
* Enabled Output Caching or Object Caching at the Share Point Site Collection level
* Warmup script from codeplex

Performance improved to around 5 seconds.

Mar 15, 2010

WSS (Windows SharePoint Services) or SharePoint

Have your Web Portals, Content Management and Business Process Management Workflows without having to pay for SharePoint just use Windows SharePoint Services (WSS) a free add-on to Microsoft Windows Server 2003 and 2008.


 
SharePoint can be adopted slowly to it's complete strength instead of being overwhelmed by the complete list of feature provided by SharePoint. Some scenarios even might not require complete SharePoint they will work just fine using only WSS.
 
WSS Features

  • Content Management system.
  • Document Management providing a central repository for shared documents
  • Web-based collaboration, collaborative editing of shared documents, and document workspaces
  • Workflows
  • Access control and revision control for documents in a library
  • Browser-based management and administration.
  • Customizable web pages using dashboards, web parts, and navigation tools
  • .... and many more

Pages