So You Want to Use a ServerContext in an Event Receiver...Too Bad...

I was playing with the ItemUpdated Event in a Document Library Definition File using VSEWSS.  I stepped into the filed like a good little girl using the w3wp.exe process.  Guess what the ServerContext is null, so I can't use the UserProfileManager...I found this little MSDN Post: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=3273163&SiteID=1.  It turns out there is a bug in the ServerContext, which is a little bizarre considering you can do SPContext.Current.Web/Site...I guess it's time to use the webservice to update user profiles: http://msdn.microsoft.com/en-us/library/ms544240.aspx.  You have to love the random bugs:)  Sometimes I wonder if MOSSLover is a appropriate...Maybe I should be the SharePoint Bug Girl Mascot...

Print | posted on Friday, July 11, 2008 2:08 PM

Feedback

No comments posted yet.

Your comment:





 
 

Copyright © MOSSLover

Design by Bartosz Brzezinski

Design by Phil Haack Based On A Design By Bartosz Brzezinski