Wednesday, December 29, 2010

Cannot open log for source ‘Custom_Web_Part’. You may not have write access

In a SharePoint site, When I logged in as an administrator, all pages accessed successfully. But as a regular user it scolded me with Access denied Error :-)

Enabled the stack trace and Turned off custom error message page to get the actual error.

Error detail: System.ComponentModel.Win32Exception: Access is denied. Below it, in the stack trace, another exception popped: InvalidOperationException: Cannot open log for source ‘My_Web_Part’. You may not have write access.
Cannot open log for source My_Web_Part. You may not have write access.

This is because non-administrators do not have the permission to write on the event log. So for this problem, just grant non-administrator users permission to write on the event log.

  1. Open registry editor by typing "regedit" in run box.
  2. Navigate to: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Eventlog\Application
  3. Look for CustomSD, it should contain string:
     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 change the value 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, So 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)
Always, Its a best practice to Backup registry before you do any change.

You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.

Check out these SharePoint products:

No comments :

Post a Comment

Please Login and comment to get your questions answered!

You might also like:

Related Posts Plugin for WordPress, Blogger...