Prasenjit's Blog

Recently came across a requirement where html content captured using RichTextbox was required to be saved in SharePoint listitem using Lists.asmx.The custom form is having a RichTextbox which corresponds to a multiline textbox field.The data needs to be saved by calling Lists.asmx webservice in Javascript.The content is entered in the RichTextBox can contain html tags behind the screen though on top one is just entering plain multiline text.

So when the text entered in RichTextBox is read using Javascript and passed as parameter in XML webservice,it messes up the XML request as the content itself has html tags.The request does not remain well-formed as per the definition and I guess cannot be parsed properly.So the data does not get saved in SharePoint listitem.

The solution for this problem is to pass the html content wrapped around CDATA tag.Using CDATA as wrapper around the parameter ensures that the html content is just treated as a string and does not get interpretted as markup.CDATA means character data and it can be used like this while passing markup content as parameter

<![CDATA[ your html/xml string parameter]]>.

If the parameter is say.. var x='<div>Here is my content</div>’;

Then the you need to wrap it around with CDATA before passing it to XMLHTTP request like this



SharePoint exposes web services to do data related activities.Recently came across requirement where data need to be uploaded into SharePoint lists from an environment which does not have SharePoint installed.So the object model is not available.Lists.asmx provides all list related activities to add items and read list data.Request and response are exchanged in the form of XMLs.The XMLnode avilable from the response can be used to iterate through list data using .NET classes for XML data processing.

Another application which I got to work on off late is using SharePoint web services extensively but most amazingly from client side.The application does not have any server side coding or event handling.All SharePoint related activities which are generally done from code behind using object model are done here using javascript ajax calls to SharePoint webservices.Even workflow related object model activities are done using Javascript ajax calls to SharePoint webservices.It is amazing to see that so much of SharePoint functionality can be implemented using just Javascript.This application uses JQuery to make all SharePoint webservice calls and process data from SharePoint.All the form fields can be accessed easily using JQuery functions.Form field validation and all UI related dynamic activities are implemented using Javascript.Only problem with the application is debugging the code.But once one starts working on this approach to use javacript and jQuery functions to play around with SharePoint data and form fields then one gets used to it.The application also makes use of Data View webpart and xsl to generate forms and UI for all the screens.So another interesting aspect is use xsl to implement UI where form data is fetched using dataview webpart.

Dataview webpart automatically pulls data from list item and saves the data back to SharePoint list.XSLT is used to format the UI as per requirement.

XSLT can be treated as just like a programming language rather than just data structure or data container like Xml.Data can be processed in the screen and data can be rendered with implementing logic like a scripting language similar to vbscript/php etc.I need to record all these findings with proper sample code and detail description.

Recently came across a requirement where some dashboard were to be created from SharePoint lists.The client already had license for Fusion charts which gives decent flash based dashboard functionality using javascript,html and flash.Fusion charts also provides dashboards webparts for depicting SharePoint data.But that was not readily available.So wanted to access the SharePoint data at clientside so the dashboards can be generated.The idea is to use content editor webpart to inject javascript,html and display dashboards where data gets pulled from SharePoint all via Javascript.

SharePoint has webservices which provides all the SharePoint APIs needed to access SharePoint data.So Ajax is one obvious option where XMLHTTP requests can access the webservice asynchronously at client side.Other option is to use OWSSVR.DLL(reference : Ajax and OWSSVR.DLL calls can be made with plane javascript but using JQuery makes the code cleaner.

Response from Ajax call is received by callback function which processes the data.The response is in the form of XML which can be iterated through to read the list items and individual field values(

This approach is very useful if one is looking for a non server side coding options and using out of the box options.For UI users having certain amount grip over javascript but not so much at C# coding or custom webpart developement,this can be handy.I was able to create Fusion chart dashboards using content editor webparts which displayed data fetched from lists.This is all for SharePoint 2007.SharePoint 2010 version has much better and publicized support for SharePoint Client object model

SharePoint provides out of the box webpart called Content Editor WebPart,which is a powerful tool to inject javascript and html tricks in the SharePoint pages created through SharePoint UI.Including  javascript functions to provide dynamic activites in SharePoint pages is a basic customization requirement which one faces very often.Acheiving this with out of the box features is good capability to have.There are often requirements like including javascript functions on control events in out of the box SharePoint pages.With proper knowledge of CSS classes involved with SharePoint controls,UI related tweaking can be acheived by proper use of javascript.

The content editor webpart makes including javascript functions and control events very neat also enables content authors to do play with javascript without really bothering much about what goes into custom SharePoint developement.

There is option for including html through rich textbox,javascript though source editor with the content editor webpart.Also there is option for refering to html/javascript files from a central location(like doc lib) from the webpart.


Failover/High Availability is a requirement for any SharePoint based application where downtime can affect bussiness.General SharePoint farm setup involves load balanced web front end servers,application servers for central admin,search,excel service etc. and database servers.

Failover/HA can be acheived at DB level by providing clustering or mirroring.Clustering means providing multiple nodes which logically means a single server.Once the pricipal one fails then the other node becomes available.For outer world it is only one server but internally it provides options incase of a failover situation like disk crash etc.

Mirroring is similar concept but in this case the pricipal and the backup server maintain same state of data almost on real time.They share hard drive.There has to be a witness which keeps track if the pricipal server is down for certain period of time and if the dormant one needs to take its place.There are mirroring software which takes care of the whole failover scenario.

FAST ESP has become part Enterprise version of SharePoint 2010.

FAST brings in lot of new features on top of SharePoint Search.It provides previews,thumbnails,deep refinements etc.Setting up FAST search requires setting up two Search Service Applications:Content SSA and Query SSA.These work as interface between SharePoint and FAST.FAST search can be setup in SharePoint in a single server which will implement all the components or on a bigger scale which needs multiple servers dedicated to FAST search components.

FAST search needs one Admin server and one or more non Admin servers for setting up Indexers.The Index can be divided into multiple servers.This is called dividing the index into multiple columns.This makes the index update process faster and also enables to accomodate larger index.

The web crwaler extracts text out of HTML material to prepare the index.There are other components like Query Processor and Query Matching.Setting up FAST search involves deploying a deployment xml which mentions the admin and non admin servers included in the setup.It mentions the index columns.

Query SSA provides interface to the end user search queries and Content SSA provides interface to content sources like SharePoint lists,libs,BDC,Exchange,Web via connectors.

Once FAST search is enabled in SharePoint Farm,then SharePoint search becomes unavailable.

Ref. Articles:

IIS offers different type of authentication mechanisms:anonymous,basic,integrated,forms,digest authentication.

Windows authentication uses either NTLM(NT LAN Manager) or Keberos as the underlying authentication mechanism for propagating user credentitial across the network for accessing resources.

Kerberos is the new technology which is replacing NTLM steadily depending types  servers and domains involved.NTLM works across different types of servers like windows,linux etc.It will work in Windows server systems without active directory.

Kerberos offers features like delegation ,greater access to network resources.It provides security token from KDC(key distribution center) and it provides encryption of the password while shared between server and client.If custom service account are used as identity in the application pool hosting the application ,then the account needs to be registered with active directory as ‘Service Principal Names’.Kerberos protocol has been developed by MIT.

Reference articles: