LinqPad: More than just a LINQ tool

LINQPad lets you interactively query databases in a modern query language: LINQ

LINQPad supports everything in C# 4.0 and Framework 4.0:

LINQ to Objects
LINQ to SQL and Entity Framework
LINQ to XML

Note: LinqPad also supports .NET Framework 3.5 as well

And that’s not all – you can also query:

OData / WCF Data Services – including StackOverflow
SQL Azure, SQLite and MySQL Enterprise Server
Mindscape LightSpeed ORM
(Even old-fashioned SQL!)

LINQPad is also a great way to learn LINQ: it comes loaded with 500 examples from the book, C# 4.0 in a Nutshell.  There’s no better way to experience the coolness of LINQ and functional programming.

Best of all, LINQPad standard edition is free..what are you waiting for…go give it a try!!!

Download LinqPad:
http://www.linqpad.net

Advertisements
Categories: .net framework, linq

Search for Office 2007 files on WSS

When a Microsoft Windows SharePoint Services 3.0 site collection is searched by the Windows SharePoint Services Search service, the following 2007 Microsoft Office document types are not indexed:

e.g.
Microsoft Office Excel 2007 (.xlsx, .xlsm)
Microsoft Office PowerPoint 2007 (.pptx, .pptm)
Microsoft Office Word 2007 (.docx, .docm)

Reason:
Ifilter for Office 2007 is not installed.

Solution:

1.Download and Install Office 2007 Microsoft Filter Pack
http://www.microsoft.com/downloads/details.aspx?familyid=60c92a37-719c-4077-b5c6-cac34f4227cc&displaylang=en&tm

2.Register the Ifilter on your SharePoint index server
http://support.microsoft.com/?id=946338

Now, SharePoint search will return Office 2007 documents in search results

Fab 40 Templates for SP 2010

Fab 40 templates were free templates released by Microsoft for sharepoint 2007 and wss 3.0 to address some of the common scenarios encountered by SharePoint administrators, developers and event business/Marketing managers to demonstrate and show case some of the capabilities of MOSS to end users.

Same templates have now been released for SP 2010 (though not all the 40)

More Information
http://techsolutions.net/Blog/tabid/65/EntryId/17/Fab-40-Templates-for-MOSS-2010.aspx

Getting the content type in event handler

Itemadding Event

SPContentType = properties.ListItem.ContentType;

Itemadded Event

SPList listName = properties.listName;string contentTypeName = properties.AfterProperties["ContentType"].ToString();SPContentType contentType = list.ContentTypes[contentTypeName];

Developing Applications for SharePoint 2010

Developing Applications for SharePoint 2010 contains guidance documentation, detailed examples, and a reusable class library. These resources are designed to help solution developers and architects make the right decisions and follow proven practices when designing and developing applications for Microsoft SharePoint 2010. The guidance focuses on the building blocks that every developer needs to understand to become an effective SharePoint developer or architect. The guide is provided as a Help (.chm) file and has four core areas: application foundations, execution models, data models, and client models. Eight reference implementations illustrate the core concepts covered in the guide. The reusable class library provides code to help developers build more manageable, flexible, and testable applications. Source code is provided for all reference implementations and for the reusable library. The reference implementations have automated setup scripts to configure the applications.

Download:

A declarative workflow does not start automatically after you install Windows SharePoint Services 3.0 Service Pack 1

If you are using the WSS 3.0 SP 1 there is a known issue of a declarative workflow not starting automatically under following conditions

1. The Windows SharePoint Services Web application runs under a user’s domain account.
2. The user logs in by using this domain account.
3. The site displays the user name as System Account.

Refer the Microsoft Support Article for more info and resolution
http://support.microsoft.com/kb/947284

Categories: SharePoint, workflow, wss

Prevent SharePoint Timer Jobs from running multiple times

You developed a timer job and deployed it to your SharePoint farm. The timer job was supposed to send one email but you get more than one…what is wrong here???

The timer job is working fine and the results are fine, but only thing is that it running multiple times…

This is a common scenario people face when they develop and deploy a timer job in a SharePoint farm

The solution is setting SPJobLockType to Job

SPJobLockType.None – The timer job runs on every machine in the farm on which the parent service is provisioned, unless the job I associated with a specified server in which case it runs on only that server (and only if the parent service is provisioned on the server).

SPJobLockType.ContentDatabase – Locks the content database. A timer job runs one time for each content database associated with the Web application.

SPJobLockType.Job – Locks the timer job so that it runs only on one machine in the farm.

/// 
/// Constructor
///

public StatusEmailTimerJob(string jobName, SPWebApplication webApplication,SPSite site)
: base(jobName, webApplication, null, SPJobLockType.Job)
{
Title = "StatusEmailTimerJob";
}
Categories: SharePoint, timer job