Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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

       }

    }
}
share|improve this question
    
which event handler are we talking about? what event? Please add some code so we can assist you better –  Anders Rask Aug 13 '10 at 9:02

2 Answers 2

up vote 2 down vote accepted

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.

share|improve this answer
    
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 Aug 13 '10 at 10:10

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

share|improve this answer
2  
agreed - check out @AKrasheninnikov's ealier comment on privilege elevation. Here is a link to MSDN "how to" content: msdn.microsoft.com/en-us/library/bb466220(office.12).aspx –  Anonymous Aug 14 '10 at 4:38

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.