10

Amidst working on resolving this issue, there's something I was curious about, and something that I've been very inconsistent about in my code.

If you enable SPWeb.AllowUnsafeUpdates = true, do you have to call SPWeb.Update() for that to be in effect? Or is just the one statement sufficient? I re-examined the WSS 3.0 SDK to look it up again, but either it's buried in a really random article or they aren't explaining it well.

I imagine that whatever is the case for setting it to true, it'll be the same for setting it to false in the finally block.

8

You do not need to call SPWeb.Update() because the AllowUnsafeUpdates property is not persisted. (Reference Best Pattern for AllowUnsafeUpdates)

  • Thanks for the quick response! I should go fix all those erroneous Updates, then. Unfortunately, though, this still didn't fix my non-permitted uploads... – Grace Note May 13 '11 at 14:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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