Archive for the ‘C#’ Category

reSP – great Resharper plugin from SubPoint Solutions. Makes Your SharePoint solutions code more stable and robust:

Enable PeoplePicker for Anonymous access

Posted: 26th September 2015 by Gennady in C#, SharePoint
Tags: , ,

I have custom webpart with PeopleEditor object inside. By default anonymous users will not see it: To show it we need to grant “BrowseUserInfo” permission from SPBasePermissions enumeration(thanks to Karel Hájek’s post, who digged this problem with Reflector). Karel offers to edit Content database to grant it, and then configure Active Directory to allow anonymous […]

We have a bugtracking system based on Sharepoint+Infopath technologies. Infopath Forms have a few copies for different AD groups, so every employee can edit its own fields, depending on Active Directory user group: Problem: After stsadm export operation, “Status” field disappears. So the form has this field, but sharepoint stops to show it in list Settings […]

Real Disable Event Firing :)

Posted: 22nd October 2013 by Gennady in C#, SharePoint
Tags: ,

Sometimes in SharePoint event handlers You need to freeze events and update element “silently”. There are several examples in the internet how to do it, but they does not always work or work only in special context. Here is a method that works even in console applications too. It is an extension-class for SPListItem object. […]

Install SharePoint 2010 on Windows 2012(Windows 8 Server)

Posted: 22nd February 2013 by Gennady in C#, SharePoint
Tags: ,

Sharepoint 2010 installation on Windows 2012 is not supported and is only expected with SP2, which does not exist at the moment. But You can still install SharePoint 2010 using this technet article. It describes installation on Windows 8 Beta, but method works for Windows 2012 too. Also there is a link to useful Powershell […]

Cannot import web part, solution

Posted: 22nd May 2012 by Gennady in C#, SharePoint
Tags: ,

  Solution: move code from webpart constructor to OnInit method of the Page. Error: this error appears when adding webpart to Page. Moreover, sometimes this error could be reproducted only on target server, but in Dev environment all could be ok. After log analysis(by example using ULSViewer) I found this error message, that doesn’t say much: In my […]

Event Handler Explorer Tool

Posted: 22nd May 2012 by Gennady in C#, SharePoint
Tags: ,

Nice open-source tool by Patrick Tisseghem, that can be used to deploy event receivers in SharePoint 2007/2010/2013. I modified it by adding a little more user-friendly interface, and added some useful functions like auto-recycle IIS, work with GAC etc. WSP packages and features could be used to deploy common event handlers(by example Content Type event receiver, or receiver […]