Archives

Archives / 2009 / May
  • .Net Service Bus: How to make training kit examples authenticate without problems

    I’m trying out Azure Training Kit examples to study cloud stuff that should hit the streets (or sky) later this year. I faced some trouble when trying to connect with .Net Service Bus using settings mentioned in examples (netTcpRelayBinding and CardSpace). I tried hard but CardSpace authentication failed every time. My final solution was simple: I moved to username and password authentication scheme.

  • ASP.NET 4.0: Modifying ClientID of controls

    Client-side ID-s of ASP.NET controls have been problem for a long time. They are hard to predict and guess. Fool-proof method that uses JavaScript block that defines client-side ID-s as variable values is not very elegant. Today’s web applications use client-size scripting heavily and now ASP.NET 4.0 provides us with elegant features to handle client-size ID-s of controls to make client-side scripting easier for us. Let’s see quick example.

  • ASP.NET 4.0 SEO features: Description and keywords

    Another new SEO feature that ASP.NET 4.0 introduces is support for meta description and keywords. I think these are the most abused SEO features ever and search engines are very careful when considering these meta tags but I am very sure that there are still engines that respect those tags and that’s what makes these new features very useful.

  • Performance of Fibonacci numbers algorithms

    Performance of algorithms is important topic if you want to write programs that work fast and doesn’t eat too much resources. In this example I will show you two implementations of famous Fibonacci numbers algorithm and let you compare how these two implementations perform. This posting will be also introduction to my next posting to keep it smaller and to keep focus on point.

  • SharePoint: SPList.Clear() extension method

    Currently there is no good method in SharePoint for deleting all items from list. But there are solutions that need this kind of functionality. During one of my projects I wrote extension method for SPList that removes all items from it.

  • .Net Framework 4.0: System.Linq.Parallel

    .Net Framework 4.0 has parallel computing extensions for LINQ. Previously it was possible to download parallel extensions for LINQ separately from CodePlex. Of course, you can still use these extensions if you have older version that 4.0. I wrote a little, simple and pretty pointless example that illustrates how parallel queries work in .Net Framework 4.0.

  • .Net Framework 4.0: Using System.Lazy<T>

    .Net Framework 4.0 provides us with a new class called Lazy<T>. As documentation sais then Lazy<T> provides support for several common patterns of lazy initialization, including the ability to initialize value types and to use null values. So it is construct that helps us implement lazy loading.

  • 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 <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> 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.

  • SharePoint: COMException 0x81020069

    A little mystery when updating publishing pages: page is checked out, some attributes are changed and now I want to update this page. All I get is error that even Google has never seen before: System.Runtime.InteropServices.COMException (0x81020069). As I got error message in my own language I try to translate it: Attributes of checked out and orphan regime document cannot be edited. To edit attributes you have to use special software for this type of file.

  • SharePoint: DCOM Error 10016

    I you get Access Denied errors in SharePoint then take a look at Event Viewer to see if there are some DCOM 10016 Event Errors in System log: The application-specific permission settings do not grant Local Launch permission for the COM Server application with CLSID {A9E69610-B80D-11D0-B9B9-00A0C922E750} to the user NT AUTHORITY\NETWORK SERVICE SID (S-1-5-20) from address LocalHost (Using LRPC). This security permission can be modified using the Component Services administrative tool. If there is such error then follow the steps below to get this error fixed.

  • Running SharePoint on Windows 7

    I tried to put up SharePoint development environment on Windows 7 and guess what – I succeeded. I took smaller challenge and installed WSS 3.0 SP2. Of course, you can also install SharePoint Server instead of WSS. On my machine WSS 3.0 uses SQL Server 2008 Express edition as database. For MOSS 2007 you should have SQL Server 2008 Developer edition.