Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 45581
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T15:49:54+00:00 2026-05-10T15:49:54+00:00

An obscure puzzle, but it’s driving me absolutely nuts: I’m creating a custom Information

  • 0

An obscure puzzle, but it’s driving me absolutely nuts:

I’m creating a custom Information Management Policy in MOSS. I’ve implemented IPolicyFeature, and my policy feature happily registers itself by configuring a new SPItemEventReceiver. All new items in my library fire the events as they should, and it all works fine.

IPolicyFeature also has a method ProcessListItem, which is supposed to retroactively apply the policy to items that were already in the library (at least, it’s supposed to do that for as long as it keeps returning true). Except it doesn’t. It only applies the policy to the first item in the library, and I have absolutely no idea why.

It doesn’t seem to be throwing an exception, and it really does return true from processing that first item, and I can’t think what else to look at. Anyone?

Edit: Cory’s answer, below, set me on the right track. Something else was indeed failing — I didn’t find out what, since my windbg-fu isn’t what it should be, but I suspect it was something like ‘modifying a collection while it’s being iterated over’. My code was modifying the SPListItem that’s passed into ProcessListItem, and then calling SystemUpdate on it; as soon as I changed the code so that it created its own variable (pointing at the exact same SPListItem) and used that, the problem went away…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T15:49:55+00:00Added an answer on May 10, 2026 at 3:49 pm

    There’s only a couple of things I can think of to try. First, are you developing on the box where you might be able to use Visual Studio to debug? So just stepping through it.

    Assuming that’s not the case – what I’d do is fire up WinDBG and attach it to the process just before I registered the policy. Turn on first chance exceptions so that it breaks whenever they occur. you can do that by issuing the command ‘sxe clr’ once it is broken in. Here’s a little more info about WinDBG:

    http://blogs.msdn.com/tess/archive/2008/06/05/setting-net-breakpoints-in-windbg-for-applications-that-crash-on-startup.aspx

    What I’d do is then watch for First Chance exceptions to be thrown, and do a !PrintException to see what is going on. My guess is that there is an exception being thrown somewhere that is causing the app to stop processing the other items.

    What does the logic look like for your ProcessListItem? Have you tried just doing a return true to make sure it works?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is a fairly obscure question, but I'm having a devil of a time
Alright, I know my title is a little obscure but it best describes the
This may be somewhat obscure but I've been happily using Eclipse + Perfoce/P4WSAD for
My real-life example is too obscure to explain, but this is a pretty good
This is a slightly obscure question, but I'm stumped and I thought maybe somebody
This is obscure, but for some reason the notification in AbstractTableModel is last-to-first, causing
This is a bit of an obscure issue, but I'm using jQuery Sortables and
This is kind of obscure, but I need a function that can be computed
This may be too obscure a question, but perhaps someone can spot what I'm
This seems like such an obscure question, but here it goes: Is there a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.