SharePoint Bending: Allow non-administrator users to write to the event log

March 4th, 2008

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)?

August 7th, 2007

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

April 26th, 2007

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.

Web Development Resources

April 13th, 2007

Since I have been in Web Development for like forever, I’d like to put some resources I found useful and interesting for my future references. If this can also help you, that’s cool.

Clearing Floats Elegantly

The tutorial will introduce and guide you to clear floating elements. It also deals with browsers’ specific problems.

Chatcreator

This allows you to easily embed a chat box anywhere in your Web page. You only need to enter a few properties, such as chat title, font, box size, and color. Then they will provide you with a JavaScript code to put somewhere in your Web page.

CSS for Bar Graphs

A good tutorial to show you how to create bar graphs only with CSS.

CSS for Bar Graphs

Custom Radio (Option) Buttons and Checkboxes

You can customize your radio buttons and checkboxes using this tool.

Custom Radio (Option) Buttons and Checkboxes

Fancy Menu with JavaScript and CSS

A tutorial on creating a very cool menu with JavaScript effect and CSS.

Forms Without Tables

Want to create forms without tables? Take a look at this tutorial.

Forms Without Tables

Light Weight CSS Tabs

Using CSS to create light weight tabs for Web navigation.

Light Weight CSS Tabs

Star Rating

A tutorial on how to create interactive star rating using CSS.

CSS Star Rating

Transparent PNG in Internet Explorer 6 and Older

Prior to Internet Explorer 7 — i.e., IE 6 —, IE cannot render transparent PNG images correctly. Fortunately we can resolve the problem pretty easily using JavaScript. Find the JavaScript code and tutorial on how to use it in the above link.

Five Things Today’s IT Workers Must Do

November 10th, 2006

Bill Gates said the West is lacking talented IT workers. Representing the East, India is also heading towards a severe shortage of highly-skilled IT manpower. So now there is a great and broad chance for you, who live and breathe IT, to fill the gaps.

But keep in mind, that what the world is lacking is highly-talented IT workers, not average or even below average ones. Hence you must prepare and build yourself to be outstanding so the world chooses you.

Here are five quick tips for you so you won’t be just another IT worker:

1. Get Updated

The word “information” in IT is there for a reason. IT evolves very quickly. Things you learn today may be obsolete tomorrow. That’s why you must always update yourself with new information, knowledge, and skills if you want to keep up with others in IT industry.

2. Get Certified

You have built solutions in .NET Framework for 5 years. You think you are already a .NET expert, but does the market think so too? Larger companies usually recruit only certified workers. Some companies don’t ask if you are a graduate of Harvard, but they do ask if are a certified Java developer. Get certified and you will likely find your value much higher than before.

3. Get Connected

Gone are the days when a programmer sat in the corner, facing only his monitor and keyboard, typing cryptic codes only a computer could understand. Now you might still sit in the corner, facing your monitor and keyboard, but you must not only type cryptic codes. Instead get connected to other people. Share your knowledge, receive others. Today there are many ways to get connected even if you are not physically in touch. Online chatting, forums, blogs, wikis, and telephones to name a few.
Humans are social-beings. Naturally they enjoy doing things with others. Being an IT worker shouldn’t make you a nerd. Meeting other people lets you learn more and opens even more opportunities.

4. Predict the Market

Face it, there are way so many information and knowledge related to IT you won’t be able to digest them all even if you learn 24/7. Who cares if you are an ultra fast learner and able to learn at least 1 new technology everyday. There will be hundreds more the next day.

So be wise, learn only things you will need. Or better, learn only things the market will need. There are many languages to code in .NET: VB.NET, C#, Managed C++, J#, A#, APL, Chrome, NetCobol, F#, KPL, DotLisp, Ruby.NET, etc. Do you have to master them all? Will people seek you because you know a lot of programming languages? Predict the market. Find out what the market needs today or will need tomorrow. Master it and you will find yourself most welcomed.

5. Open Your Mind

Just because you are a developer in Microsoft platform doesn’t mean you only need to know the solution offered by Microsoft. There are a swarm of other vendors and technologies out there for you to explore. A vendor may be good in providing business solutions, but not in technical or other solutions. You can develop a solution using Oracle backend, Microsoft .NET framework as a frontend, and Linux in the middle for example. Do not limit yourself to certain vendor or technology. Your vendor and technology today might die tomorrow. And it is not uncommon in the IT industry.

Open your mind to innovation too. You don’t always have to think the way other people thinking. Think differently. Create new thinks. You could be the next Linus, Rasmus, Larry, or Bill, who knows.

Also open your mind to the world outside IT. Learn business, management, psychology, art, design or whatever knowledge relevant to what you want to achieve in the future. If you are a programmer but you don’t enjoy your job, don’t push yourself. Move to something else. You don’t have to make a radical maneuver. If you still want to be in IT industry but you hate coding, you can be a system analyst or database administrator for example. Or if you have a good managerial or business skill you can apply for a managerial position instead.

Enough for the tips, next things you will need are the perfect opportunity and a good luck.