I've got my event receiver (itemdeleting) working almost exactly the way I'd like it to.
Upon certain conditions in the itemdeleting event, I am setting the status to CancelWithRedirectUrl and setting the redirect URL like so:
properties.Status = SPEventReceiverStatus.CancelWithRedirectUrl; properties.RedirectUrl = "/_layouts/AppPage.aspx";
The only problem I'm experiencing now is that if a user selects and deletes more than 1 item at a time. The event receiver apparently tries to redirect twice and I get an error stating the following (twice as you see):
The server has encountered the following error(s): The request was redirected to ... The server has encountered the following error(s): The request was redirected to ...
If I debug I can see my event receiver is actually executing twice. Is there some graceful way to handle this?