Question: I am trying to update a list item using: 

```
SPSecurity.RunWithElevatedPrivileges(delegate() 
{
    ...

    item.update();**// this line works**
    list.update();**//// exception thrown on this statement**
});

```

When I update the item, it works fine with no exception. But on updating the list... it throws an exception and redirects me to the Access Denied page.

Answer: 
you should open new context

```
SPSecurity.RunWithElevatedPrivileges(delegate() 
{
    using (SPSite site = new SPSite(SPContext.current.Site.ID)
    {
       using (SPWeb web = site.OpenWeb(SPContext.current.Web.ID))
       {
           SPList list = web.Lists["Some List"];
           .....
           item.update();**// this line works**
           list.update();**//// exceptoin throw on this statement**
       }
    }
});

```
try this code 

```
    SPSite mysite = SPContext.Current.Site;
    SPSecurity.RunWithElevatedPrivileges(delegate()
            {
                SPSite mycurrentsite = new SPSite(mysite.ID);
                SPWeb mycurrentweb = mycurrentsite.OpenWeb();
                mycurrentweb.AllowUnsafeUpdates = true;
                SPList list = mycurrentweb .Lists["Some List"];      .....
                  item.update();
                  list.update();
                 mycurrentweb.AllowUnsafeUpdates = false;

            });

```