Tuesday, February 9, 2010

Access denied error while Editing List Items in SharePoint(MOSS 2007)

Sometimes, we get access denied error while editing (Edit properties) the list item even though we have access to the Sharepoint list.
Also, View History link on the Sharepoint list item throws access denied issue

This is a issue with Sharepoint and we need to execute the code to the SP libraries to fix the problem. The source code for this app is as follows. Put this in a console app and pass the site URL and list name as parameters.
This is working code and solved our production issue.

string RenderXMLPattenAttribute = "RenderXMLUsingPattern";
string weburl = "http://localhost/sites/Test/";
string listName = "Test Library";
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();
XmlElement xe = xd.DocumentElement;
if (xe.Attributes[RenderXMLPattenAttribute] == null)
XmlAttribute attr = xd.CreateAttribute(RenderXMLPattenAttribute);
attr.Value = "TRUE";
string strXml = xe.OuterXml;
Console.WriteLine("schemaXml after: " + strXml);
f.SchemaXml = strXml;
Console.WriteLine("Process completed");

Tuesday, January 26, 2010

SharePoint (MOSS 2007) Incoming Email is not working. EMAIL is not picked up from the DROP (C:\inetpub\mailroot\Drop) folder

EMAIL is not picked up from the DROP (C:\inetpub\mailroot\Drop) folder and got the error(exception) in Event viewer
A critical error occurred while processing the incoming e-mail drop folder . The error was: Value cannot be null.
Parameter name: path.
The Execute method of job definition Microsoft.SharePoint.Administration.SPIncomingEmailJobDefinition (ID df74919a-8a3d-4019-869c-fc5599909785) threw an exception. More information is included below.
Value cannot be null.
Parameter name: path


1. Check whether SMTP service and SharePoint Timer service is running on the SharePoint server
2. Give access to WSS_ADMIN_WPG (Full control) and WSS_WPG (Read/Write) to the DROP (C:\inetpub\mailroot\Drop ) folder
3. Check access for the SharePoint site (apps.ul.com) also for timer account to update the email into the document library which is configured.
4. Change the incoming drop folder settings on the Sharepoint Central administration site

Central administration -> Operations -> Incoming email settings. Change the email drop folder to (C:\inetpub\mailroot\Drop) folder