I have an Event Handler deployed to a doc lib on my dev box(Win 2003 32 bit OS) and it works. And now trying to deploy it to my production which is a remote server (Win 2003 64 bit OS) but it seems the event is not firing.... What i did was copy the dll to the remote server to c:\windows\assembly and then use the EventHandlerexplorer to register the dll. and did iisreset. Any ideas what i'm missing... Do i need to use gacutil to register it on the prod server??? Could having 2 different windows one 32 bit and 64 bit be the problem?? THanks in Advance
In order for an Event in Sharepoint to be handled by your custom DLL, you will need to let Sharepoint know when and how to use your DLL. This can be done by creating a feature.xml and elements.xml file that describe how Sharepoint is supposed to use your DLL for handling events. These XML files will describe:
- What list templates the event handler should be applied to
- When this event handler should be fired relative to other event handlers
- Exactly what DLL to use from the GAC (or bin directory)
- What type of event to handle (e.g., ItemAdded)
For a walkthrough / sample code, go to http://developers.de/blogs/adis_jugo/archive/2009/03/12/develop-and-deploy-a-sharepoint-event-receiver-from-the-scratch.aspx.
Also, for pushing out to production, I would recommend packaging up your feature as a solution (WSP file) rather than copying files by hand. WSPBuilder is a great tool for helping to package it up.