Monday, August 27, 2012

SharePoint Designer Errors

When SPD throws the nasty errors like below and  which points to no hint, then there is only one way.
Restart the IIS and remove the temporary files :)

soap:ServerException of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown.Attempted to read or write protected memory. This is often an indication that other memory is corrupt. (This Post could save the time of people).

This error could occur due to memory leakage.so make sure that object is properly disposed .
Restarting IIS can resolve this issue but It may occur again If the memory leakge is not handled
 Verify memory leakage scenarios here

Updating lookup table in Project server 2010

Following is the code snippet for updating lookup table value in project server 2010

using PSLibrary = Microsoft.Office.Project.Server.Library;
using Updatelookup.WebSvcLookup;
using System.Net;
using System.Data;

namespace Updatelookup

class Program

static void Main(string[] args)

LookupTable tblLookup = new LookupTable();
tblLookup.Url = "pwaurl" + "/" + "_vti_bin/PSI/LookupTable.asmx";
NetworkCredential prjCdn = new NetworkCredential("user", "pwd", "domain");
tblLookup.Credentials = prjCdn;

AddToLookupTB(tblLookup, "Customer");


static void AddToLookupTB(LookupTable tblLookup, string TableName)

LookupTableDataSet lookupDs = new LookupTableDataSet();

//Get all the lookup table

//Get lookup table guid
lookupDs = tblLookup.ReadLookupTables("", false, 0);//
DataView dvLookup = new DataView(lookupDs.Tables["LookupTables"]);
dvLookup.RowFilter = "LT_Name = '" + TableName + "'";
DataTable lookupValueTB = new DataTable();

lookupValueTB = dvLookup.ToTable("LookupTable");
Guid LookupgId = new Guid(Convert.ToString(lookupValueTB.Rows[0]["LT_UID"]));

//Read lookup table dataset
Guid[] ltGuids = new Guid[] { LookupgId };
LookupTableDataSet LTCustomer = tblLookup.ReadLookupTablesByUids(ltGuids, false, 1033);
LookupTableDataSet.LookupTableTreesRow drLT_TREE = LTCustomer.LookupTableTrees.NewLookupTableTreesRow();

//Add new lookup value
drLT_TREE.LT_UID = LookupgId;
drLT_TREE.LT_STRUCT_UID = Guid.NewGuid();
drLT_TREE.LT_VALUE_TEXT = "Customer 3";
drLT_TREE.LT_VALUE_SORT_INDEX = (byte)PSLibrary.LookupTables.SortOrder.Descending;
( here I checked the orginal order of values in lookup table by Navigating server settings--> Lookup table-->Customer lookup table and made ensure that order given there and in mentioned in above code line is same .)
LookupTableDataSet newLTDs = LTCustomer.GetChanges() as LookupTableDataSet;

tblLookup.UpdateLookupTables(newLTDs, false, false, 1033);
tblLookup.CheckInLookupTables(ltGuids, false);


Wednesday, August 8, 2012

Enterprise Project Management:Project Site Approval Workflow in Project Server 2010 -- Part - II

i)To Deploy the project site workflow on PWA and configure Workflow Stages with PDP pages.
Get the deployment steps @Codeplex 
ii)To create project site workflow Read this post