by Victor
15. June 2010 22:24
1. Create a project (It seems .net 4 doesn't work well with SharePoint 2007)
2. Add the reference to Microsoft.Office.Server.dll. (C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\ISAPI)
3. The log code looks like this.
try
{
throw new Exception("This is a test");
}
catch (Exception ex)
{
Microsoft.Office.Server.Diagnostics.PortalLog.LogString(ex.Message, null);
}
Done