Toa allow Updates on a get set the allowUnsafeUpdates property on SPWEb

Hi

I am working on class site (which is downloaded and customised ). In that class site i have assignment Submission webpart and calendar webpart.

What i am adding a new assignment and i click on add to calendar checkbox ( i want to add the due date to calendar ) then i am getting this error.

I don't know what to do and where need to do this either in web.config file or somewhere else.

Can anybody help me please.

Error Message:

Updates are currently disallowed on get requests. Toa allow Updates on a get set the allowUnsafeUpdates property on SPWEb(7303d692 cff0-4e1a-b190-1d178d502e44

Thank you

August 13th, 2012 3:22am

on the SPWeb object. set the AllowUnsafeUpdates property to true;

Example

var web = SPContext.Current.Web;
web.AllowUnsafeUpdates = true;

Free Windows Admin Tool Kit Click here and download it now
August 13th, 2012 4:20am

Hi,

In addition to Ibrahim reply, DON'T forget to make it false at the end of your code.

web.AllowUnsafeUpdates = false;

Let us know your result

August 13th, 2012 9:09am

Is there any solution to avoid  using  allowunsafeupdates property.
Free Windows Admin Tool Kit Click here and download it now
August 29th, 2013 6:46am

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

Other recent topics Other recent topics