Microsoft released the Silverlight 3 Beta and Microsoft Expression Blend 3 Preview at Mix09.

Just browse the follwoing links to know more information about the releases.
What’s New in Expression Blend 3 Preview
Silverlight 3 Beta
* Silverlight 3 is now available to developers for testing purposes

Download Links
Silverlight 3 Beta – Windows Developer Runtime
Silverlight 3 Beta – Mac Developer Runtime

Expression Blend 3 Preview installer

Posted by: Shantham | March 18, 2009

SharePoint Database SQL Query Tips1

Today onwards on daily basis, I decided to post the Sql Query to access the SharePoint Databases. To know more about the databases in Sharepoint , check my SharePoint Databases Post.
To retrieve all lists from the database, use the following query,

select AllLists.tp_Title as ‘List Title’,webs.Title as ‘Web Title’
from dbo.AllLists as AllLists
inner join dbo.Webs as webs
on webs.Id=AllLists.tp_WebId
order by webs.Title

dbo.AllLists Table contains all the lists available in WebApplication Level *

dbo.Webs Table Contains all the webs or sites available in WebApplication Level  *

Sql Query Result

Sql Query Result - Returns All Lists with Site

*If the Database configured for SiteCollection, then the table only contains the datas for SiteCollection Level.

Read more…

Posted by: Shantham | March 14, 2009

Excel Service Links

I’m just researching on Excel Services.I found some posts, are usefull to me, so i like to share with you all.
MSDN Blog – Excel Services
Cum Grano Salis Blog
MSDN Library
Microsoft Office Online – Excel Services
Click on the above links to navigate to those links.

Read more…

Posted by: Shantham | March 11, 2009

WSS – User Information List

I did some research on Sharepoint(WSS) Users, about where are the users & their properties are stored. 

I got some result with that, So, i like to share that with you all via.. this post,

By using the SPWeb.SiteUserInfoList property,we will get a UserInfo list of the site collection of the current web.

The title of this userinfo list is “User Information List“.This was the hidden list and it has some metadata for storing some information about user.

Here, I list out the metadata available in “User Information List“,

Display Name Type Name
Content Type ID ContentTypeId ContentTypeId
Name Text Title
Approver Comments Note _ModerationComments
File Type Text File_x0020_Type
Account Text Name
E-Mail Text EMail
About Me Note Notes
SIP Address Text SipAddress
Locale Integer Locale
Calendar Type Integer CalendarType
AdjustHijriDays Integer AdjustHijriDays
TimeZone Integer TimeZone
Time Format Boolean Time24
Alternate Calendar Type Integer AltCalendarType
CalendarView Options Integer CalendarViewOptions
WorkDays Integer WorkDays
WorkDay StartHour Integer WorkDayStartHour
WorkDay EndHour Integer WorkDayEndHour
Is Site Admin Boolean IsSiteAdmin
Deleted Boolean Deleted
Picture URL Picture
Department Text Department
Job Title Text JobTitle
Is Active Boolean IsActive
Report To User Report_x0020_To
ID Counter ID
Content Type Text ContentType
Modified DateTime Modified
Created DateTime Created
Created By User Author
Modified By User Editor
Has Copy Destinations Boolean _HasCopyDestinations
Copy Source Text _CopySource
owshiddenversion Integer owshiddenversion
Workflow Version Integer WorkflowVersion
UI Version Integer _UIVersion
Version Text _UIVersionString
Attachments Attachments Attachments
Approval Status ModStat _ModerationStatus
Edit Computed Edit
Name Computed LinkTitleNoMenu
Title Computed LinkTitle
Select Computed SelectTitle
Instance ID Integer InstanceID
Order Number Order
Workflow Instance ID Guid WorkflowInstanceID
URL Path Lookup FileRef
Path Lookup FileDirRef
Modified Lookup Last_x0020_Modified
Created Lookup Created_x0020_Date
Item Type Lookup FSObjType
Effective Permissions Mask Computed PermMask
Name File FileLeafRef
Unique Id Lookup UniqueId
ProgId Lookup ProgId
ScopeId Lookup ScopeId
HTML File Type Computed HTML_x0020_File_x0020_Type
Edit Menu Table Start Computed _EditMenuTableStart
Edit Menu Table End Computed _EditMenuTableEnd
Name Computed LinkFilenameNoMenu
Name Computed LinkFilename
Type Computed DocIcon
Server Relative URL Computed ServerUrl
Encoded Absolute URL Computed EncodedAbsUrl
File Name Computed BaseName
Property Bag Lookup MetaInfo
Level Integer _Level
Is Current Version Boolean _IsCurrentVersion
Group Computed GroupLink
Edit Computed GroupEdit
Name Computed ImnName
Picture Computed PictureDisp
Name Computed NameWithPicture
Name Computed NameWithPictureAndDetails
Edit Computed EditUser
Selection Checkbox Computed UserSelection
Content Type Computed ContentTypeDisp

By using above metadata’s we can get or set the values to User items in “User Information List”

Read more…

Posted by: Shantham | March 10, 2009

SharePoint Databases

I did some research on SharePoint Databases and how are they providing datas to SharePoint sites?. Here i am come up with some details of Databases used in SharePoint.

Database Name Description Availablity
This is the Central Admin Content database, is used to store all WSS 3.0 / MOSS content. WSS3.0, MOSS 
SharePoint_Config The configuration database contains data about all the databases used, all of the IIS Web sites, Web applications, solutions, Web Part packages, site templates, and Web application and farm settings specific to SharePoint technologies, such as default quota, blocked file types, and configuration. WSS3.0, MOSS 
WSS_Search_ComputerName This database is used for the search services. It contains the information that is required for searching content.By using this database, Windows SharePoint Search services enables users to search all Web site content on the server. WSS3.0, MOSS 
WSS_Content_GUID This database contains data specific to a Web application and its site collections. It contains the content data, such as the document uploaded to a list or a library. By default, a single content database is created for each Web application. All new site collections added to a Web application use the same database WSS3.0, MOSS 
SharedServicesN_DB Each Shared Service Provider (SSP) requires a database for service-specific data. MOSS
SharedServicesN_Search_DB In addition to the SSP database, a separate database is required for frequently changing search-related data. MOSS
SharedServicesContent This database is dedicated for the shared services content. MOSS
SSO This database stores the settings and account information for single sign-on. MOSS

For more informations, visit Windows SharePoint Services 3.0 ,  Office SharePoint Server.

Read more…

The security validation for this page is invalid. Click Back in your Web browser, refresh the page, and try your operation again.

The above error will be thrown at the time of updating Library or Lists items due to authentication problem, or We didn’t have the rights to update the items.
By using the follwoing code, We can overcome this issue,

Web.AllowUnsafeUpdates = true;

or we can also use the follwoing code to overcome the above error, this will affect the WebApplication. This will change the Security settings of a Web Application to allow the anonymous user to update item.

web.Site.WebApplication.FormDigestSettings.Enabled = false;
web.Site.WebApplication.FormDigestSettings.Enabled = true;

or we can change the settings in Central Administration to anonymously update the items. But this method will be dangerous.

  • Central Administration > Application Management > Web Application General Settings
  • Choose the WebApplication to overwrite the settings
  • Select the option Off in Web Page Security Validation as follows,


Read more…

In this post, I am going to explain about downloading a document from sharepoint library using webservice, For that we need following things,

  • Read the contents from Document, located in SharePoint Library
  • Create and store the contents on a new document in Local Machine

To get the contents from Document under Sharepoint library,we shall use the GetItem method of Copy WebService. This method will generate a Byte array of the document, and then pass it as a parameter on FileStream Contrutor to create a new document.

The Syntax for the GetItem method as follows,

public uint GetItem ( string SourceUrl, out FieldInformation[] Fields, out byte[] Stream )


A String that contains the absolute source (on the server to which the SOAP request is sent) of the document that is to be retrieved.

An array of FieldInformation objects, passed as an out parameter, that represent the fields and the corresponding field values that can be copied from the retrieved document.

An array of Bytes, passed as an out parameter, that is a base-64 representation of the retrieved document’s binary data.

Return Value:
A UInt32 that returns 0 to indicate that the operation has completed. (There are also two out parameters containing an array of CopyResult objects and an array of FieldInformation objects.)

Below i’m providing a code for downloading a document from SharePoint Library,

//Copy WebService Settings
string webUrl = “http://localhost:1000″;
WSCopy.Copy copyService = new WSCopy.Copy();
copyService.Url = webUrl+”/_vti_bin/copy.asmx”;
copyService.Credentials = System.Net.CredentialCache.DefaultCredentials;

//Source and Destination Document URLs
string sourceUrl = “http://localhost:1000/Shared Documents/Sample.doc”;
string destinationUrl = “C:\\Documents\Sample.doc”;

//Variables for Reading metadata’s of a document
WSCopy.FieldInformation fieldInfo = new WSCopy.FieldInformation();
WSCopy.FieldInformation[] fieldInfoArray = { fieldInfo };
WSCopy.CopyResult cResult1 = new WSCopy.CopyResult();
WSCopy.CopyResult cResult2 = new WSCopy.CopyResult();
WSCopy.CopyResult[] cResultArray = { cResult1, cResult2 };

//Receive a Document Contents  into Byte array (filecontents)
byte[] fileContents = new Byte[4096];
copyService.GetItem(sourceUrl, out fieldInfoArray, out fileContents);

//Create a new file and write contents to that document
FileStream fStream = new FileStream(destinationUrl, FileMode.Create, FileAccess.ReadWrite);
fStream.Write(fileContents, 0, fileContents.Length);

Read more…

Posted by: Shantham | March 5, 2009

No Excel Calculation Services is available in the farm.


 This was the error, i recieved recently when i open an Excel sheet in browser.  I didn’t recived this error before, so i searched in recent log file. That file list out the following line

03/04/2009 14:27:33.07    w3wp.exe (0x14C4)    0x020C     Excel Services      Excel Services Web Front End  5pad    Critical     No Excel Calculation Services is available in the farm.[User: SHAREPOINT\system]

Then i understood, there is no Excel Calculation Services available in my Server Farm. So, I moved to my Central Administration Page,

  • Central Administration -> Operations -> Services on Server 
  •  Select Excel Calculation server role radio button
  • Start the Excel Calaculation Services

Now I moved back to my Excel sheets Library and clicked the Excel File. Now all works fine for me…

Read more…

In my previous post i’m explained about the members of Copy Web Service. For uploading a document from any local machine to sharepoint document library is possible by using CopyInToItems method.

Though, the syntax for that method is,

public uint CopyIntoItems (string SourceUrl,string[] DestinationUrls,FieldInformation[] Fields,byte[] Stream,out CopyResult[] Results)


A String that contains the absolute source URL of the document to be copied.
An array of Strings that contain one or more absolute URLs specifying the destination location or locations of the copied document.
An array of FieldInformation objects that define and optionally assign values to one or more fields associated with the copied document.
An array of Bytes that contain the document to copy using base-64 encoding.
An array of CopyResult objects, passed as an out parameter.
Return Value:
A UInt32 that returns 0 to indicate that the operation has completed. (There is also an out parameter containing an array of CopyResult objects.)

Below i’m providing a code for uploading a document to SharePoint Library,

//Copy WebService Settings
string webUrl = “http://localhost:1000”;
WSCopy.Copy copyService = new WSCopy.Copy();
copyService.Url = webUrl+”/_vti_bin/copy.asmx”;
copyService.Credentials = System.Net.CredentialCache.DefaultCredentials;

//Declare and initiates the Copy WebService members for uploading
string sourceUrl = “C:\\Sample.doc”;
string[] destinationUrl = { “http://localhost:1000/Shared Documents/Sample.doc” };
WSCopy.CopyResult cResult1 = new WSCopy.CopyResult();
WSCopy.CopyResult cResult2 = new WSCopy.CopyResult();
WSCopy.CopyResult[] cResultArray = { cResult1, cResult2 };
WSCopy.FieldInformation fFiledInfo = new WSCopy.FieldInformation();
fFiledInfo.DisplayName = “Description”;
fFiledInfo.Type = WSCopy.FieldType.Text;
fFiledInfo.Value = “Sample Description”;
WSCopy.FieldInformation[] fFiledInfoArray = { fFiledInfo };

//Reading the document contents in to stream
FileStream strm = new FileStream(sourceUrl, FileMode.Open, FileAccess.Read);
byte[] fileContents = new Byte[strm.Length];
byte[] r = new Byte[strm.Length];
int ia = strm.Read(fileContents, 0, Convert.ToInt32(strm.Length));

//Copy the document from SourceUrl to destinationUrl with metadatas
uint copyresult = copyService.CopyIntoItems(sourceUrl, destinationUrl, fFiledInfoArray, fileContents, out cResultArray);

* Where WSCopy is the WebReference Name and the document is uploaded successfully, copyresult returns 0.

Read more…

Posted by: Shantham | February 10, 2009

SharePoint Copy WebService – Part 1

I got a work on moving a file from document library using Web Service. I already work on this, but I did that with SharePoint Object model. Now I have to search for this using web service, oh… now i’m remembered the Copy web service in sharepoint; it’s just announced in WSS3.0

This Copy Web service plays the role of copying, and moving documents with the field information’s. There are three classes to play this role,

Copy :
Provides methods for copying files between SharePoint sites or within a SharePoint site.
CopyResult  :
Represents the result of a copy operation.
FiledInformation :
Provides properties that define a field associated with a document copied by using a Copy web service operation.

The three methods within Copy class do the job for us to move the files in Sharepoint libraries,

GetItem  :
Generates a Byte array representation of a document that can be passed to the CopyIntoItems method to copy the document to a different server.
CopyIntoItems :
Copies a document represented by a Byte array to one or more locations on a server.
CopyIntoItemLocal  :
Copies a document from one location on a server running Windows SharePoint Services to another location on the same server.

By using this methods we can upload, download from different servers, local machines. In my coming posts I’ll explain each method in deep.

Read more…

« Newer Posts - Older Posts »