3

Can the ItemAdding event be used in a Sandbox?

I need to perform a task when a Item is a added/adding, it has to be synchronous (item added is async so i cant use that).

If i cant use the ItemAdding what other options do i have?

2 Answers 2

3

Yes, it is possible (see here too http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spitemeventreceiver.itemadded(v=office.14).aspx), however you would need to be aware of some tips, such as:

  • make sure you don't use any RunsAsPrivilegedUser
  • debugging always by attaching to SPUCWorkerProcess
1

I don't know the answer about using ItemAdding in Sandbox (although my guess would be yes), but another option you have is to change ItemAdded to be synchronous.

Here are a couple posts about that:

Link

http://wineya.blogspot.com/2010/03/binding-asynchronous-event-handlers-as.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.