Edit List Item - Access Denied
There are supposed fixes for this but I cannot get a decent reply so i am posting a new thread. I am getting the same error as what was in this thread. http://social.technet.microsoft.com/Forums/en/sharepointadmin/thread/66643b6e-3695-48db-83a5-770282f8251e I want to run the script but cannot without getting an error. Can I get step by step of how to run this script? Save the code into what? Run from what? On server or workstation? I am a sharepoint admin, not a developer so I'm a bit clueless when it comes to code language... 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]; SPField f = list.Fields.GetFieldByInternalName("PermMask"); string s = f.SchemaXml; Console.WriteLine("schemaXml before: " + s); XmlDocument xd = new XmlDocument(); xd.LoadXml(s); XmlElement xe = xd.DocumentElement; if (xe.Attributes[RenderXMLPattenAttribute] == null) { XmlAttribute attr = xd.CreateAttribute(RenderXMLPattenAttribute); attr.Value = "TRUE"; xe.Attributes.Append(attr); } string strXml = xe.OuterXml; Console.WriteLine("schemaXml after: " + strXml); f.SchemaXml = strXml; } } }
November 30th, 2010 4:13pm

I have removed your new post in that (Old - previous post September) thread. Either post a reply to an old thread OR start a new thread. Don't do both. That only leads to parallel threads and they waste forum members time. (Moderator) SP 2010 "FAQ" (mainly useful links): http://wssv4faq.mindsharp.com/default.aspx WSS3/MOSS FAQ (FAQ and Links) http://wssv3faq.mindsharp.com/default.aspx Both also have links to extensive book lists and to (free) on-line chapters
Free Windows Admin Tool Kit Click here and download it now
November 30th, 2010 4:30pm

Hi adadm.morris, Thanks for your post. First, It’s a Console Application created by VS (Visual Studio) 2008 (or VS 2005). And the Application should run on the server. Second, I will try to give you a guide. If the VS2008 or VS 2005 is not installed on the server, please go to “Third” step. 1. Create a Console Application on the server as following: http://msdn.microsoft.com/en-us/library/ms438026(v=office.12).aspx. You can copy the code to your project; 2. When you finish the “6” step (On the .NET tab of the Add Reference dialog box, select Windows SharePoint Services in the list of components, and then click OK. ), clear all the code in the Program.cs file; 3. Copy all the code, which you posted above, to the Program.cs file; 4. Click Start on the Debug menu or press F5 to run the code; 5. When a cmdlet form is pop-up, do following the guide text. First enter the URL of your SharePoint site, and then enter the document library name, and press “Enter” ; 6. Go to SharePoint site and check whether it works. Third, if the VS2008 or VS 2005 is not installed on the server, you should do this on a development machine, which is installed VS 2008 or 2005. The steps are similar with the “Second” step. But after you finish the “4” in “Second” step, you close the cmdlet form. Then find a “.exe” file in the “bin\debug\” folder of the project. Copy the “.exe” file to the server and run it, and go on the “5,6” in “Second” steps. Share your views. Best Regards, Wayne TechNet Subscriber Support in forum If you have any feedback on our support, please contact tngfb@microsoft.com SharePoint 2010
November 30th, 2010 9:59pm

Hi adadm.morris, Thanks for your post. First, It’s a Console Application created by VS (Visual Studio) 2008 (or VS 2005). And the Application should run on the server. Second, I will try to give you a guide. If the VS2008 or VS 2005 is not installed on the server, please go to “Third” step. 1. Create a Console Application on the server as following: http://msdn.microsoft.com/en-us/library/ms438026(v=office.12).aspx. You can copy the code to your project; 2. When you finish the “6” step (On the .NET tab of the Add Reference dialog box, select Windows SharePoint Services in the list of components, and then click OK. ), clear all the code in the Program.cs file; 3. Copy all the code, which you posted above, to the Program.cs file; 4. Click Start on the Debug menu or press F5 to run the code; 5. When a cmdlet form is pop-up, do following the guide text. First enter the URL of your SharePoint site, and then enter the document library name, and press “Enter” ; 6. Go to SharePoint site and check whether it works. Third, if the VS2008 or VS 2005 is not installed on the server, you should do this on a development machine, which is installed VS 2008 or 2005. The steps are similar with the “Second” step. But after you finish the “4” in “Second” step, you close the cmdlet form. Then find a “.exe” file in the “bin\debug\” folder of the project. Copy the “.exe” file to the server and run it, and go on the “5,6” in “Second” steps. Share your views. Best Regards, Wayne TechNet Subscriber Support in forum If you have any feedback on our support, please contact tngfb@microsoft.com SharePoint 2010
Free Windows Admin Tool Kit Click here and download it now
November 30th, 2010 9:59pm

Hi adadm.morris, Thanks for your post. First, It’s a Console Application created by VS (Visual Studio) 2008 (or VS 2005). And the Application should run on the server. Second, I will try to give you a guide. If the VS2008 or VS 2005 is not installed on the server, please go to “Third” step. 1. Create a Console Application on the server as following: http://msdn.microsoft.com/en-us/library/ms438026(v=office.12).aspx. You can copy the code to your project; 2. When you finish the “6” step (On the .NET tab of the Add Reference dialog box, select Windows SharePoint Services in the list of components, and then click OK. ), clear all the code in the Program.cs file; 3. Copy all the code, which you posted above, to the Program.cs file; 4. Click Start on the Debug menu or press F5 to run the code; 5. When a cmdlet form is pop-up, do following the guide text. First enter the URL of your SharePoint site, and then enter the document library name, and press “Enter” ; 6. Go to SharePoint site and check whether it works. Third, if the VS2008 or VS 2005 is not installed on the server, you should do this on a development machine, which is installed VS 2008 or 2005. The steps are similar with the “Second” step. But after you finish the “4” in “Second” step, you close the cmdlet form. Then find a “.exe” file in the “bin\debug\” folder of the project. Copy the “.exe” file to the server and run it, and go on the “5,6” in “Second” steps. Share your views. Best Regards, Wayne TechNet Subscriber Support in forum If you have any feedback on our support, please contact tngfb@microsoft.com SharePoint 2010
November 30th, 2010 9:59pm

Hi adadm.morris, Are the replies helpful? or do you have some new ideas about this issue? Thanks.SharePoint 2010
Free Windows Admin Tool Kit Click here and download it now
December 2nd, 2010 8:23pm

Note to confused readers of this thread. > I will mark this thread. This and the previous two messages both indicate that this thread has been a supported thread from a MSDN or TechNet subscriber (Ref: Priority Subscriber Support in MSDN Forums https://msdn.microsoft.com/en-gb/subscriptions/aa974230.aspx for a description of what this support is) The "marking" of this thread has therefore nothing to do with the "mark as answer" function which is the more usual "marking" in these forums. Note there is nothing to indicate to forum readers that a thread is supported or not beyond the fact that MS support people for that system will use a sig like the one in (only) the first reply in the thread (TechNet Subscriber Support in forum If you have any feedback on our support, please contact tngfb@microsoft.com) and will post "housekeeping" messages in the thread as here. (Moderator) P.S. Just ignore the sig of "SharePoint 2010". If a reply is made in a pre-SP 2010 forum, it will be a pre-SP 2010 answer. Later: You are probably now even more confused as the post from which the quote "I will mark this thread" was taken has now been deleted by the poster and two hours after that his earlier post was marked ("normally"!) as an answer. SP 2010 "FAQ" (mainly useful links): http://wssv4faq.mindsharp.com/default.aspx WSS3/MOSS FAQ (FAQ and Links) http://wssv3faq.mindsharp.com/default.aspx Both also have links to extensive book lists and to (free) on-line chapters
December 5th, 2010 10:29pm

Note to confused readers of this thread. > I will mark this thread. This and the previous two messages both indicate that this thread has been a supported thread from a MSDN or TechNet subscriber (Ref: Priority Subscriber Support in MSDN Forums https://msdn.microsoft.com/en-gb/subscriptions/aa974230.aspx for a description of what this support is) The "marking" of this thread has therefore nothing to do with the "mark as answer" function which is the more usual "marking" in these forums. Note there is nothing to indicate to forum readers that a thread is supported or not beyond the fact that MS support people for that system will use a sig like the one in (only) the first reply in the thread (TechNet Subscriber Support in forum If you have any feedback on our support, please contact tngfb@microsoft.com) and will post "housekeeping" messages in the thread as here. (Moderator) P.S. Just ignore the sig of "SharePoint 2010". If a reply is made in a pre-SP 2010 forum, it will be a pre-SP 2010 answer. SP 2010 "FAQ" (mainly useful links): http://wssv4faq.mindsharp.com/default.aspx WSS3/MOSS FAQ (FAQ and Links) http://wssv3faq.mindsharp.com/default.aspx Both also have links to extensive book lists and to (free) on-line chapters
Free Windows Admin Tool Kit Click here and download it now
December 5th, 2010 10:36pm

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

Other recent topics Other recent topics