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

Read more

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.

Read more

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

Read more

ASP.NET and WIF: Showing custom profile username as User.Identity.Name

I am building ASP.NET MVC application that uses external services to authenticate users. For ASP.NET users are fully authenticated when they are redirected back from external service. In system they are logically authenticated when they have created user profiles. In this posting I will show you how to force ASP.NET MVC controller actions to demand existence of custom user profiles.

Read more

ASP.NET MVC: Using ProfileRequiredAttribute to restrict access to pages

If you are using AppFabric Access Control Services to authenticate users when they log in to your community site using Live ID, Google or some other popular identity provider, you need more than AuthorizeAttribute to make sure that users can access the content that is there for authenticated users only. In this posting I will show you hot to extend the AuthorizeAttribute so users must also have user profile filled.

Read more

ASP.NET: Including JavaScript libraries conditionally from CDN

When developing cloud applications it is still useful to build them so they can run also on local machine without network connection. One thing you use from CDN when in cloud and from app folder when not connected are common JavaScript libraries. In this posting I will show you how to add support for local and CDN script stores to your ASP.NET MVC web application.

Read more

ASP.NET MVC 3: Using AppFabric Access Control Service to authenticate users

I had Windows Azure training this week and I tried out how easy or hard it is to get Access Control Service to work with my ASP.NET MVC 3 application. It is easy now but it was not very easy to get there. In this posting I will describe you what I did to get ASP.NET MVC 3 web application to work with Access Control Service (ACS). I will show you also some code you may find useful.

Read more

Deployable dependencies in Visual Studio 2010 SP1 Beta

One new feature that comes with Visual Studio 2010 SP1 Beta is support for deployment references. Deployment reference means that you can include all necessary DLL-s to deployment package so your application has all assemblies it needs to run with it in deployment package. In this posting I will show you how to use deployment dependencies.

Read more

SSAS: Using fake dimension and scopes for dynamic ranges

In one of my BI projects I needed to find count of objects in income range. Usual solution with range dimension was useless because range where object belongs changes in time. These ranges depend on calculation that is done over incomes measure so I had really no option to use some classic solution. Thanks to SSAS forums I got my problem solved and here is the solution.

Read more