SharePoint Bending: Allow Non-Administrator Users to Write to the Event Log

Windows SharePoint Services 3.0
Recently, a colleague asked me about an error that happened after he moved a WSS 3.0 Web site from the development to the production server.

When logged in as an administrator, all pages can be accessed successfully. But as a regular user, I got an “Access is denied” page when opening some pages containing some custom web parts with the following exception detail: System.ComponentModel.Win32Exception: Access is denied. Below it, in the stack trace, another exception popped: InvalidOperationException: Cannot open log for source ‘Some_webpart’. You may not have write access.

This happens because non-administrator users do not have—by default—the permission to write to the event log. So for this problem, just give the non-administrator users permission to write to the event log. If only it is that simple. Unfortunately, there are no easy (user-friendly) ways. To do this, follow the following steps:

  1. Fire up the registry editor which is usually located in C:\WINDOWS\regedit.exe.
  2. Navigate to: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Eventlog\Application.
  3. Look for the entry CustomSD, it should contain string similar to:

    O:BAG:SYD:(D;;0xf0007;;;AN)(D;;0xf0007;;;BG)(A;;0xf0007;;;SY)(A;;0x7;;;BA) (A;;0x7;;;SO)(A;;0x3;;;IU)(A;;0x3;;;SU)(A;;0x3;;;S-1-5-3)

    The string is formatted as an SDDL, you can find more information about the format at Microsoft’s site.

  4. Now tell Windows to give the event log’s read-write permission to all authenticated users. To do this, append the string (A;;0x3;;;AU) to the entry CustomSD thus it becomes:

    O:BAG:SYD:(D;;0xf0007;;;AN)(D;;0xf0007;;;BG)(A;;0xf0007;;;SY)(A;;0x7;;;BA) (A;;0x7;;;SO)(A;;0x3;;;IU)(A;;0x3;;;SU)(A;;0x3;;;S-1-5-3)(A;;0x3;;;AU)

After following the above steps, retry visiting the pages on your SharePoint site. Now the “access denied” problem should have gone. Hope this will help you running your MOSS 2007 or WSS 3.0 installation on Windows 2003 Server.

Disclaimer: remember to backup your registry before making any changes. I am not responsible for your system damages because of any registry errors.

Should LINQ End SubSonic (and Other DAL Tools)?

SubSonicFirst, I’d like to say that SubSonic is really really awesome. I just know SubSonic for three or four months, but I already created some new projects and converted some old ones with SubSonic. And they were commercial projects.

Compared to SubSonic, all other DAL tools look “awful”. I’ve been using plain old ADO.NET, NetTiers, NHibernate, and even created my own DAL tool. But once I use SubSonic, I suddenly have more time to date, play games, watch movies, and do other fun things.

Regarding LINQ, this stuff is simply great. It is not just yet another DAL tool. It even extends the language with querying capabilities, not just to DB but almost everything. I just had the chance to play with it yesterday—although I have read about it for a long time—, and I was very impressed. If only Microsoft had created it earlier.

Yes, LINQ currently only supports SQL Server, but this is really just a matter of time. Soon more providers will emerge surely.

Having the advantages of being provided out of the box with .NET Framework 3.5, the cool query keywords built-in the languages, as well as the capability to query beyond database, I think it will be extremely hard not to pick LINQ over other DAL tools.

So, for pure DAL tools out there, I guess this is the end. But for SubSonic, I don’t consider SubSonic is merely a DAL tool, but a great time saver.

The “convention over configuration” mantra that it brought from the sacred realm of Ruby on Rails simplifies many things. For example, SubSonic will know whether my tables have some auditing fields (i.e., CreatedOn, CreatedBy, ModifiedOn, ModifiedBy) and populate them automatically for me. It knows when to use soft or hard delete by checking if there is a Deleted or IsDeleted field in a table. Did I mention SubSonic has auto scaffolding and the useful utility classes (a.k.a. SubSonic Sugar)? All of them is really a great time saver.

SubSonic spoils me so much I hate to not being able to use it in my projects. I really hope that SubSonic can work hand in hand with LINQ to ease developer’s life much further. The combined strength of language level queries provided by LINQ and the “convention over configuration” mantra and utilities provided by SubSonic will certainly grant developers with a great power to finish projects better and faster.

Interesting Flash and FreeHand Stories

Adobe SystemsAdobe Systems—the well-known software company, creator of Acrobat, Photoshop, Postscript—do not create all their software by themselves. It is true that they create their own flagship products such as Acrobat, Illustrator, Photoshop, and Postscript. But they—like Microsoft—also acquired products from their competitors. Some notable acquisitions include when Adobe took over Aldus Corporation in 1994 to acquire PageMaker—the popular Windows desktop publishing (DTP) software—along with the TIFF file format, and when in 1995 they bought FrameMaker—also a DTP software—from Frame Technologies. The latest and biggest acquisition is in 2005 when Adobe acquired their main rival Macromedia in a stock swap valued at about USD 3.4 billion.

I notice there are at least two interesting stories related to Adobe’s acquisitions.

Adobe FlashThe Flash Story

Flash is a light weight multimedia application suitable for Web and mobile devices. Flash consists of two parts: the authoring tool (Adobe Flash Professional) and the player (Adobe Flash Player).

In case you do not aware, Macromedia was not the first creator of Flash. In fact, Macromedia had Shockwave as their multimedia application for the Web. The problem is Shockwave movies were often slow-to-download with the Internet connections back then. At the mean time, FutureWave—a small software company—had a drawing application product called SmartSketch. As many became aware of the Internet, in 1995 FutureWave decided to add frame-by-frame animation features to SmartSketch and re-released it as FutureSplash Animator for PC and Macintosh, which successfully challenged Shockwave.

FutureSplash Animator was originally offered to Adobe, but Macromedia got it in an acquisition in December 1996. Later, Macromedia released it as Macromedia Flash 1.0. Macromedia continued to develop Flash and their last release was Macromedia Flash 8 in 2005.

As Adobe bought Macromedia, Flash finally fell in Adobe’s hands. Starting from version 9, Flash was rebranded as Adobe Flash and the authoring tool was integrated into Adobe Creative Suite 3 as Adobe Flash CS3.

Adobe FreeHandThe FreeHand Story

FreeHand is a vector graphics drawing program.

Unlike Flash, FreeHand’s story was rather sad. In the beginning, FreeHand was created by Altsys but licensed to Aldus which released versions 1 to 4 under the name Aldus FreeHand. Aldus later was merged with Adobe along with all Aldus’ product lines—including FreeHand. Unfortunately, by that time, Adobe already had their own product serving the same purpose called Adobe Illustrator. Because of the overlapping market, Adobe returned FreeHand to Altsys.

Later, Altsys were bought by Macromedia. Macromedia released versions 5 to 11 of FreeHand with the Macromedia FreeHand brand. Macromedia used the brand Macromedia FreeHand MX to signify version 11. Since 2004, FreeHand didn’t get significant update since Macromedia favored Macromedia Fireworks and chose to leave FreeHand out of their bundled suite called Macromedia Studio 8. Though the intention of the two products were different—i.e. Fireworks for Web, FreeHand not for Web—most of FreeHand features were already incorporated into Fireworks, there were no needs to own both programs.

After Adobe’s acquisition over Macromedia, FreeHand once again returned to Adobe. But FreeHand’s future didn’t seem to brighten up. Adobe Creative Suite only included Illustrator and Fireworks while FreeHand’s users were allowed to upgrade to Adobe Illustrator CS3.

~~~

Morale of the story:

We have an idiom in Indonesian language saying: “Kalau Jodoh Tak Kemana”. I don’t have any idea how to say this in English, but it means that if something or someone is destined to be with you, it will return to you at last anyway.