For some reason if you set the Properties Hashtable of the File added as (“Title”, “TitleValue”), sharePoint just ignores it.
The Trick is to set the Title using (“vti_title”, “TitleValue”)
Posted in SharePoint, Tips, tagged SharePoint, Tips on July 27, 2012| Leave a Comment »
For some reason if you set the Properties Hashtable of the File added as (“Title”, “TitleValue”), sharePoint just ignores it.
The Trick is to set the Title using (“vti_title”, “TitleValue”)
Posted in SharePoint, Tips, tagged SharePoint 2010, Tips on May 17, 2012| 2 Comments »
when developing a custom SPD 2010 workflow activity using Visual Studio , sometimes you can get an error saying “"Cannot find property named PROPERTYNAME on activity type ACTIVITYNAME" when trying to assign a parameter to a workflow activity. This can especially occur if the parameter is newly added to the activity (I.e. your previous version of the activity did not have this parameter or it had it with a different name.
a solution might be to close the SPD and clear the cache at:
Windows 7:
C:\Users\<username>\AppData\Local\Microsoft\WebsiteCache
Delete all the files and folders in this folder
C:\Users\<username>\AppData\Roaming\Microsoft\SharePoint Designer
Delete all the files and folders in this folder
Posted in SharePoint, Tips, tagged SharePoint 2010, Tips, Visual Studio 2010 on March 27, 2012| Leave a Comment »
For some reason when creating a custom ribbon action with Visual studio it seems that no matter what you do, the ribbon button or action are never updated.
The Solution that worked for me is
1) retract the solution
2) delete the feature from the Visual studio project
3) Create a new feature in the visual studio project and add the custom ribbon action
4) deploy the new feature.
Posted in SharePoint, Tips, tagged Access denied, RunWithElevatedPrivileges, SharePoint on March 7, 2012| Leave a Comment »
I had a custom web part that is running code that required elevated privileges and was running within SPSecurity.runWithElevatedPrivileges as below
SPSecurity.RunWithElevatedPrivileges(delegate()
{
SPSite siteColl = SPContext.Current.Site;
….
}
I kept throwing an access denied error.
after some investigation I found the solution at this useful blog.
the problem in short is, I was using a reference to the SPSite obtained from the SPContext. This reference to SPSite was created before the code entered the RunWithElevatedPrivileges block. Therefore, the reference to the SPSite was running under the current user privileges even though it was placed within the RunWithElevatedPrivileges block.
The solution is to obtain a new reference to the SPSite created within the RunWithElevatedPrivileges block as shown below.
SPSecurity.RunWithElevatedPrivileges(delegate()
{
using (SPSite siteColl = new SPSite(SPContext.Current.Site.ID))
….
}
Posted in Good Links, SharePoint, tagged Caching, Performance, SharePoint 2010, Sharepoint Optimization on January 19, 2012| 1 Comment »
A very nice presentation by Shai Petel about SharePoint caching: http://kwizcom.blogspot.com/2011/10/developers-guide-how-to-enhance-your.html
Posted in SharePoint, Tips, tagged Custom role provider, SharePoint 2010 on January 12, 2012| 3 Comments »
When building a custom role provider for SharePoint 2010, make sure of the following:
Posted in Code, SharePoint, tagged FBA, SharePoint 2010 on November 28, 2011| Leave a Comment »
In order to grant authenticated FBA users access to a custom application page (/_layouts page), please follow these steps:
protected override SPBasePermissions RightsRequired
{
get
{
SPBasePermissions permissionRequired = SPBasePermissions.ViewPages;
return permissionRequired;
}
}
protected override bool RequireDefaultLayoutsRights
{
get
{
return false;
}
}
This will grant authenticated FBA users access to this _Layouts page.
Posted in Good Links, SharePoint, tagged DotNetNuke, SharePoint on July 21, 2011| Leave a Comment »
The new (just released) release of DotNetNuke (enterprise edition) can now integrate with SharePoint to expose a document library on the internet. More at: http://www.dotnetnuke.com/Resources/Blogs/EntryId/3133/SharePoint-integration-in-DotNetNuke-6.aspx
Posted in Good Links, SharePoint, tagged SharePoint 2010 on July 10, 2011| Leave a Comment »
Posted in Good Links, SharePoint on September 20, 2010| Leave a Comment »