26 August, 2008

OpenID: An interesting "new" alternative

Having been walking around this for some time now, I today decided to get some more hands on experience with this alternative authentication mechanism called "OpenID". I've had it on my to-do list for the last month or so. It is not as easy to use as I first thought - but I haven't given up just yet.

Even though I've been pretty religious on using solely Microsoft frameworks - OpenID is very similar to CardSpace (Microsoft) in the sense that it is open and that it relies on 3 parties to establish the authentication of an individual. Even CardSpace has added support for OpenID recently. One thing that I really like about OpenID is it's extensibility and versatility. You are still to provide the authorization for your website, but authentication is handled by OpenID. And by an authentication provider of your choice. Now - I do not hold any provider in higher regard than others - so I decided to start with myopenid.com.

I plan to provide a brief and simple .NET how-to when time permits.

21 August, 2008

Exam 70-503 TS: Microsoft .NET Framework 3.5 - Windows Communication Foundation Application Development: Preparation

If you want to prepare for the above exam for WCF; you might want to observe the following:

The exams is (as one might expect) quite heavy on security related questions; so you might want to investigate CardSpace and SAML-tokens beforehand.

The exam is 43 questions and running for 140 minutes. To my great surprise, no questions related to netTcpBinding; which is a binding that I use almost exclusively in production systems, but all bindings in the exam revolved around the more “traditional” webservice bindings like basicHttpBinding and wsHttpBinding. A question on Federation was also present. In addition – you should investigate how impersonation/delegation is working out of the box with WCF.

But – basically do know your “ABC” of WCF (Address-Binding-Contract) and get to know the XML-schema for configuring a WCF service. There are a lot of configuration questions  with “select the appropriate configuration for a service that supports these requirements…”.

18 August, 2008

Passed Exam 70-503 TS: Microsoft .NET Framework 3.5 - Windows Communication Foundation Application Development

Some time ago I decided to take exam 70-503 TS: Microsoft .NET Framework 3.5 – Windows Communication Foundation Application Development so I decided to register for the exam for today. And today I attended the exam and passed. It is worth to mention that I used a promotion code submitted to my by Microsoft because I registered on Microsoft Visual Studio 2008 Learning Portal to be the first to know and save 40 percent on select Visual Studio 2008 exams.

I prepared for exam during the last week (august). I basically studied from the Microsoft books suggested on the Exam page: Microsoft® Windows® Communication Foundation Step by Step and Inside Windows Communication Foundation. In addition - I've a lot of hands-on experience with WCF during the last 1-2 years.

The exam consist of 43 questions and is scheduled for 140 min. You'll not find any exam simulator for this exam at this time as far as I know, so if you wish to prepare for the exam just get some hands on experience and study the books.

The next exam planned is: Exam 70-504 TS: Microsoft .NET Framework 3.5 - Windows Workflow Foundation Application Development

04 August, 2008

Custom configuration being loaded by a dll instead of an exe...

If you at times are developing plugins to established applications (e.g. word or excel), you might also be in need of reading configurationvalues for this plugin.
One thing that you do not want is to be forced to have an winword.exe.config to allow the standard ConfigurationManager class to load in these values. Then what does one do...? The System.Configuration.ConfigurationManager is perfectly capable of reading custom configurationfiles provided you supply it with the correct address of the configuration file in question. Here is how:

Create two projects:
1) Console (simulating e.g. winword, excel or other established application)
2) Library (to loadin it's own custom config-settings)

image         image

As seen from the above image - the library project has an app.config file included; this will in turn be renamed Library.dll.config upon compilation in Visual Studio (see image 2). Below is the application using the library that in turn will load in the configuration values. The console below could just as well be e.g. winword.exe.

    class Program
static void Main(string[] args)
Console.WriteLine("Loading external config...");

Library.Class1 c = new Library.Class1();


To load in the configuration values - the Library.Class1 will need to do the following:

    public class Class1
public void WriteAppConfigValues()
string path = Assembly.GetExecutingAssembly().Location;
Configuration cfg = ConfigurationManager.OpenExeConfiguration(path);
var s1 = cfg.AppSettings.Settings["myKey"] != null ? cfg.AppSettings.Settings["myKey"].Value : "None found";

Console.WriteLine("Writing line: {0}", s1);

In this way - you are able to deploy a configuration file for your plugin.

iPhone/XCode - not all cases are equal!

This bit me! Having made some changes to an iPhone application (Obj-C); everything worked fine in the simulator. But, when deploying the s...