.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Sharepoint Event Handler not firing

Posted By:      Posted Date: September 03, 2010    Points: 0   Category :SharePoint
I have written an event handler for an ItemAdded eventfor a document library. I am trying to read an excel file being uploaded and extract a value from it which I write to a list column for the item. I have this working properly on my development machine which is a Windows Server 2003 machine.However, on a production Windows Server 2008 machine, the event handler never fires. I am doing a simple write to a log file to test and see if it runs at all even if the Excel parsing does not work but I get no indication that it ran. The event handler is being registered with a feature that I am deploying. I have verified that the event handler is registered to the library by using the u2u Event Handler Explorer tool.Is there any way I can determine if my event handlers are even executing? How can I debug this?

View Complete Post

More Related Resource Links

ItemAdded Event Handler not firing

Hi, I have created an ItemAdded Event handler that is linked to a content type. This event handler does certain custom validations and then sends Email to users. I have referenced this event handler in XML file as well but somehow the event handler is not getting fired...Following is the code.   Code Snippet            this.DisableEventFiring();            using (SPSite site = new SPSite(properties.SiteId))            {                 using (SPWeb web = site.OpenWeb())                {                    base.ItemAdding(properties);                     SPList nList = web.Lists["NList"];                    SPList IList = web.Lists["IList"];                     foreach (SPListItem listItem in nList.Items)                    {                        if (listItem["Topic"].ToString() == properties.ListItem["Topic"].ToString())                        {                            SPUser alertUser = (SPUser)(properties.ListItem["SUser"]);                            SPUtility.SendEmail(web, false, true,alertUser.Email,"New item added", "A new item has been added");                         }                    }                    this.EnableEventFiring();                }            }       The XML file is: Code Snippet  <XmlDocuments>      <XmlDocument NamespaceURI="http://schemas.microsoft.com/

Execute Javascript from Sharepoint Event Handler

Hello, I want to execute a sample java script function from itemadding event of sharepoint event handler.  How can i achieve this? Please Help.   Thanks in Advance

Grid's PreviewMouseRightButtonUp event handler not firing until I changed something...don't unders


So to keep this brief, my heirarchy is: Window ->Canvas ->Listbox -> Grid (part of template for listbox) -> etc.


I wanted a draggable selection box so I did the fairly standard thing of rendering a square to the screen by using a drawing visual within a host class and then adding that drawing visual to the tree with the main helper methods. The PreviewMouseRightButtonUp event handler however, of my grid, was never being fired unless I just clicked without dragging. In other words, if I dragged on my grid to create my selection square, the PreviewMouseRightButtonUp event handler of the grid is never being fired. So, instead I associated this eventhandler with the PreviewMouseRightButtonUp event of my Visual host (which contains my square drawing visual) and the event fires.

Pretty much, the PreviewMouseRightButtonUp event never bubbles down the grid for some reason after I my drawing is rendered to the screen. Can anyone answer why or do you need to see source code?

SharePoint Designer and Event Handler


Does SharePoint Designer 2010 has a way to add event handler. For e.g. I have a workflow for a list where everytime a certain field gets updated I would like to make that item read-only.


Can I do this in SPD. I don't have Studio yet.


Button click event handler firing twice

I noticed today that button click event handlers are firing twice for me in some cases when the button is inside an UpdatePanel -- but only in Firefox.  I'm wondering if this might have to do with the Firefox update that came out today because I never noticed this problem until today.  Has anyone else run into this problem?

Event handler firing for one site but not for another



I have an event handler that is working just fine on a list in one site, but when I bind it to the other list in another site, it binds properly, but never fires. Any suggestion? 


SSL System Impact on Sharepoint BDC, Workflow & Event handler



if SSL  implement on existing  Sharepoint portal .what is the impact of  existing Sharepoint BDC, Workflow &  Event handler ?




Surendra Singh

Event Handler (send mail task) firing multiple times for each dataflow error - How can I stop the da


I've set up an OnError event handler for my package which sends an email containing the name of the file that fails import through my dataflow task. The problem is the dataflow experiences three errors (one for each task it is attempting to complete) which in turn causes three duplicate emails to be sent.

I'd prefer to stop the dataflow task completely rather than allow it to try to complete the remaining tasks after the first error. Is this possible? Alternately, how can I set up my event handler to only send one email regardless of the number of dataflow errors that occur?

Thanks in advance!

Creating Event Handler in Code behind


Hi, so I have a control that is created in the code behind and generates fine but I can't figure out how to create an event handler for it.  I've found plenty of examples for it in C sharp, but none of them seem to apply to VB.  What I want to do is essentially this:

myDropDownList.SelectedIndexChanged = "Event to do here"

but it doesn't seem to work for me.

Any suggestions are appreciated.

want to launch modal Popup from created User Event handler




I have a create user wizard on my page and in the event handler (Created User) I get extra information from the user

via textboxes within the aspx etc.


I then do a response.redirect to another page.

What I want to happen is this


When the CreatedUser Event is fired, I  want a Modal Popup to show up with a message Processing your registration.

once the registration code is processed it will close and the users get redirected.


On my ASPX I have the Modal PopUp and a Panel.

In the code behind in the handler I put ModalPop.show()


but this does not work.


thanks for any suggestions



InfoPath Workflow Task Form "Loading" event handler only being called after App Pool recycled.


I have a Workflow that is using an InfoPath task form.  In the "FormEvents_Loading" method event handler I have some code that needs to run each time the form is opened.   I recycle the App Pool and open the form the code runs perfectly, but if I close and try to re-open the form the code is not run at all.  I can then recycle the App Pool again and on the next load the code executes just fine.   The code that is supposed to be run is a very simple statement to set a field value, so I don't think it is interfering.

Does anyone know what this might be?


Event Handler Credentials


I made EH that checks out document when OOB Approval WF is finished successfully.

I want doc to be checked out by WF Initiator, but by default it is made by System Account.

How can i change Event Handler Account ?

Windows SharePoint Services 3 Search Event ID 2424


This error started on 29 April and I cannot get rid of it...  My search works fine, both site and people.  AD profile import works fine.  Full and incremantal crawls work as scheduled.  Just that this error keeps showing up every five minutes in one of two WFE's.  The other WFE does not receive this error


I have verified all Security Configuration/Service Accounts, verified all Services on Server/Search accounts, Stopped/Restarted all search, and verified SSP accounts.  The last thing I did was verify there was an indexer attached to the SSP...

I set the diagnostic logging to verbose and the only thing that stood out around the time of the error was

System.Data.SqlClient.SqlException: Invalid object name 'AR_CacheCounters'.

SqlError: 'Invalid object name 'AR_CacheCounters'.'    Source: '.Net SqlClient Data Provider' Number: 208 State: 1 Class: 16 Procedure: 'proc_ar_GetCacheInvalidationCountersWithCount' LineNumber: 3 Server: 'SERVER'


Any suggestions?







Quick Note: Add Event Receivers to SharePoint 2010 Lists

In this exercise, you add an event receiver to a custom Microsoft SharePoint 2010 list that is triggered when you attempt to delete an item in the list.

Feature Stapling and the FeatureActivated Event in Windows SharePoint Services 3.0

You can attach (or staple) a SharePoint Feature to a site definition without modifying the original site definition. Learn about issues related to using Feature Stapling with the SPFeatureReceiver.FeatureActivated event.

Pre_Init event handler problem


Hi all my friends

   I have to masterpages for my home page.

1. The first is for the annonymous users which has the login controls. its name is General_Anonymous.master.

2. The second one is for the logged in users which has a logout button and it hasn't the login controls in it. its name is General_LoggedIn.master.

in my default.aspx page I wrote the following code

protected void Page_PreInit(object sender, EventArgs e)
            if (Session["SupId"] == null && Session["CustomerId"] == null)
                this.MasterPageFile = "~/Masters/General_Anonymous.master";
                this.MasterPageFile = "~/Masters/General_LoggedIn.master";

MouseUp event not firing on ActivityDesigner class?

I have a custom control derived from ActivityDesigner.  I'm basically retemplating the contol to give it a stylized look and feel ... I want to add the ability to change the Display Name by swapping out the TextBlock with a TextBox on MouseUP - but this event is not firing. I can handle the MouseDown event and it works OK, except it enters the Edit mode when dragging the activity around.  Is the MouseUp handled at the base level?  Is there a way to work around this? 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend