Skip to main content

Invite2Messenger

I don’t like Facebook for lots of reasons (how hard - and against their TOC - it is to get my data out being a big one), and one thing on Facebook that I used once and hated was their chat program (I don’t like browser based chat, not just Facebook’s). Thankfully Microsoft has solved that problem for me with the site Invite2Messenger, which lets you select your friends from Facebook and send them an invite to add you to Live Messenger. It is amazingly fast as well, working out which of the 120ish friends on Facebook have messenger accounts and which don’t in about 10 seconds and letting me have separate emails sent to each type.

The only downside to it, is that it doesn’t check who is already in messenger so a lot of my contacts got a mail asking to add me, even though they are in messenger. You can un-tick those manually… but I was lazy and this should be done automatically.

The thing that made me wonder is how Microsoft got access to that information, especially since all it asked for was the email address I use to sign in to Facebook. There was no prompt for logins or validation! In my untested theory based on running it one it may be possible to put anyone’s email in and get their friend list :( This seems like a security issue on the Facebook side… or maybe evidence of how much Microsoft’s little share in it actually has bought it!

SharePoint + Facebook

Courtz has had a great idea about combining SharePoint Mysites with Facebook information. He has a bit of simple code up there, but there may be a lot more options to explore (must put on thinking cap) around this and the upcoming Office 2009 release and features like the Knowlegde Network (yes that link points to the Channel 9 video of the product that didn’t happen with 2007, but it is happening with 2009!).

Delphi Prism: Part 4: What is available in each .NET Framework 3.5

What is available on each .NET Framework with Prism… this is mainly a screen shot post since it supports exactly what C# (and VB.NET) supports on those framework versions.

.NET Framework 3.5

Delphi - General

image

Mono

image

Silverlight

image

WCF

image

Windows

image

Windows (WPF)

image

.NET Framework 3.0

Delphi - General

image

Mono

image

Silverlight

NONE!

WCF

image

Windows

image

Windows (WPF)

image

.NET Framework 2.0

Delphi - General

image

Mono

image

Silverlight

NONE!

WCF

image

Windows

image

Windows (WPF)

NONE!

Juval Lowy coming to SA

Juval Lowy is from IDesign (which does some of the best WCF and .NET guidance) and runs the WCF master class which is a brilliant, but damn expensive course, so I’m definitely attending the FREE event where he will be speaking about .NET services. If you want to register: https://msevents.microsoft.com/CUI/Register.aspx?culture=en-ZA&EventID=1032402482&CountryCode=ZA&IsRedirect=false More details below.

Event Details:

Start Time:
11 February 2009 06:00 PM Harare, Pretoria

End Time:

11 February 2009 08:00 PM Harare, Pretoria

What is .NET services?

The .NET services bus is part of the new Microsoft Cloud Computing Windows Azure initiative, and arguably, it is the most accessible, ready to use, powerful, and needed piece. The service bus allows clients to connects to services across any machine, network, firewall, NAT, routers, load balancers, virtualization, IP and DNS as if they were part of the same local network, and doing all that without compromising on the programming model or security. The service bus also supports callbacks, event publishing, authentication and authorization and doing all that in a WCF-friendly manner.

This session will present the service bus programming model, how to configure and administer service bus solutions, working with the dedicated relay bindings including the available communication modes, relying on authentication in the cloud for local services and the various authentication options, and how to provide for end-to-end security through the relay service.

You will also see some advanced WCF programming techniques, original helper classes, productivity-enhancing utilities and tools, as well as discussion of design best practices and pitfalls.

Looks like this could be interesting - Microsoft Expression Event

clip_image001

2009 Expression Tour: Hands-On Labs
The Developer and Platform team at Microsoft South Africa is pleased to invite you to the Expression Tour, Hands-On Lab training event. Who should attend?
The training is aimed at designers and studio managers. If you’re into pixels, colour and creating amazing online experiences, then this one’s for you.
What we’ll cover
This is a two-day classroom training on WPF, Silverlight and Expression tools for non-technical audiences (200 level).

Day 1 About the Speaker :
Michael Koester
Michael Koester works for Microsoft Corporation as the Designer Marketing Manager for Middle East and Africa and Central and Eastern Europe. Prior to working at Microsoft, he had been an illustrator and graphic/interactive designer for various interactive agencies and new media companies in Germany and the US. Visit Michael's blog: http://koestie.wordpress.com
Provides an overview and participants will then build a working WPF application from scratch using the Expression tools.
Day 2
Participants will build a working Silverlight 2 application with audio and video from scratch. Additionally, participants will also get hands-on experience with some of the coolest technologies (DeepZoom and Virtual Earth integration).
No prior knowledge is required. In the end, participants will have a solid understanding of the Expression tools and technologies and can continue on their own, building Silverlight and WPF applications. This event will take place at a training venue with PCs provided.
NB: This event is FREE OF CHARGE
Limited space available, so register today to secure your seat!
Johannesburg Cape Town
Date: 26-27 January 2009
Time: 08:30-16:00
Venue: IT Intellect (Bryanston)
Click here to register
Date: 4-5 February 2009
Time: 08:30-16:00
Venue: IT Intellect (Waterfront)
Click here to register
You can also register via:
E-mail: [email protected]
Phone: 0860 2255 67
Read more about Expression Studio at http://expression.microsoft.com

AD Lookup Control in Request Tracker

So my double header post on getting this funky AD lookup control with Perl (post 1 & post 2) was actually prep work for getting to work in a product called RT (or Request Tracker from BestPractical) which is built on Perl. I have never worked with it before so I am slightly (read: exceptionally) ignorant of how to do this. Effectively I want a lookup to include AD users.

The First Option

The first thing I saw was this Include Page option when creating a field, which is described as

RT can include content from another web service when showing this custom field. Fill in this field with a URL. RT will replace __id__ and __CustomField__ with the record id and custom field value, respectively Some browsers may only load content from the same domain as your RT server.

image

Sounds perfect, turns out there is NO knowledge of how this works. I tried various forums and news groups, even emailing people who asked before about it… no answers are available! The documentation is USELESS!

The Second Option

Another option is once you have created a field a new option appears: Field values source:

image

So how do you actually use this without typing in the options yourself?

Custom Perl Module

Well in the /opt/rt3/lib/RT/CustomFieldValues is a file called Groups.pm which allows you to provide the names of the groups as a field source. So this is a possible solution, but first you need to create the module. The module has two methods:

SourceDescription - Which needs to return a string containing the name of what you are returning.

ExternalValues - Which needs to return an array of objects which contain the values. Those object must have a name property which is the name you want to show, and two optional properties description which is the… actually I dunno where it’s used (don’t think it is) and sortorder which you use to do the sorting. So taking the AD code previous the previous posts and combining it into the right format we end up with this code:

package RT::CustomFieldValues::AD;
 
#Start of user configurable settings
 
my $DomainController = "<SERVER>";
my $Username = "<USERNAME@DOMAIN>";
my $Password = "<PASSWORD>";
my $BaseOU = "<SEARCH OU>";
 
#End of user configurable settings
# ------------------- DO NOT CHANGE FROM HERE ---------------
#Start of system settings
my $Attributes = "sAMAccountName,sn,displayName";
my $Filter = "(objectCategory=User)" ;
#End of system settings
 
 
use strict;
use warnings;
use Net::LDAP;
use Net::LDAP::Control::Sort;
use HTML::Entities;
 
use base qw(RT::CustomFieldValues::External);
 
sub SourceDescription {
    return 'Active Directory Users';
}
 
sub ExternalValues {
    
    my @res;
    my $i = 0;
    my $ad = Net::LDAP->new($DomainController)
                or die "Could not connect!";
 
    $ad->bind($Username, password=>$Password, version=>3);
 
    my $sort = Net::LDAP::Control::Sort->new(order => "displayName");
 
    my $results = $ad->search(base=>$BaseOU, filter=>$Filter, attrs=>    $Attributes, control=>[$sort]);
    
    if ($results->count == 0)
    {
      die "No results returned";
    }
    else
    {
        for (my $counter=0; $counter<$results->count; $counter++)
            {
            my $user = $results->entry($counter);
                    if (defined($user->get_value("sn")) && length($user->get_value("sn")) > 0 && defined($user->get_value("sAMAccountName")))
                    {
                push @res, {
                    name => encode_entities($user->get_value("displayName")),
                description => encode_entities($user->get_value("sAMAccountName")),
                sortorder => $i++,
 
                }
            }
            }
      }
 
    $ad->unbind;
 
 
      return \@res;
}
 
1;

So we bundle that nicely in to AD.pm and dump that into the folder.

Configuration

So how do we use that module? Well you need to go to /opt/rt3/etc and edit the RT_SiteConfig.pm file and add the following line to it: Set(@CustomFieldValuesSources, "RT::CustomFieldValues::AD");

Next restart Apache (the command I used was: apache2ctl restart) and go back to the field properties and you should be able to select it.

Tips and Tricks

A few things about building these that I learnt along the way

  1. If, after the IIS reset, there is no drop down for the field source it means you have a bug in a module and you need to fix said bug.
  2. Use the die command excessively. When you select the field source and click save changes it will test your code. Only die will cause it to show error messages! When you get the UI, it will not give you errors!
  3. The autocompletion options may seem the coolest, but they use a (poorly, at least compared to jQuery) written piece of JavaScript. This battles to run with more than 25 results returned (slows down, doesn’t work, errors, freezes browser). I would recommend working with the select one or select many (combo boxes) first and trying to change to it later.
  4. If you change the code after you have set the field, you need to restart apache and then re-configure the field by setting the field source to something else, save and then set it back. It seems there is some caching issues which can prevent your changed results from appearing.

Hopefully this helps you develop with RT, and that this (overcomplicated) process is easier.

Inauguration PhotoSynth

CNN has a very cool PhotoSynth from the 2 million people who attended the US inauguration (and who uploaded them to CNN). There is some really great angles available which I didn’t see from the TV broadcast and some great close up shots of Obama. This is just another great use of Silverlight. If you think how many will use this and how many watched it streamed live with Silverlight the question of Silverlights reach must really not becoming a serious discussion point when comparing with Flash.

If want to have a look at the PhotoSynth: http://www.cnn.com/SPECIALS/2009/44.president/inauguration/themoment/

image  image

Delphi Prism: Part 3: VS 2008

So now we have completed the install lets run it. To start off we will try VS 2008 first.

image 

Hmm, nothing new on the slash screen.

image

Ah, there is a special window. This could be annoying though, maybe that Don’t Show should be default.

In the New project dialog, there it is the Delphi Prism section. Yes changing framework version changes what is available, same as in C# or VB.NET:

image

Interesting is this sub-section called Mono, which has GTK# and Cocoa options!!!

image

I first choose GTK# and I get prompted for registration… damn more remembering of that BDNCDN password :(

image

Right so lets just compile and run… and boom that failed :(

image

Right, maybe GTK# is needing something? Let’s try Cocoa (Leopard)… which also went boom :(

image

WinForms on OSX… that works :)

image

GTK#/Mono Console App… that works :) Love the base code (hello world)… I added the readkey’s to test the various styles and both work (check the screen shot)

image

How about good old Windows WinForms based. That worked!!! :)

image

So drop a  button on to the form and double click… hmm no partial class support so all it goes into the main.pas, same as C# in Visual Studio 2003. Anyway this lets me try some things… first intellisense, that works great:

image

Error messages look slightly different:

image

LINQ in Delphi works!!!

image

Right enough basics for this post…

AD Lookup Control with Perl and JS - Day 2

So day 2 started with growing the control further, but first I wanted to set the code up to run in IIS.

Perl + IIS 7

First I created a simple application pool for this site to run in. One of the nice things is setting it to not run .NET Framework code, which just lowers your attack surface.

image

Next I created a simple web site to use that app pool, however there was no handler setup (odd, I thought ActivePerl’s install did this - but maybe it is IIS 6 only). To fix that I clicked on Handler Mappings

image

In there I added a Script Handler with the following settings:

image

Note I would leave Request Restrictions on the default UNLESS you have a good reason to do it.

After that brief config my Perl worked for a while, until I started getting this error (IIS Worker Process has stopped working) when browsing to the web page:

image

I had just changed code before that, so here is a quick test to you to try and find the fault. The snippet of Perl code looks like the following:

   1: print "<html> 
   2: <head> 
   3: <script src='jquery.js' type='text/javascript'></script>
   1:  
   2: <script src='jquery.simplemodal.js' type='text/javascript'>
   1: </script> 
   2: <script src='test.js' type='text/javascript'>
</script>
   4:  
   5: </head> 
   6: <body style='font-family: Calibri'> 
   7:  
   8: Username <input type='text' id='result' readonly='readonly'/><span id='test' style='color: #0000FF; text-decoration: underline; cursor: hand'>Select User</span> 
   9:  
  10: <div id='listContent' style='padding: 5px; background-color: #000000; color: #FFFFFF; border: thin solid #C0C0C0; width: 450px; overflow: scroll; height: 450px;'> 
  11: <div style='font-size: x-small; color: #C0C0C0; text-align: right; cursor: hand;padding-right: 20px;' class='simplemodal-close'>Cancel</div> 
  12: <span style='text-transform: capitalize; font-weight: bold; padding-bottom: 3px'>Select a user by clicking on their name</span> 
  13: <hr /> 
  14: Filter <input type="text" id="filter" /> 
  15: <hr />";

If you are stuck the here is a hint: Line 14.

.

.

.

Ok, if you got it good. If not, well it is because the HTML I was outputting had " in it and that caused the string to close and some garbage (from the compilers POV) to be after it. Why this has to kill the process I dunno, what’s wrong with a error message like we get from .NET?!

Filtering

I added a text box to the popup dialog so I could filter using JQuery .show and .hide methods. This is not that impressive but it did lead me to needing the jQuery documentation a lot (mainly for the selectors, but I also was getting weird results with hide… until I realized I had <br/> tags there and those weren’t getting hidden) and checking with the slow internet here was not great. So I found (read: I went to the jQuery Alternative Resources page) a cheat sheet I could print and stick on the wall in front of me. There are two listed there, one Excel and one Image. The image one looks nicer and is more verbose than the Excel one, but I went with the Excel one because it has examples… and I can figure out from the examples more than the verbose text in the image gives me.

One of the other things about filtering is that I wanted to be case insensitive, but I was using :contains to do the filtering which is case sensitive. I found a great thread on adding an extension method to it with a case insensitive version of :contains. I recommend if you are stuck copy/paste that one.

CRM 4 Rollup Pack 2

If you thinking, jeez this sounds familiar well it was only 1 month and 19 days ago that rollup pack 1 shipped.

You can download it at http://www.microsoft.com/downloads/details.aspx?FamilyID=aa671769-61e9-45c4-919f-c88199aa4241&displaylang=en

So what’s new?

113 known (rather publicly known issues) and 18 private (i.e. MS did not publically post articles on those) fixes!

My highlight reel of fixes

  • 949844 (http://support.microsoft.com/kb/949844/ ) The Async service stops unexpectedly or you cannot start the Async service after you import an organization from another Microsoft Dynamics CRM 4.0 deployment
  • 950266 (http://support.microsoft.com/kb/950266/ ) You are looped in the sign-in page when you try to run the Data Migration Manager Wizard in Microsoft Dynamics CRM 4.0
  • 950372 (http://support.microsoft.com/kb/950372/ ) You are prompted to enter your user name and password multiple times when you start Outlook, or when you click a Microsoft Dynamics CRM folder in Outlook, on a Windows Vista-based computer
  • 954313 (http://support.microsoft.com/kb/954313/ ) Error message when you try to log on to the Microsoft Dynamics CRM Web site from the Microsoft Dynamics CRM 4.0 server: "Request IP Address has different address family from network address"
  • 956112 (http://support.microsoft.com/kb/956112/ ) Error messages in the Application log on the Microsoft Dynamics CRM server after you delete a quick campaign: "Deletion Service failed to clean up table=[Table_Name]"
  • 956282 (http://support.microsoft.com/kb/956282/ ) Error message when you use the Microsoft Dynamics CRM 4.0 SDK to develop a Custom Workflow Activity assembly: "The Key cannot be NULL"
  • 956859 (http://support.microsoft.com/kb/956859/ ) The Microsoft Dynamics CRM toolbar is disabled in Outlook after you lose the network connection for less than one minute
  • When you use impersonation in an Internet-Facing Deployment (IFD) environment, you receive the following error message: 0x80040204 Invalid user auth
Any major risks?

You can uninstall Update Rollup 2. So make sure you have backups if you need to re-install!

There are four fixes which you need to manually configure:

  • 955138 (http://support.microsoft.com/kb/955138/ ) You experience slow performance or timeouts when you try to access some views in Microsoft Dynamics CRM 4.0

  • 955452 (http://support.microsoft.com/kb/955452/ ) Line feeds are not used when you send an e-mail message that uses an e-mail template to render data that has line feeds in Microsoft Dynamics CRM 4.0

  • 955745 (http://support.microsoft.com/kb/955745/ ) Error message when you try to configure the Microsoft Dynamics CRM 4.0 client for Outlook: "This implementation is not part of the Windows Platform FIPS validated cryptographic algorithms"

  • 956527 (http://support.microsoft.com/kb/956527/ ) The Microsoft Dynamics CRM client for Outlook consumes three times as much memory in version 4.0 as in version 3.0

  • Thanks to Menno for the heads up.