Wednesday, July 28, 2010

Sharepoint 10 - Restore job-immediate-alerts Job Definition in farm for a site

stsadm -o setproperty -propertyname "job-immediate-alerts" -url "http://sharepoint" -propertyvalue "every 1 minutes between 0 and 59"

Some times we need to get the property value:

stsadm -o getproperty -pn alerts-enabled -url http://sharepoint

Wednesday, July 21, 2010

SharePoint 9 -Some Useful Tool

1.
U2U CAML Query Builder

http://www.u2u.be/res/tools/camlquerybuilder.aspx
http://www.u2u.info/Blogs/Patrick/Lists/Posts/Post.aspx?ID=1252

2. Event Reciever Explorer.

Tuesday, July 13, 2010

Synchronization Contexts

Synchronization Contexts provide a mechanism to lock declaratively/Automatically.

ex:
using System;
using System.Threading;
using System.Runtime.Remoting.Contexts;

[Synchronization]
public class MyLock:ContextBoundObject
{
public void DoSomething()
{
//do something....
}
}

public class MyTestClass
{
public static void Main()
{
MyLock instance=new MyLock();
new Thread(instance.DoSomething).Start();
new Thread(instance.DoSomething).Start();
instance.DoSomething();
}
}