I created a custom Event Receiver using WSP builder, and in elements.xml file i have given the ID of list which i find in elements.xml of List definition of particular list.
I also activated the feature, but event handler isn't triggering, neither can i attach my code as symbols are not loaded, i tried attaching it to OWSTimer.exe.
here's the element.xml for the event handler feature
<?xml version="1.0" encoding="utf-8" ?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <Receivers ListTemplateId="11021"> <Receiver> <Name>AddingEventHandler</Name> <Type>ItemAdding</Type> <SequenceNumber>10000</SequenceNumber> <Assembly>ListEventReceiver, Version=220.127.116.11, Culture=neutral, PublicKeyToken=gfhfghfghfghgfhgfh</Assembly> <Class>ListEventReceiver.ListEventHandler</Class> <Data></Data> <Filter></Filter> </Receiver> </Receivers> </Elements>
List's element.xml file is
<?xml version="1.0" encoding="utf-8"?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <ListTemplate Name="listnamefolder" Type="11021" BaseType="1" OnQuickLaunch="FALSE" SecurityBits="11" Sequence="110" DisplayName="$Resources:ListFeatures,CL_ListDisplayName;" Description="$Resources:ListFeatures,CL_ListDescription;" Image="/_layouts/images/itdl.gif" /> </Elements>
I was assigning a DateTime Parameter to a String without converting it, which was throwing the error and didn't let w3wp.exe to load the event handler.
I recommend everyone to use Microsoft ULS Viewer for debugging