Hey Joe,
The problem with your code is the CreateDocID class is Internal - it will need
to be public for SharePoint to create a new instance of it.
--
namespace CreateDocID
{
class CreateDocumentID : SPItemEventReceiver
{
--
Change to:
namespace CreateDocID
{
public class CreateDocumentID : SPItemEventReceiver
{
Cheers,
Dave
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of
Joe Breen
Sent: Sunday, 14 February 2010 6:49 PM
To: ozMOSS
Subject: Re: Event Handler Not Firing
It's very inconsistent it seems.
I am debugging it now by attaching to w3wp.exe. I have been able to
debug previous event handlers in this way also.
I could get the previous error to disappear by manually copying the
.DLL from GAC_MSIL/CreatDocID_××× folder into the BIN folder of the 80
port WebApp for SharePoint - 80 after each Build of my solution. I did
not have to do this for other custom event handlers. I either used
native Deploy in VS 2008 or I used WSPBuilder -> Deploy. If I use
WSPBuilder -> Copy to GAC and the output shows it has copied the file
then there shouldn't be anymore to do to get the file to the GAC.
On this dev box none of the other custom event handler assemblies have
to go to the BIN folder. They are debugging fine also from w3wp.exe.
There's also no reference to any of the custom assemblies in web.config file.
The only difference I see is that the other custom event handlers fire
from a custom list but this one fires on a default document library.
Hopefully this post will help some other unfortunate soul who has to
put up with the inconsistencies but I don't have a solid solution I
could definitely say works 100% of the time when debugging event
handlers in VS.
> Joe,
>
> Event handler is triggered by Sharepoint Timer Service and not
> w3wp.exe IIS process. Timer Service will try to look the DLL in GAC.
>
>
>
> There are several possibilities of this error:
>
> - DLL not in GAC
>
> - DLL details (eg. namespace, public key token, etc) mentioned
> in your Feature.xml doesn't match the one in GAC
>
>
>
>
>
> Cheers,
>
> Tommy
>
>
>
>
>
>
>
> From: [email protected]
> [mailto:[email protected]] On Behalf Of Daniel W. Brown
> Sent: Sunday, 14 February 2010 8:12 AM
> To: ozMOSS
> Subject: RE: Event Handler Not Firing
>
>
>
>
>
>
>
> In short, its saying that it cannot FND the assembly or
> namespace associated with the event handler.
>
>
>
> Check the Namespace, Assembly name and Token Info on the list
> attached to SharePoint.
>
>
>
> The type is "CreateDocID.CreateDocID", this would appear not to
> match what is in your assembly.
>
>
>
>
>
> From: [email protected]
> [mailto:[email protected]] On Behalf Of Joe Breen
> Sent: Sunday, 14 February 2010 9:37 AM
> To: ozMOSS
> Subject: Re: Event Handler Not Firing
>
>
>
> After installing the
> SPLogFileViewer I am finally seeing an error in both the Event Log and the
> SPLogFileViewer. SharePoint did not write this error to the Event log
> before installing the LogFileViewer.
>
> The error I am seeing is:
>
> Event manager error: Could not load type 'CreateDocID.CreateDocID' from
> assembly 'CreateDocID, Version=1.0.0.0, Culture=neutral,
> PublicKeyToken=1f41dcd496414d1a'.
>
> There seems to be scant information available on how to fix this but I have
> copied the CreateDocID.dll into the BIN folder in wwwroot and registered the
> assembly in web.config.
>
> So there's something wrong with my assembly even though I have installed it
> using command line and also tried through Deploy function in WSPBuilder in VS
> 2008. Using these before worked fine for previous Event Receivers.
> Yet this method of deployment now does not seem to work.
>
> Anyone know how to fix this "Could not load type" error?
>
>
>
>
>
>
>
_______________________________________________
ozmoss mailing list
[email protected]
http://prdlxvm0001.codify.net/mailman/listinfo/ozmoss
_______________________________________________
ozmoss mailing list
[email protected]
http://prdlxvm0001.codify.net/mailman/listinfo/ozmoss