Edit properties – Access denied error in document libraries
A very interesting symptom occurred to me the past time. In a document library I was trying to edit document properties but I received an error that I don’t have rights. Strange. Even if I tried to edit with a site collection administrator account, I got the same error.
After searching for a while, I’ve found the solution. Looks like a bug that is fixed with February update, but you have to fix the existing bugs manually.
You can find the solution on Social TechNet. Using Visual Studio create a console application and copy-paste the code published there. I’ve made slight modification to the code, because I needed to have this fix in a subsite:
Old code:
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.SharePoint;
using System.Xml;
namespace CA_TestingHotfix
{
class Program
{
static void Main(string[] args)
{
FixField(args);
}
static void FixField(string[] args)
{
string RenderXMLPattenAttribute = "RenderXMLUsingPattern";
//Console.WriteLine("Please enter the URL of the site: (Press enter after typing):");
string weburl = args[0];
//Console.WriteLine("Please enter the Document Library Name: (Press enter after typing):");
string listName = args[1];
SPSite site = new SPSite(weburl);
SPWeb web = site.OpenWeb();
SPList list = web.Lists[listName];
…
New code (changes marked with bold)
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.SharePoint;
using System.Xml;
namespace CA_TestingHotfix
{
class Program
{
static void Main(string[] args)
{
FixField(args);
}
static void FixField(string[] args)
{
string RenderXMLPattenAttribute = "RenderXMLUsingPattern";
//Console.WriteLine("Please enter the URL of the site: (Press enter after typing):");
string weburl = args[0];
string subwebUrl = args[1];
//Console.WriteLine("Please enter the Document Library Name: (Press enter after typing):");
string listName = args[2];
SPSite site = new SPSite(weburl);
SPWeb web = site.OpenWeb(subwebUrl);
SPList list = web.Lists[listName];
After you have the code ready, compile the program, put it on the server and run the command
[programName].exe [http://site_coll_url] [subweburl] [document_library_name]
If you need to run it for example on the top level web see the example below
fixDocLib.exe –url http://testSite:8080 / “Shared Documents”



Hi, I’m just a newbie in Sharepoint.
Could you, at least, provide a step by step instruction as to how I can run the code. It will be a big help. Thank you.
We have came across your WordPress bog regarding WSS 3.0 and errors when editing properties. Over night this happened to us, and I am in the deep end with so many new sub sites with this issue. However I do not know how to use VB, do you have this script as an exe application? Any help would be appreciate, I’m sure it shall only take you a few moments to help out a strange on the over side of the world….
@Michael Caldecott: Hi. Yes, the exe application is available. Direct link is http://gomiunik.codeplex.com/releases/view/27906. You will need access to backend server. If you wish I can prepare this as a SharePoint feature so you’d be able to make the fix directly in SharePoint site.
Would this executable that is available on codeplex work for “Document Libraries” instead of lists?
Yes, it also works on document libraries.