Event Receivers fires for all lists and libraries

Issue Case – Event Receiver behaving unexpectedly

I want to add my event receiver in all the document library in whole site collection.So i added event receiver like
<?xml version=”1.0″ encoding=”utf-8″?>
<Elements xmlns=”http://schemas.microsoft.com/sharepoint/“>
<Receivers ListTemplateId=”101”>
<Receiver>
<Name>DenyToUpdateMDItemAdded</Name>
<Type>ItemAdded</Type>
<Assembly>[Assembly]</Assembly>
<Class>[Class Path]</Class>
<SequenceNumber>10000</SequenceNumber>
</Receiver>
</Receivers>
</Elements>

The scope of the feature is “Site” as i want to add event receiver in all the sub site also.

When i activated my event receiver feature, event receiver fires for all the list and libraries.

Issue Case – Event Receiver behaving unexpectedly

 

SOLUTION

By Just changing  the scope of the feature “Site” to “web” my problem was resolved

Don’t know whether its sharepoint bug or not:). Hope it will save some time

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s