i have taken one List Email event receiver(Type is EmailReceived
) and that event receiver attach with document library. when i am activate that feature got error.
i have check on ULS Viewer. error look like :
Feature Activation: Threw an exception, attempting to roll back. Feature 'Email_Doclib_Email Receivers' (ID: '8bb3a20f-22b6-4d05-b451-5db1a2714063').
Exception: System.InvalidOperationException: Operation is not valid due to the current state of the object. at Microsoft.SharePoint.Administration.SPElementDefinitionCollection.ProvisionContentTypeAndEventReceiverBindings(SPFeaturePropertyCollection props, SPSite site, SPWeb web, Boolean fForce)
at Microsoft.SharePoint.Administration.SPElementDefinitionCollection.ProvisionElements(SPFeaturePropertyCollection props, SPWebApplication webapp, SPSite site, SPWeb web, Boolean fForce)
at Microsoft.SharePoint.SPFeature.ProvisionElements(SPElementDefinitionCollection elemdefcoll, SPFeaturePropertyCollection props, SPWebApplication webapp, SPSite site, SPWeb web, Boolean fForce)
at Microsoft.SharePoint.SPFeature.Activate(SPSite siteParent, SPWeb webParent, SPFeaturePropertyCollection props, Boolean fForce)
right now there is no code on this Event receiver.
here is my Element file of Receiver
<Receivers ListTemplateId="101">
<Receiver>
<Name>IncomingEmailEmailReceived</Name>
<Type>EmailReceived</Type>
<Assembly>$SharePoint.Project.AssemblyFullName$</Assembly>
<Class>Email_Doclib.IncomingEmail.IncomingEmail</Class>
<SequenceNumber>10000</SequenceNumber>
</Receiver>