SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
up vote 8 down vote accepted

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

share|improve this answer
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 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.