22/08/2014

SharePoint Solution Setup Package MSI

After a few more hours of head banging VS2010 setup projects I decided there has to be an easier way.
It doesn't help that the custom actions can only be dll, exe and vbs, or that the post build command interface is a bit lousy - when it works!

I was toying with the idea of running a vbs to call the powershell to install and uninstall a wsp file, but we are dealing with 64bit and vbscript calls to ps files don't play nice with 64bit!

So I did a little hunting around for a solution and found the wonderful PS2EXE on codeplex.

The plan was to convert my ps1 files to exe's and then have my msi project call them as exe's...straightforward you would think....perhaps.

So here's how I progressed :

1. Make sure you put full paths into your ps1 files - you can't use contextual paths as the installer runs in the system32 context.


2. Covert your ps1 files to exe's using the PS2EXE

3. Add your files into your VS setup project


4. Add your exe files created from PS2EXE into the custom actions sections


5. Make sure you mark your custom actions files as false for the installerclass


6. Ensure your target platform is set to 64bit



So when you run your setup.exe the final step of the install will execute your powershell files that have been converted to exe's.
Although this is probably not the best solution for some powershell files, its perfect for solutions (wsp's).

Hope this saves your msi frustrations!




12/06/2014

SshhhharePoint

Many of my engagements with customers and indeed other consultancies invariably have an 'intranet' element within the requirements.

I remember a while back when SP2010 was released and many of use realised that demonstrating the OOB user interface was not the best approach; where the customers response was invariably muted and unimpressed.

So I have been considering how we approach SharePoint engagements and indeed how we could approach them with a more practical business approach rather than a technical one.

Many of us are 'techies' - SharePoint solutions architects, SharePoint solutions developers and so on.
Many of us are also heavily engaged in SharePoint presales and SharePoint customer demos.

One thing we all have in common to some degree is that we are proud to be 'SharePoint' people....we love the product, love the architecture, love its nuances and all of the rich business functionality that it provides.

So it comes as no surprise that when we engage with customers we engage with them with our SharePoint hat on.
We are going to solve our customers business problems, inefficiencies and overheads with a SharePoint solution....and we tell them that.

But should we take our SharePoint hat off?

The phrase or word 'SharePoint' has many connotations depending on who you engage with. In some information management communities it is treated as the black death, in others it is the fix for world hunger, world peace....you get the idea!

When a user fills in their timesheets then don't think 'My timesheet has been created by system X'.
So it makes sense that when a user interacts with their intranet or information management system they don't consider what system it has been created on.

What is important to the user is that it makes their lives easier, enables them to work more efficiently and to be more productive during their working day.

What is important to the business is more efficient users = more efficient business = cost reduction through efficiency.

So what is the best approach with a SharePoint solution for the client?

We should be engaging with the client without SharePoint specifics...rather with solution specifics.

Should the user care that it's SharePoint...absolutely not.
Should the user know that it is SharePoint ...it shouldn't matter what it is.

We develop our thoughts around a solution based upon SharePoint and that's a given as we are going to use SharePoint as our platform of choice.

But we often communicate the solution in terms of SharePoint but is that really the best way to present a solution?

Perhaps we should present the solution as a solution...I know that sounds obvious but in reality many of use stick our SharePoint hat on and start talking SharePoint solutions; SharePoint specifics.

Obviously this may depend on the level of engagement, but how often does a records manager, a CEO or an information worker have to know the underlying technology?

Sure the IT team will have a vested interest but engaging with the end users and information workers shouldn't require a SharePoint hat, in fact it may just muddy the waters.

Is that really SharePoint?
Does it really matter?









24/10/2013

Defrag SharePoint DB Indexes

Been doing some research into the defrag rates of SharePoint content DB's in order to maximise performance

I ran some sime commands to find out the level of defragmentation....

DBCC SHOWCONTIG - this will show you the level of defragmentation in your DB's



DBCC SHOWCONTIG scanning 'WorkflowAssociation' table...
Table: 'WorkflowAssociation' (1490104349); index ID: 1, database ID: 7
TABLE level scan performed.
- Pages Scanned................................: 5
- Extents Scanned..............................: 5
- Extent Switches..............................: 4
- Avg. Pages per Extent........................: 1.0
- Scan Density [Best Count:Actual Count].......: 20.00% [1:5]
- Logical Scan Fragmentation ..................: 80.00%
- Extent Scan Fragmentation ...................: 80.00%
- Avg. Bytes Free per Page.....................: 2001.2
- Avg. Page Density (full).....................: 75.28%


The following SQL will allow you to set the defrag limit and defrag all your tables.

*Perform a 'USE ' to select the database in which to run the script.*/
-- Declare variables
SET NOCOUNT ON;
DECLARE @tablename varchar(255);
DECLARE @execstr varchar(400);
DECLARE @objectid int;
DECLARE @indexid int;
DECLARE @frag decimal;
DECLARE @maxfrag decimal;

-- Decide on the maximum fragmentation to allow for.
SELECT @maxfrag = 30.0;

-- Declare a cursor.
DECLARE tables CURSOR FOR
SELECT TABLE_SCHEMA + '.' + TABLE_NAME
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_TYPE = 'BASE TABLE';

-- Create the table.
CREATE TABLE #fraglist (
ObjectName char(255),
ObjectId int,
IndexName char(255),
IndexId int,
Lvl int,
CountPages int,
CountRows int,
MinRecSize int,
MaxRecSize int,
AvgRecSize int,
ForRecCount int,
Extents int,
ExtentSwitches int,
AvgFreeBytes int,
AvgPageDensity int,
ScanDensity decimal,
BestCount int,
ActualCount int,
LogicalFrag decimal,
ExtentFrag decimal);

-- Open the cursor.
OPEN tables;

-- Loop through all the tables in the database.
FETCH NEXT
FROM tables
INTO @tablename;

WHILE @@FETCH_STATUS = 0
BEGIN
-- Do the showcontig of all indexes of the table
INSERT INTO #fraglist
EXEC ('DBCC SHOWCONTIG (''' + @tablename + ''')
WITH FAST, TABLERESULTS, ALL_INDEXES, NO_INFOMSGS');
FETCH NEXT
FROM tables
INTO @tablename;
END;

-- Close and deallocate the cursor.
CLOSE tables;
DEALLOCATE tables;

-- Declare the cursor for the list of indexes to be defragged.
DECLARE indexes CURSOR FOR
SELECT ObjectName, ObjectId, IndexId, LogicalFrag
FROM #fraglist
WHERE LogicalFrag >= @maxfrag
AND INDEXPROPERTY (ObjectId, IndexName, 'IndexDepth') > 0;

-- Open the cursor.
OPEN indexes;

-- Loop through the indexes.
FETCH NEXT
FROM indexes
INTO @tablename, @objectid, @indexid, @frag;

WHILE @@FETCH_STATUS = 0
BEGIN
PRINT 'Executing DBCC INDEXDEFRAG (0, ' + RTRIM(@tablename) + ',
' + RTRIM(@indexid) + ') - fragmentation currently '
+ RTRIM(CONVERT(varchar(15),@frag)) + '%';
SELECT @execstr = 'DBCC INDEXDEFRAG (0, ' + RTRIM(@objectid) + ',
' + RTRIM(@indexid) + ')';
EXEC (@execstr);

FETCH NEXT
FROM indexes
INTO @tablename, @objectid, @indexid, @frag;
END;

-- Close and deallocate the cursor.
CLOSE indexes;
DEALLOCATE indexes;

-- Delete the temporary table.
DROP TABLE #fraglist;
GO

02/05/2013

SharePoint Records Repository & In Place Records Thoughts Part 2

Following on from Part 1

Lets consider a simple example of in place v central records when it comes to aggregated content.

So imagine we have an image that will constitute a record at some point within it's lifecycle.
The sensible thing to do is create a content type for the image and define an appropriate information management policy etc.

So we are ready for the image to be published and viewed within our organisation. We may go through some approval or workflows and finally when all the business processes have been met, we declare it as a record....fine, that's the correct thing to do.

So we have a library containing our image content types and we use an image from the library in some content within our organisation - in this simple example we are using it within a publishing page layout.

So here's our image in all it's glory.


And here is our image content type in its document library.


So we now want to declare this as a record...fine.

In a central repository model we simple send to > records center and we are left with a nice link.
Great its now a record in our central repository.


And back to the home page.
Oh!!!!!

If we are using in place records management we can simple declare the record in situ.



And our image will not be removed.

Although this is a simple example it is an effective one.
Any content within your organisation is potentially a record, be it images, documents, etc etc.
As it is business content then it will probably come under the remit of some records management policy.

So when planning your records management architecture it is worth bearing in mind how you will aggregate any records-based content to other/all areas of your farm.

In place or central repository?
Plan, plan, plan !!!!!








SharePoint Event Receivers & Expiration Policy

More event receiver fun this week.

I've been writing some synchronous event receivers this week, one of which has been causing a headache, name ItemDeleting.

The event receiver acts correctly when users manually delete an item...great
The event receiver also acts correctly when a workflow deletes an item...great

If an item has an information management policy attached to it 'permanently delete' or 'move to recycle bin', the Expiration Policy timer job will kick in and delete the item.



BUT the event receiver will not be fired when the timer job executes!!!!!!

Cause : when the Expiration Policy timer job deletes an item it actually does an SPItem.SystemUpdate(); rather than SPItem.Update();


Worth bearing in mind if you need to capture an event driven from the Expiration policy timer job.

23/04/2013

SharePoint Records Repository & In Place Records Thoughts Part 1

Something I've been thinking about for a while now and finally decided to get something on record (see what I did there).

Records management in SharePoint is an emotive subject and I'm not going to cover the rights and wrongs of RM implementation.

I have had many discussions on the implementation of SharePoint records management with regards to In Place Records and a Central Repository approach, and while I agree each has it merits, one thing that many people don't consider is what actually constitutes a record and how do we manage a record once we realise that it's not just about documents.

So firstly lets identify what a record actually is......

Records Management ISO defines records as:
Information created, received, and maintained as evidence and information by an organization or person, in pursuance of legal obligations or in the transaction of business.

ICA's definition of a record as:
recorded information produced or received in the initiation, conduct or completion of an institutional or individual activity and that comprises content, context and structure sufficient to provide evidence of the activity.

In both the above definitions a record is defined as a piece of information but for some reason we all
think of a record as a document or group of documents. e.g. word, pdf, cad, excel etc etc.

This is where the SharePoint content types really do come to the fore. As we all know a content type can be any piece of information within a farm.

So it's easy...lets create a content type for each piece of information (impractical but possible).
Lets take a scenario.
Great Corp have an intranet and like most intranets they have news on the homepage.

Now this news may be an announcement content type or a custom content type, but very rarely is it a document, but it is a record.

But hey that's fine we will create a Great Corp News content type and use that as our news information container.

We'll even put our records managers hat on and give it an information policy, auditing, expiration and a workflow.

See it's dead easy given the wonderful functionality that SharePoint gives us.


So now we can add the news, as a content type, to our homepage.



Ok so now lets imagine that this piece of news is important, in fact its vital and can be classed as a vital record.

It may be a safety related piece of news or something similar which has to be managed following our formal records management process.

So lets declare it as a record, it's the sensible thing to do.

Scenario 1 - In Place Records

We can declare the news item (vital record) as a record using in place records management.


The vital record news item is now locked and cannot be edited or changed, which is absolutely correct.

Scenario 2 - Central Records Repository

Ok so lets declare this news item as a record inside our central repository

Oh wait a minute, we can only send document based records to our central repository.

OK it's not the end of the world, we can use our content type information management policy, workflow or similar to move it to the records centre.



We will have to move it and leave a link. If we copy it we will have two identical records in two different places in our farm...not good!

Gotcha....although the information management policy will let us set this rule, you cannot transfer a non document derived content type to the records centre!!!!


In conclusion

I understand the reasons that many organisations want to use a central repository for all of their formal records. However you should consider the following:

  • Much of your content within SharePoint will be list based and not necessarily document based.
  • Your information architecture policy should reflect this and you should identify the information that will constitute a record, not just the documents
  •  Declaration of records should take into consideration the limitations of a central repository without code and add-ons.

In part 2 I'll look at the technical issues that have to be overcome for central and in place records management....

01/11/2012

WSS Emailing Itself -: x-mailer: Windows SharePoint Services (version 3)

I had a case recently where a client wanted to send access request emails to an email enabled document library. We encountered the problem of WSS not being able to handle the x-mail header.
A solution was to create a vbscript that fired when an email entered the 'Drop' folder of IIS mailroot and stripped out the problematic header.
Initial testing proved successfull and this has now been implemented.
solution
1. copy Smtpreg.vbs into the c:\inetpub\AdminScripts - smtpreg is available to download from MS.

2. create a vbs file from the script below and copy it to the AdminScripts folder (I named mine wss)

<SCRIPT LANGUAGE="VBScript">


Sub ISMTPOnArrival_OnArrival(ByVal iMsg, EventStatus )

if iMsg.Fields("urn:schemas:mailheader:x-mailer") = "Windows SharePoint Services (version 3)" then
iMsg.Fields.Delete("urn:schemas:mailheader:x-mailer")
iMsg.Fields.Update
end if

iMsg.DataSource.Save
EventStatus = 0
End Sub




3. run the following commands to register the script

cd c:\inetpub\adminscripts
cscript smtpreg.vbs /add 1 OnArrival DeleteMsg CDO.SS_SMTPOnArrivalSink "mail from=*"
cscript smtpreg.vbs /setprop 1 OnArrival DeleteMsg Sink ScriptName "c:\Inetpub\AdminScripts\wss.vbs"

4. This will now catch all mail on arrival and remove the offending header.


19/07/2012

SharePoint Foundation 2013 Search

It appears that the lightweight search (search server express) is included in SPF 2013 with some nice additional web parts in the results interface


It also includes the refinement webparts on the left - note the timeline slider bar...NICE!

SharePoint 2013 HTML Field Security

Another nice feature of SP2013 is the ability to restrict what contributors can embed in site pages.

Under site collection settings there is an entry for HTML field security.


We can dictate what domains are safe regarding embedded content


When a user tries to embed code in an editable region they will get the following error if the domain isn't set in the HTML field security


However, note that the error tells the user of an alternate way to embed the code using the embed command.

So now if the user chooses embed from the ribbon


It appears that the HTML security is bypassed!!!!!


Definitely one to watch, especially if this still appears in the RTM version





SharePoint 2013 - New Task Lists

The task lists appears to remain much the same in SP2013
However the user interface has changed somewhat!

We now have a timeline that appears above the task list.


We can also change the colours of the task list items, something that we had to use jQuery for in the past.



We can also choose whether to display a task on the timeline


Another nice touch is the ability to indent tasks so that the list resembles MS Project


And finally the ability to open with project and sync changes back to SharePoint


*This is taken from the preview version of SP2013 and may be subject to change!

04/06/2012

Event Receivers redirect in tabular view

More event handlers and more pain!

Using a custom redirect on ItemDeleting works fine in tabular view with a SINGLE item selected.
e.g.
properties.Status = SPEventReceiverStatus.CancelWithRedirectUrl;

properties.RedirectUrl = "/_layouts/DeleteStub/stubError.aspx?errMsg=" + err;




However when we select multiple items


The event handler kicks in no problem but then the redirect fails miserably!!!



Event handlers have moved from being funky to painful over the last 12 months!


01/05/2012

SQL Fragmentation - lightweight script

The following script will iterate through all of your databases and report on the average fragmentation of your indexes for each DB.
Its less intrusive as it doesn't create any temporary tables and gives you a quick report on where fragmentation is most prevalent

DECLARE @DatabaseID smallint
DECLARE @DatabaseName varchar(255)  
DECLARE DatabaseCursor CURSOR FOR 
SELECT  dbid, name FROM master.dbo.sysdatabases  
--WHERE name NOT IN ('master','model','msdb','tempdb','distrbution')  
--ORDER BY 1 
OPEN DatabaseCursor 
FETCH NEXT FROM DatabaseCursor INTO @DatabaseID, @DatabaseName
WHILE @@FETCH_STATUS = 0 
BEGIN 
-----------------------------------------------------
  SELECT @DatabaseName as Database_Name, avg(avg_fragmentation_in_percent) as Average_Fragmentation FROM sys.dm_db_index_physical_stats (NULL, NULL, NULL, NULL, NULL)
  where avg_fragmentation_in_percent > 30 and database_id =  @DatabaseID
  
----------------------------------------------------- 
    
FETCH NEXT FROM DatabaseCursor INTO @DatabaseID,@DatabaseName
END 
CLOSE DatabaseCursor  
DEALLOCATE DatabaseCursor

26/04/2012

SharePoint SQL Fragmentation

Here a simple SQL script to show you the fragmentation of tables in your database....run it against any of the DB's in your SQL instance

Note - it creates and drops a temporary table to hold the report (fraglist)
I have set the threshold in this script to 30% fragmentation

DBCC SHOWCONTIG


/*Perform a 'USE ' to select the database in which to run the script.*/
-- Declare variables
SET NOCOUNT ON;
DECLARE @tablename varchar(255);
DECLARE @execstr   varchar(400);
DECLARE @objectid  int;
DECLARE @indexid   int;
DECLARE @frag      decimal;
DECLARE @maxfrag   decimal;

-- Decide on the maximum fragmentation to allow for.
SELECT @maxfrag = 30.0;
-- Declare a cursor.
DECLARE tables CURSOR FOR
   SELECT TABLE_SCHEMA + '.' + TABLE_NAME
   FROM INFORMATION_SCHEMA.TABLES
   WHERE TABLE_TYPE = 'BASE TABLE';
-- Create the table.
CREATE TABLE #fraglist (
   ObjectName char(255),
   ObjectId int,
   IndexName char(255),
   IndexId int,
   Lvl int,
   CountPages int,
   CountRows int,
   MinRecSize int,
   MaxRecSize int,
   AvgRecSize int,
   ForRecCount int,
   Extents int,
   ExtentSwitches int,
   AvgFreeBytes int,
   AvgPageDensity int,
   ScanDensity decimal,
   BestCount int,
   ActualCount int,
   LogicalFrag decimal,
   ExtentFrag decimal);
-- Open the cursor.
OPEN tables;
-- Loop through all the tables in the database.
FETCH NEXT
   FROM tables
   INTO @tablename;
WHILE @@FETCH_STATUS = 0
BEGIN
-- Do the showcontig of all indexes of the table
   INSERT INTO #fraglist
   EXEC ('DBCC SHOWCONTIG (''' + @tablename + ''')
      WITH FAST, TABLERESULTS, ALL_INDEXES, NO_INFOMSGS');
   FETCH NEXT
      FROM tables
      INTO @tablename;
END;
-- Close and deallocate the cursor.
CLOSE tables;
DEALLOCATE tables;
-- Declare the cursor for the list of indexes to be defragged.
DECLARE indexes CURSOR FOR
   SELECT ObjectName, ObjectId, IndexId, LogicalFrag
   FROM #fraglist
   WHERE LogicalFrag >= @maxfrag
      AND INDEXPROPERTY (ObjectId, IndexName, 'IndexDepth') > 0;
-- Open the cursor.
OPEN indexes;
-- Loop through the indexes.
FETCH NEXT
   FROM indexes
   INTO @tablename, @objectid, @indexid, @frag;
WHILE @@FETCH_STATUS = 0
BEGIN
   PRINT 'TABLE FRAGMENTATION (0, TABLE:' + RTRIM(@tablename) + ',
      ' + RTRIM(@indexid) + ') - fragmentation currently '
       + RTRIM(CONVERT(varchar(15),@frag)) + '%';

   FETCH NEXT
      FROM indexes
      INTO @tablename, @objectid, @indexid, @frag;
END;
-- Close and deallocate the cursor.
CLOSE indexes;
DEALLOCATE indexes;
-- Delete the temporary table.
DROP TABLE #fraglist;
GO

JQuery for SharePoint made simpler

Here's some simple JQuery to help you avoid looking for those annoying GUID's

var list = [];
var peoplePicker1;
var peoplePicker2;
var currentObject;

$(document).ready(function() {

// use this ^ for wildcard hiding/showing all items that begin with "xxx"
$('[title^="xxx"]').closest('tr').hide();
$('[title^="xxx"]').closest('tr').show();

$('DIV[id^="sectionSection2"]').hide();

// will need this to hide date/time fields
$('nobr:contains("Hire Car")').closest('tr').hide();

// use for text fields and drop down lists
var x = $('[title$="Authoriser"]').val();

// use for radio and checkboxes
// where title$ is the choice option
$('[title$="Enter Choice #1"]').click(function() {
alert('Please ensure you complete the Tracking section');

// get the radio button id
var tmp = $(this).children('input').attr('id');

// check its value
alert($("input[id="+tmp+"]:checked").val());
var checked =  $("input[id="+tmp+"]:checked").val();
if(checked == 'on')
{
// do something
}
});

// use for people pickers
// add each people picker to an array and assign it to a var
// start loop
$(".ms-inputuserfield").each(function(){
list.push($(this).text());
currentObject = $(this);
});
// end loop
peoplePicker1 = list[0];
peoplePicker2 = list[1];
currentObject.attr('disabled','disabled');

var currentUser = $().SPServices.SPGetCurrentUser({
 fieldName: "Title",
 debug: false
});

// check if the user is an admin user
function isAdmin(user)
{
    var adminUser1 = "System Account";
    var adminUser2 = "john smith";
    var adminUser3 = "john doe";
    var adminUser4 = "dave nixon";
    var adminUser5 = "fred smith";
if(user == adminUser1 || user == adminUser2 || user == adminUser3 || user == adminUser4 || user == adminUser5)
{
return "admin";
}
else
{
return "not admin";
}
   
}
function CheckForAttachment()
{
  var elm = document.getElementById("idAttachmentsTable");
  if(elm == null || elm.rows.length == 0)
  {
    alert("No e-training form attached");
    return false;
  }
  else { return true; }
}
function PreSaveAction()
{
  return CheckForAttachment();
}




});

International SharePoint Conference - London

First a big thanks to Steve Smith for another excellent gig.

While I agree there weren't too many new aspects to SharePoint 2010 and the sessions, there were some great angles on the risks and issues, development and case studies.

My favourite picks:
1. Bill English and and Andrew Woodwards business tracks.
2. Jess Meats case study on her own troubles with SharePoint
3. Wictor Wilens BCS/Dev track
4. Neil Hodgkinsons Search and SQL track.

I thought Jess's honesty on her particular implementation of a SharePoint rollout was refreshing - sometimes it's good to see that despite all the best practices in the world, sharepoint can still provide a business function even if it's rolled out 'wrongly'.

18/02/2012

Event Handlers - redirecting and httpcontext

I've been developing some event handlers, specifically on itemdeleting events and once again some SP quirks are making things difficult.

So lets imagine we want a simple event handler that intercepts itemdeleting, cancels the delete and redirects the user to a custom page.

the code is very simple

public override void ItemDeleting(SPItemEventProperties properties)
{
try
{
string url = properties.WebUrl.ToString();
string listname = properties.ListTitle.ToString();
using (SPSite site = new SPSite(url))
{
site.AllowUnsafeUpdates = true;
using (SPWeb web = site.OpenWeb())
{
web.AllowUnsafeUpdates = true;
SPList myList = web.Lists[listname];
if (myList.BaseType == SPBaseType.GenericList)
{
if (list_allow_delete == "no")
{
properties.Status =SPEventReceiverStatus.CancelWithRedirectUrl;
properties.RedirectUrl = "/_layouts/customError.aspx";


simple really...but there are quirks!!!

1. When a user deletes the item using the ribbon menu in the library or item they get successfully redirected to the custom page.




2. If the user deletes the item from the context menu they do not get redirected to the custom error page, instead the standard error message is displayed.



Bummer!

So the first thing that comes to mind is the httpcontext so we ensure the context in the constructor

some more simple code -
public class DeleteStubEH : SPItemEventReceiver
{
///
/// An item is being added.
///

///
HttpContext current;

public DeleteStubEH ()
{
current = HttpContext.Current;

}


If we check the context as we run through the code we can see a quirk.

If the user uses the ribbon to delete then the httpcontext remains throughout the code.
If the user users the context menu to delete then the httpcontext is lost!!!!

Ok, lets create a new context object to ensure we have an httpcontext object

if (current == null)
{

HttpRequest request = new HttpRequest("", web.Url, "");
current = new HttpContext(request, new HttpResponse(new StringWriter()));
current.Items["HttpHandlerSPWeb"] = web;
}

The result - still no redirection to our custom error page!!!!!

So I attempted a work around using the old redirect utility.

SPUtility.Redirect("/customError.aspx", SPRedirectFlags.RelativeToLayoutsPage, current);

Still doesn't work!!!!

I'm not sure if this is a context menu bug or not but its certainly annoying!
I will continue my search for a 'cure'

29/12/2011

Gantt Views and SharePoint Crawls

I have been doing some cleanup on my 2010 dev environment and noticed the following error in my crawl log - "The crawler could not communicate with the server. Check that the server is available and that the firewall access is configured correctly"

Immediately I thought there was a comms or authentication issue but further investigation into the event logs provided more info.

Exception information:
Exception type: SPException
Exception message: This view requires at least Microsoft Internet Explorer 7.0, Mozilla FireFox 3.0, or Apple Safari 3.0.

It appears that the Gantt view is inaccesible to the crawler, or more specifically the user-agent the crawler uses.

If we look at the reg key for the user-agent it seems that the correct user-agent version is being used

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office Server\14.0\Search\Global\Gathering Manager\Mozilla/4.0 (compatible; MSIE 4.01; Windows NT; MS Search 6.0 Robot)

So although the Gantt view is verifying that the correct user-agent is being used to render the view, the gathering manager doesn't seem to be passing its user-agent properties through during the crawl.

15/11/2011

SharePoint In Place RM - Unified view

One of the biggest complaints of in place records management is the inability to get a unified view of all the records in the system.

Obviously this isn't a problem in a central records center but as more people are moving towards 'in place' certain gaps are being identified.

Thankfully we have the API, specifically this:

public static bool IsRecord(
SPListItem item
)

So if we recurse all the site collections, webs and lists we should begin to get an idea of the records and where they sit.

Maybe a dictionary to hold the info (name, version etc etc)

Perhaps a treeview to render the classification (site based or term set)

So lets wrap that in a web part and a treeview for navigation.

This navigation is based on the term set.



Clicking the tree node will open all the records in that term set



It's a good start and i will continue to develop it.

14/11/2011

IPSV Term Store for SharePoint

Following on from the LGCS here's the IPSV

Please note this has nearly 8000 terms in the csv and will take a long time to import into the term store.

Useful for those still wanting to use this huge vocabulary in SharePoint 2010

IPSV Term Set

LGCS Term Store for SharePoint

As SharePoint is beginning to grab a hold within the UK public sector I thought I would make available the LGCS term store...hope it saves you time!

LGCS Term Store - download