Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

My ItemAdded event recevier is not firing when the Word Automation Services adds a file to a Sharepoint document library.

If I manually debug the ItemAdded event receiver, it is getting triggered. I don't know why it is not getting triggered when the file is added from Word Automation Services. Please help.

share|improve this question
add comment

5 Answers

I have been having this problem 3 days and finally found reason why and the solution. The reason the debugging was not working was that the debugger should attached to the app pool that the Word automation service is running. Usually it's named with GUID and you will see the an app pool has many app run under. After I attach my debugger to that app pool my break point is reached.

I hope it helps somebody...

share|improve this answer
    
The OP is asking why it's only working when they're debugging; they don't seem to have any problems with the debugging itself. –  Stuart Pegg Sep 24 '12 at 21:17
add comment

i ran into the same problem, wondering why my breakpoint was not hit. Then i realized that the event handler is not running under the default W3WP process. So attaching your debugger to the right worker process (or all ) will give you (again) all debugging facilities.

share|improve this answer
add comment

I am not sure about this, but I know that there have been problems with starting workflows automatically, if a file is added by the "system account".

See this article: http://blogs.technet.com/b/victorbutuza/archive/2009/03/14/workflows-do-not-start.aspx

As a said, I don't know if it is the same with event handlers -but I could be the reason.

share|improve this answer
add comment

Is it possible that the Word Automation Service runs under the wrong application pool and has no permission?

share|improve this answer
    
I don't think thats the point. Since the WAS creates the document in the library it should have proper permission. –  AlexPoint Jun 15 '11 at 6:50
add comment

Maybe you should handle ItemFileConverted event?

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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