SPListItem item added event thread
Good day. I have my custom handler on ItemAdded event. Like i understand, it runs asynchronously in another thread. My question is in what process does this thread runs? For example, when i navigate to site and add item this thread will run in w3wp.exe. But if i connect to list through SharePoint Object Model and create new item, would it run in process of my application? I think that answer is yes, cause i use Enterprise library 5 Logging Block with config file location "log\log.txt". When i navigate through site the file appears in virtual directories, when i connect with Object Model, this file is located in my application folder. But i cant find this thread. I tried to do Process p = Process.GetCurrentProcess(); p.Threads but its not there. Where can i find this thread? I want to wait until it ends in my app. Thanks for your answerts. Best regards, Chernobrivec.
May 6th, 2011 9:52am

I believe the ItemAdded event runs in the w3wp.exe process. Since the ItemAdded event code needs to be deployed to the GAC, you attach to the w3wp.exe process in Visual Studio on the server (or remote debugging) to step through the ItemAdded code. - Xenox G.
Free Windows Admin Tool Kit Click here and download it now
May 6th, 2011 10:12am

I really think it does not run in the process of you custom Application. Actually your app will interact with SP low level objects (COM :)) using the SP API but the low level objects run independantly from your process. PS: you should really not think about threads when doing a custom event handler. What are you trying to achieve?Florin DUCA MCITP Enterprise Admin, MCSE 2003 +Sec, MCITP/MCPD SP 2010, MCTS conf/dev WSS3/MOSS, MCPD ASP.Net 3.5, MCTS ISA 2006 Logica Business Consulting, France
May 6th, 2011 10:17am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics