0

I am creating sites and subsites with object model from a console app. And what i realized is, it fires twice for every newly created subsite. I checked from Sharepoint Manager if the event receiver is registered twice, but no there are no multiple registrations. So what can cause the WebProvisioned event firing twice?

Edit: I have found a blog article that says the webprovisioned event is firing twice, and the author also does not know why. the article

One other interesting “feature” (a rather peculiar one) is that when I tested my sample “Site” scoped WebProvisioned receiver it got called twice for one and the same site (no idea yet if this is an issue with my dev environment only or it is something by design). This is not the case for “Web” scoped WebProvisioned receivers.

  • Is you last question solved ? Was my answer helpful ? – Arsalan Adam Khatri Dec 4 '12 at 15:02
  • yes, thanks. i marked it as answer. what about current problem?do you have any idea? – ozdogan Dec 4 '12 at 15:05
  • 1
    To realise the solution to this we would need a code sample, of course please edit your post and include one with your addresses and file names taken out and replaced by place-holder names – Hugh Wood Dec 4 '12 at 15:07
  • The code is real huge.. But As i know this kind of problem may be faced, for example in ItemUpdating events, when the current item is updated in the Updating event receiver. But here in my situation, a site cannot be provisioned/created twice. This is not like ItemUpdating event. – ozdogan Dec 4 '12 at 15:10
  • @ozdogan code will help to solve the issue! – Arsalan Adam Khatri Dec 4 '12 at 15:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.