X

SharePoint

Could not load file or assembly CabLib or one of its dependencies

When using WSPBuilder from command line you may get the following error: “Could not load file or assembly 'CabLib, Version=10.2.0.0, Culture=neutral, PublicKeyToken=5c838b77b53f84a0' or one of its dependencies. An attempt was made toload a program with an incorrect format.” This error occurs if there is something wrong with CabLib.dll or if CabLib.dll doesn’t exist in same folder with WSPBuilder.

Web Part Error: A Web Part or Web Form Control on this Page cannot be displayed or imported. You don’t have Add and Customize Pages permissions required to perform this action.

After deploying your solution to SharePoint anonymous and read-only users may get the following error: Web Part Error: A Web Part or Web Form Control on this Page cannot be displayed or imported. You don't have Add and Customize Pages permissions required to perform this action. Well, this is the case that is solved by famous this-issue-is-by-design (read: you have to find your own way how to solve the problem).

SharePoint farm administrator have no permissions to run PowerShell commands

On SharePoint 2010 it is not enough if you are farm administrator. You still cannot run PowerShell commands sometimes. The reason is simple – your user account needs more permissions. Here’s how to add permissions.

Add-SPShellAdmin–user cannot exist in database

If you try to add user to SharePoint shell administrator role you may get the following error: "Cannot add to the SharePoint_Shell_Access role of the database SharePoint_Config_. A possible cause of this error is that the account name was already added to the database as a login using a different user name than the account name."

SharePoint 2010 installation and configuration logs

Short posting that helps me to find SharePoint 2010 setup and configuration logs easily. Taken from TechNet page Verify upgrade and review upgraded sites (SharePoint Foundation 2010).

Measuring ASP.NET and SharePoint output cache

During ASP.NET output caching week in my local blog I wrote about how to measure ASP.NET output cache. As my posting was based on real work and real-life results then I thought that this posting is maybe interesting to you too. So here you can read what I did, how I did and what was the result.

SharePoint: Customizing DispForm.aspx and EditForm.aspx through browser

DispForm.aspx that displays detail view of list item and EditForm.aspx that displays edit view of list item are not customizable by default. You can move to these pages but there is no Edit option in Site Actions menu. But it still possible to customize these pages, add new web parts there and so on. All you need is your web browser.

SharePoint: SPList.HasView() extension method

One quick posting. I wrote yesterday extension method for SharePoint that checks if view exists. I think it is far better for performance if I don’t live on try…catch to find out if view exists or not. Extension method that you have to put in static class is here.

Invalid postback or callback argument. Event validation is enabled using in configuration

I wrote web part that uses Repeater control to create some repeating blocks of output. Each of these blocks has Button control in it. When I ran web part under SharePoint I got the following error: Invalid postback or callback argument. Event validation is enabled using in configuration or in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation. Here is the solution.

Customizing SharePoint standard forms

I needed a little bit customized forms that look similar to standard ones for one SharePoint solution. I have list with many fields and it is very inconvenient for users to fill these fields if they are following one after another. As there is no simple solution for this I created my own custom solution.