Setting List Properties using Reflection


I’m working on a feature which allows you make configuration changes to List instances on feature activation. The exact configuration is provided to the feature via feature properties and I wanted to be able to set property values on the SPList instance dynamically using reflection. Here’s the code which does that;

.NET: 5 Part or Fully Qualified Type and Assembly Names


The fully qualified names of .NET assemblies and types (commonly known as the 4 or 5 part name) is commonly used within the .NET world to dynamically load types from external assemblies. It is also very commonly used within the SharePoint world to denote things like feature receivers, event receivers etc etc. An assemblies fully … Continue reading .NET: 5 Part or Fully Qualified Type and Assembly Names

Query XML with Namespaces using XPathNavigator


Querying XML data which has namespace qualifications can be a little confusing at times, consider the following document; This example is declaring a default namespace qualification at the root of the document, which scopes the inner part of the document to the default namespace, which in this case is http://platinumdogs.com/schema/reporting/query. Given this example you might … Continue reading Query XML with Namespaces using XPathNavigator

.NET (C#) Impersonation with Network Credentials


I required a C# class to enable ad-hoc user account impersonation for accessing resources both on the local machine and also on network machines, which I’ve reproduced here. Of note, if you require impersonation in order to access network resources, you would intuitively select the logon type of LOGON32_LOGON_NETWORK, this however doesn’t work, as according to … Continue reading .NET (C#) Impersonation with Network Credentials

Debugging .NET Serialization Code


Just what is your XmlSerializer doing? You can find out by debugging the serialization code which is generated automatically at runtime; 1. Modify your .config file to include the following snippet 2. Rebuild your code and set a breakpoint on or just after where you create an instance of the XmlSerializer, but before you call … Continue reading Debugging .NET Serialization Code