February, 2011

List instance data is deployed asynchronously

Suppose you have SharePoint list instance that is deployed to site using feature. Also suppose this list instance has event receiver bound to it. Add some debug messages to event receiver, run your project and activate feature through SharePoint web interface. From output you should see that items are added to list on more than […]

The program w3wp.exe, with the assigned process ID, could not authenticate locally by using the target name HTTP/WEBSITENAME.

You may face this error when you are running your development environment on virtual server where you have also configured alternate access URL-s.The full message is something like this: “The program w3wp.exe, with the assigned process ID, could not authenticate locally by using the target name HTTP/WEBSITENAME. The target name used is not valid. A target name should refer to one of the local computer names, for example, the DNS host name. Try a different target name.”

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.

5 minutes WIF: Make your ASP.NET application use test-STS

Windows Identity Foundation (WIF) provides us with simple and dummy STS application we can use to develop our system with no actual STS in place. In this posting I will show you how to add STS support to your existing application and how to generate dummy application that plays you real STS.

Making WIF local STS to work with your ASP.NET application

Making Windows Identity Foundation (WIF) STS test application work with your solution is not as straightforward process as you can read from books and articles. There are some tricks and some configuration modifications you must do to get things work. Fortunately these steps are simple one.

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).

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.”