Verify XML signatures with .NET 1 using CAPICOM

23 Mar 2009 In: Development

Signing of XML documents make up the foundation for SAML security by providing proof that a message hasn’t been tampered with by a third party. If you’ve ever worked with certificates and signing XML in .NET 2+ you know that it’s not a big deal. The X509Certificate2 class make loading public and private keys from certificates on disk or certificate store a breeze. While you’re probably looking forward to .NET 4 just as much as I am, sometimes your customers have old platforms that just can’t be upgraded to .NET 2.0+ by recompiling it. So if you’re stuck with .NET 1.1 you will run into problems handling certificates. The solution for .NET 1.1, and other languages as well of course,  is a library from Microsoft called CAPICOM. While CAPICOM isn’t a .NET library it’s easily made available in .NET using Interop.
Full post and code »

Recover your WEP/WPA key(s)

18 Mar 2009 In: Ramblings

I’m visiting my parents this week in their home in Austria. Since they moved here they’ve discovered that the Internet is awesome even for old people. They use internet for pretty much everything: making phone calls (skype), watch Swedish TV, read news, keeping in touch with family and friends (mail, facebook etc). The first time I was here I installed a wireless router, but of course I had forgotten the wep key by now.  Instead of re-configuring the router and the computers connected to it I found this awesome app: WirelessKeyView.

wirelesskeyview

It will reveal the wep/wap key stored for all wlans in XP, probably not Vista. No installation required!

iPhone OS 3.0 due this summer

18 Mar 2009 In: iPhone
iPhone OS 3.00

During the keynote it seemed Apple would disappoint everyone with iPhone OS 3.0 but after blabbering about 3rd party apps for way too long they unveiled the new features and it’s clear they’ve listened to their customers. MMS, cut and paste, landscape mode and spotlight search were some of the most requested features that will be available in 3.0.

As a developer the push notification service is what I really find exciting among the 1000 new APIs.

You can watch the entire keynote here

It struck me when watch it that they are showcasing the new functionality such as MMS and forward/remove SMS and voice memo etc. The audience applauds excitedly, but this is stuff that existed in my SonyEricsson phone from 6 years ago.  If I was Apple, i would be a bit embarrassed to implement and showcase this after the phone being available for about 1 year. Still, I’m very happy they’ve done it. SonyEricsson however, should learn from Apple to bring updates including new features to their phones. I don’t want to buy a new phone to get new software feature.

New layout and url, same old blog

15 Mar 2009 In: Ramblings

Welcome to my “new” blog! I’ve finally come out of the closet and to make it obvious I changed the layout as well. However, it looks different and has a different URL, but it’s still the same old blog.

Random picture of servers. My server probably not visible.
Random picture with servers.
My server probably not visible.

I’ve hosted this blog on my old (PPC) Mac Mini in my bedroom closet for a few months. When I started out I didn’t think I would write so much and definitely didn’t think I would have this many visitors. About a week ago Avantime got a brand new Linux environment over at the ever friendly EPiServer hosting so I moved my blog there instead.

Crawl cookie protected content with GSA

12 Mar 2009 In: Development

The GSA (Google Search Appliance) has support for forms based authentication but there are situations when configuring the authentication through the administration panel won’t work. A situation like that could be that you have an intranet or extranet with forms based authentication (such as EPiServer) but the authentication is acutally done by a third party (SSO). In this particular case it’s our own SAML-SSO service that authenticate the user on behalf of the intranet.

HTTPHeaders to the rescue!
Read the rest of this entry »

Avantime and Svenskfast joins the war on terror (IE6)

20 Feb 2009 In: Ramblings

The war on terror, or Internet Explorer 6, started in our neighboring country: Norway. For once they’ve actually come up with something good and it caught on. Wired wrote about it yesterday, Swedens largest news site Aftonbladet and the largest IT site IDG.se added the IE6 warning today. This of course was something we discussed at work along with the Piratebay trial. I think we can all agree that IE6 comes pretty close after war, religion and toilets that won’t flush on our “things we dislike”-list. Of course we wanted to do our part and help this war on terror and fortunately for us Gunilla Matsson from Svenskfast.se was at our office. We quickly explained what the IE6 warning was all about and she wanted Svensk Fastighetsförmedling to be a part of it too. Not only is it a great cause, it’s also great for publicity! Svenskfast.se is Swedens ~30th most visited site.

To join the war, go to jardenberg.se and get your own warning snippet. Read more about it on mindpark.se, Wired, the site where it all started finn.no and Microsoft Norway is positive to the campaign.

I promise to post statistics on the effect of this campaign in a week or so. Let’s hope the rest of the world joins the war too!

EPiServer editor context menu plugin

13 Feb 2009 In: Development, EPiServer

Last week I was investigating the editor plugin capabilities of EPiServer CMS R2. My goal was to plug into the context menu with my own submenu, you know the kind of menu item that opens another list of options. The lack of documentation in the SDK and elsewhere made the task a bigger headache than it should have. So here’s an example of how to create a context menu item with a submenu, or subitems if you like.
Read the rest of this entry »

shouldAutorotateToInterfaceOrientation?

4 Feb 2009 In: Development, iPhone

UPDATE – 2009-07-07: I’ve updated this post and the example project to support iPhone OS 3.0. The code is now compliant and work in all currently existing versions of iPhone OS, latest right now is iPhone OS 3.0

This post is something I’ve worked on for quite a while. One of the biggest challenges building HittaHem was the photo-mode. I wanted the images in full screen and of course I wanted the images to rotate as the iPhone was rotated. At first this seemed like a piece of cake, just return YES to the shouldAutorotateToInterfaceOrientation event! Sure, that does it, but I didn’t want the whole application to rotate because the rest of the UI didn’t look good that way.

borat_high_five

Instead of redesigning the entire application just to support rotating images I decided to solve the problem myself. I’ve seen other people ask how to accomplish this on other blogs etc so I know I’m not the only stupid person who thinks it’s a good idea to only rotate a part of the application. I did ask the Italian evangelist person at the iPhone Tech Talk World Tour if there really wasn’t an easier way to do it, his response was “why would you want to do that?”. I tried to explain but apparently it didn’t make sense to him. At least I knew I wasn’t a complete fool investing hours on rewriting something that could be done with one line of code. Facebook rotates the images in the albums without rotating the entire app, and Facebooks (as my mom calls it), can’t be idiots, right?

Instead of pasting tons of code here I’ll try to explain my solution and the biggest problems implementing it. As usual you’ll find a complete demo project at the end of the post.
Read the rest of this entry »

About this blog

With this blog I try to provide useful tips and solutions for programming .NET, Objective-C and more. My name is Björn Sållarp, and I love writing code.


All blogposts are written on a mac!  Avantime - Strategic IT solutions
Blogg listad på Bloggtoppen.se    BlogRankers.com
WP-Highlight