3

It appears that my eventHandler only seems to receive the event when an Admin user updates a document on the list. Ive used the event manager made by brian wilson to register the event.

Does anyone know if the non admin users need some kind of special permissions? Is the eventHandler not correctly registered?

The eventhandler reads an external file (the current user has read persmissions) then a httpwebrequest is perfpormed. I am also using system.diagnostics to log things in the eventlog. will try to reduce the eventhandler to bear-bones (everything empty with the exception of the eventlog entry) and see what happens

ok ive trimmed down the code to the following and just tested it, still the same, the only event in the log is from the administrator:

using System; using System.Collections.Generic; using System.IO; using System.Net; using Microsoft.SharePoint; using System.Diagnostics;

namespace myEvents { /// /// writes a log entry when an item is updated. /// ///

    public class myEventHandler : SPItemEventReceiver
    {

        public override void ItemUpdated(SPItemEventProperties properties)
        {

            string EventLogName = "MySharepointEventListener";
            if (!EventLog.SourceExists(EventLogName))
                EventLog.CreateEventSource("event listener", EventLogName);
            EventLog.WriteEntry("event listener","in event listener", EventLogEntryType.Information);     

       }

    }
}
1
  • which event handler are we talking about? what event? Please add some code so we can assist you better Commented Aug 13, 2010 at 9:02

2 Answers 2

2

The event is probably received but the receiver might not have sufficient permissions to perform the work it is supposed to... Make sure the logic does not require elevation.

1
  • Hi, The eventhandler reads an external file (the current user has read persmissions) then a httpwebrequest is perfpormed. I am also using system.diagnostics to log things in the eventlog. will try to reduce the eventhandler to bear-bones (everything empty with the exception of the eventlog entry) and see what happens
    – Anonymous
    Commented Aug 13, 2010 at 10:10
3

System.Diagnostics requires administrative privilegies on the server - that's why your normal users cant use it.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.