SharePoint and NHibernate – problem with NHibernate.ByteCode.Castle.dll
I often use NHibernate to work with SQL database. It’s a very mature ORM solution for .NET which allows You to freeley “talk” with any database. Although, this is very simple ORM, sometimes I have some challanges I have to face.
One of the first issue I had with this ORM was:
Could not load file or assembly ‘NHibernate.ByteCode.Castle’ or one of its dependencies. The system cannot find the file specified.
SharePoint 2010 Developer Dashboard
Developer dashboard is a new feature in SharePoint. It provides to developers and administrators performance and tracing information that can be used to debug and troubleshoot issues with a page rendering time. The dashboard is turned off by default but it can be enabled through C# code, stsadm or powershell command and it can have three states: On, Off, OnDemand. First two should be clear. Third one means that SharePoint will show an image button next to Your login name on a page with which You will be able to show or hide the developer dashboard.
SharePoint SPItemEventReceiver
Preventing browser from cachning ASPX or ASCX content
Caching content by the browsers can be sometimes very annoying. I had problems with it, mostly when I was developing some popup modal dialogs which showed aspx or ascx controls.
Thankfully, there is very simple solution how to disable content caching. You achieve it in two ways:
The List cannot be displayed in Datasheet view Error
I often use Datasheet view in SharePoint to manipulate the data from the list. Few times I’ve met with the error “The List cannot be displayed in Datasheet view” when I tried to open the “excel” view.
This can be caused by an Office 2010 64-bit version installation on the local PC or even by the SharePoint Designer 2010 and happens only in Windows SharePoint Services 3.0(WSS) and Microsoft Office SharePoint Server 2007(MOSS).
Custom Exceptions Handling
In this post I’ll show how I handle exceptions in the projects I develop.
Some time ago I wrote a simple class which turned out to be very useful in exception handling and displaying it to the user. To use it You have to create a new instance of it and add it to the controls collection on the page. Then You can just add exceptions, through the appropriate method, which will be rendered as a HTML table. The class uses Render event to check if any exception has been added, if so the class renders appropriate HTML code which is shown to the user.
Assembla – free svn
Assembla is a free subversion for any types of projects. You can use it to store solution online, follow the changes you made(file versioning), share Your work etc. Using Assembla is free and the only thing You have to do is registering on the site and creating a new space for Your project.
Additionally, with a help of third-party tools it’s possible to extend Your Visual Studio 2005/2008/2010 with ability to manage Your Assembla source code. Continue reading
SqlMembershipProvider – Users management
In the previous post I showed You how to manage roles for forms authentication. Now I’ll explain how to manage users from the code side.
The main class which lets You manage users from provider is System.WebSecurity.SqlMembershipProvider class.
To get the SqlMembershipProvider object You have to use System.Web.Security.Membership class and pass the name of the provider You want to obtain:
Continue reading
SqlMembershipProvider – Roles management
In the previous post I showed You how to create custom log in page for forms authentication. Now I’ll explain how to manage roles from the code side.
The main class which lets You manage roles from provider is System.Web.Security.SqlRoleProvider class.
To get the SqlRoleProvider object You have to use System.Web.Security.Roles class and pass the name of the provider You want to obtain: Continue reading

