| Subcribe via RSS

NTLM / Windows Authentication with Firefox

July 31st, 2009 | 4 Comments | Posted in Web

Firefox, my browser of choice, doesn’t support NTLM “out of the box”

What that means is, if you visit a site on your domain (for example http://intranet) that you should have access to, you’re presented with a username and password box.
Visit the same site in IE, and it lets you straight through, based on your credentials.

What you need to do, is explicitly set the allowed URIs that Firefox is allowed to pass your credentials to.
Since I only use this on a couple of sites, it’s not really a problem.

Here’s how to do it:

Step One

Load about:config in Firefox (more information on about:config)
Click “I’ll be careful, I promise!” (and make sure you are careful, you did promise….)

ntlmFireFox1 

Step Two

Locate network.automatic-ntlm-auth.trusted-uris
The easiest way to do this is to type “network.automatic” into the filter box. Then, only two entries show up.
Double click network.automatic-ntlm-auth.trusted-uris

ntlmFireFox2

Step Three

Enter your url into the box.
In my case, it’s http://intranet

That’s it! Firefox will now allow NTLM on that url!

ntlmFireFox3

VN:F [1.8.2_1042]
Rating: 0.0/10 (0 votes cast)
VN:F [1.8.2_1042]
Rating: 0 (from 0 votes)
Tags: , ,

Fake Lottery – Game Corner International

July 30th, 2009 | 7 Comments | Posted in Uncategorized

I received another fake lottery thing today, this time from Deborah Shiemke – dispatch@mailonetoday.co.cc

Here’s the body of the email

We congratulate you this day as you have emerged a winner in the Game Corner International Lottery Organization. See attachment for claims procedure. Thank you

Yours Sincerely,

Dr. Deborah Shiemke

Announcer-Game Corner International,

United Kingdom.

This message and its attachments are for designated recipient(s) only and may contain privileged, proprietary and private information. If you have received it in error, kindly delete it and notify the sender immediately.

This was attached in a word document:

The Game Corner International 
17, Bugsby Way 
Canary Wharf, London, E15 4OM

United Kingdom 
Registered No: GCIL/UK/04281185 
Serial No: GCIL/MYP/UK/09-1250/09 
Draw No: 09945/SALD

Dear Winner,

CLAIMS NOTIFICATION

Over the years, the prestigious Game Corner International Lottery Organization has set out and successfully organized Sweepstakes on a regular basis. (Daily, Weekly, Monthly and Annually)

We have equally maintained a high standard and unrivaled in the industry as it concerns the pay out of winnings to successful participants with the help of our London Pay Banks/courier services.

In line with the commemorating event marking our 25th year anniversary, we rolled out over £25,000,000.00 (Twenty Five Million United Kingdom Pounds) for this anniversary/mid-year draw. Participants for the draws were randomly selected and drawn from a wide range of web hosts which enjoy our patronage .The selection was made through a computer drawn system attaching personalized email addresses to ticket numbers.

As luck and destiny would have it, your email address as indicated was drawn and attached to ticket number 4019241059 with Serial No: GCIL/MYP/UK/09-1250/09 and drew these lucky numbers 04-09-12-21-23-45 (25) which subsequently won you £350,000.00 GBP (Three Hundred and Fifty Thousand United Kingdom Pounds) as one of the 25 jackpot winners in this draw. You are therefore entitled to a total payout of £350,000.00 GBP (Three Hundred and fifty Thousand United Kingdom Pounds) in Category A. The draws were conducted in East London, United Kingdom on July 26, 2009.

These lottery Draws are commemorative and as such special. Please be informed by this winning notification to make contact with our claims department with the details below who shall by duty guide you through the process to facilitate the release of your winnings accordingly.

To file for your claims; contact;

Mr. Feraren Dawson

(The Game Corner International –Claims Department)

Tel: +44-701-078-6477

Fax: +44- 8445855766

Email: ferarendawson-gcli@live.com

PROVIDE THE UNDERMENTIONED CLAIMS REQUIREMENTS/DETAILS ON a Microsoft Word Pad or On Your Direct e-mail Page AND FORWARD DIRECTLY TO THE ABOVE MENTIONED DEPARTMENT/OFFICER

(1) FULL NAME                                                                    (8) WINNING EMAIL ID                                                                            

(2) FULL ADDRESS                                                             (9) DATE OF WINNING AWARD

(3) NATIONALITY                                                               (10) TOTAL AMOUNT WON

(4) SEX                                                                                   (11) MARITAL STATUS

(5) AGE                                                                                  (12) REGISTERED NUMBERS

(6) OCCUPATION                                                                (13) SERIAL NUMBERS

(7) MOBILE/TELEPHONE NUMBER                                 (14) DRAW NUMBERS                      

I wish to on behalf of all members and staffs of The Game Corner International Lottery Organization to congratulate you on your win and wish you the best as you spend your good fortune.

Sincerely,

Dr. Deborah a Shiemke

The Game Corner International Lottery Organization

United Kingdom

This message and its attachments are for designated recipient(s) only and may contain privileged, proprietary and private information. If you have received it in error, kindly delete it and notify the sender immediately.

VN:F [1.8.2_1042]
Rating: 10.0/10 (1 vote cast)
VN:F [1.8.2_1042]
Rating: 0 (from 0 votes)
Tags:

Could not load file or assembly ‘ChilkatDotNet2′ or one of its dependencies. An attempt was made to load a program with an incorrect format.

July 30th, 2009 | No Comments | Posted in Uncategorized

Whilst setting up an application to run on my local machine (running Vista 64bit) I encountered this error:

Could not load file or assembly ‘ChilkatDotNet2′ or one of its dependencies. An attempt was made to load a program with an incorrect format.

 

Obviously, the application uses ChilKat components, but it would seem that the version we are using, is only the 32bit version.

To resolve this error, I set my app pool in IIS to allow 32bit applications.
Open up IIS Manager, right click on the app pool, and select Advanced Settings (See below)

 

Set IIS AppPool Advanced Settings

Then set “Enable 32-bit Applications” to True.

Enable 32-Bit Applications

All done!

VN:F [1.8.2_1042]
Rating: 10.0/10 (3 votes cast)
VN:F [1.8.2_1042]
Rating: 0 (from 0 votes)
Tags: , ,

Globai Gathering – Wristband Error?

July 26th, 2009 | 8 Comments | Posted in Misc

I went to Global Gathering (24th & 25th July 2009)

Upon collecting my wristband, I noticed an error – instead of being printed with Global Gathering (as it has in previous years) it said Globai Gathering!

A deliberate error? To aid in spotting fakes?? Or a clumsy mis-print?

photo

VN:F [1.8.2_1042]
Rating: 0.0/10 (0 votes cast)
VN:F [1.8.2_1042]
Rating: 0 (from 0 votes)
Tags: ,

Removing a previous version of Windows

July 21st, 2009 | No Comments | Posted in Windows

If you have installed a newer version of Windows Vista (for example 64 bit instead of 32 bit), and didn’t format your HD first (like I just did) it simply installs the new version, over the top of the old version.

The old version will continue to take up space (around 4gb in my case) while go unused.

If you want to remove it, follow these steps:

Click Start. Type “Disk”
Select Disk Cleanup

Start -> Type "Disk"

In the Disk Cleanup utility, ensure “Previous Windows installation(s)” is selected, and click ok.

Disk Cleanup - Select Previous Windows Installation(s)

That’s it – the old version is gone.

VN:F [1.8.2_1042]
Rating: 0.0/10 (0 votes cast)
VN:F [1.8.2_1042]
Rating: 0 (from 0 votes)
Tags: ,

Windows 7 – Sticky Notes

July 18th, 2009 | No Comments | Posted in Windows

This is a sticky note!

image 

This is something I will use all the time!

Windows 7 has a feature called “Sticky Notes” – basically, these little notes are like post it notes – they stick to your desktop!

You can change the colour, resize, move them around etc… So simple, yet so useful!

VN:F [1.8.2_1042]
Rating: 0.0/10 (0 votes cast)
VN:F [1.8.2_1042]
Rating: 0 (from 0 votes)
Tags: ,

How to get Messenger to run in the TaskBar in Windows 7

July 17th, 2009 | No Comments | Posted in Windows

After installing the Windows 7 RC, I installed the latest Windows Live Messenger.
After using it, it appears that it does not run in the task bar, as it used to in Vista! This is pretty annoying, as I only keep it open to use now and again.

There is a way around this however… you need to set it to run in Compatibility Mode for Windows Vista.

To do this, first exit Messenger, then locate msnmsgr.exe (in your Program Files directory)
Right click it, select Properties

image

Choose the Compatibility tab, and select Windows Vista.

image

Hit ok, and then restart Live Messenger.

It now runs in the notification area!

VN:F [1.8.2_1042]
Rating: 0.0/10 (0 votes cast)
VN:F [1.8.2_1042]
Rating: 0 (from 0 votes)
Tags: ,

Windows Azure Pricing Announced

July 15th, 2009 | No Comments | Posted in Development

Microsoft has finally released their pricing model for the forthcoming Windows Azure

Windows Azure:

  • Compute = $0.12 / hour
  • Storage = $0.15 / GB stored / month
  • Storage Transactions = $0.01 / 10K
  • Bandwidth = $0.10 in / $0.15 out / GB

SQL Azure:

  • Web Edition – Up to 1 GB relational database = $9.99
  • Business Edition – Up to 10 GB relational database = $99.99
  • Bandwidth = $0.10 in / $0.15 out / GB

.Net Services:

  • Messages = $0.15/100K message operations , including Service Bus messages and Access Control tokens
  • Bandwidth = $0.10 in / $0.15 out / GB

Further details available from:
http://www.microsoft.com/azure/pricing.mspx

VN:F [1.8.2_1042]
Rating: 0.0/10 (0 votes cast)
VN:F [1.8.2_1042]
Rating: 0 (from 0 votes)
Tags:

Using JoeBlogs -metaWeblog API Wrapper

July 7th, 2009 | 22 Comments | Posted in Blogging, Geek Speak, Web

Step 1

Download the latest release of JoeBlogs from Codeplex
(Click the Downloads tab, and select the latest download)

Step 2

Unzip the contents of the downloaded zip file.
(I usually copy DLLs I am going to use into a “lib” folder at the root of my solution)

Step 3


Add a reference to BOTH CookComputing.XmlRpcV2.dll AND JoeBlogs.dll

image

Include AlexJamesBrown.JoeBlogs in your class, with using / Imports:

C#

using AlexJamesBrown.JoeBlogs;

VB

Imports AlexJamesBrown.JoeBlogs

Step 4:

Instantiate a new Wrapper object.

So far, the available wrappers are:

MetaWeblogWrapper

WordPressWrapper

C#

WordPressWrapper wrapper = new WordPressWrapper(Url, Username, Password);

VB

Dim wrapper As New WordPressWrapper(Url, Username, Password)

Please note -

The above example has the Url, Username and Password strings omitted. Simply replace them with the relevant information.

Step 5

You can now take full advantage of all the methods on your instantiated wrapper.

C#

string Url = "www.alexjamesbrown.com";
string User = "MyUser"; //enter your username
string Password = "MyPassword"; //enter your password

var wp = new WordPressWrapper(Url, User, Password);

//a few test functions...
var userBlogs = wp.GetUserBlogs();
var tags = wp.GetTags();
var categories = wp.GetCategories();

var authors = wp.GetAuthors();
VN:F [1.8.2_1042]
Rating: 9.5/10 (6 votes cast)
VN:F [1.8.2_1042]
Rating: 0 (from 0 votes)
Tags: , , ,

Why Are Interfaces Useful?

July 6th, 2009 | No Comments | Posted in Development

Interfaces, usually prefixed by “I” are useful in software engineering, for a number of reasons.
Primarily, they allow you to create “pluggable” code.
By this, I mean that your code is easier to manage, easier to maintain, easier to change the way certain parts of your application work, without changing the entire way it works.

Lets look at an example.

Our application is an photo sharing web application, allowing users to view and upload photos.
The main functions of the site, are handled by our ImageManager class. This facilitates the retrieval, and storing of images. Fairly integral to the application.

As we are designing our application using SoC (Separation of Concerns), all our ImageManager class will do, is get, or put images. (in reality, we should really have a separate concern for each operation – get & put)
It doesn’t care about storing user details or meta data, against the image in a database, nor does it care about checking to see if a user can view that image or anything like that.
It purely puts, or gets, an image.

Now. this operation sounds simple, to get an image, I just need to connect to my file store, and retrieve my image?
Yes. But what if, one day, you need to be able to switch where you store your images.
For example..on day 1, you are storing your images on the file system, in a directory within your web application project.
This works fine, especially during beta testing, however as demand grows, the strain on your server and your bandwidth become a problem, and you need to change where images are stored.

You also want to be able to use a storage service, such as Amazon S3 to store your images.
(I’m not going to go into how S3 or any other service works in this article, it’s just an example.)

Luckily, we have a couple of ImageManagers….
FileSystemImageManager, and S3ImageManager

Both of which, implement our interface – IImageManager (notice the prefix "I”)

Here’s the interface:

C#

public interface IImageManager
{
  void PutImage(Image image, string fileName);
  Image GetImage(string fileName);
}

VB

Public Interface IImageManager
  Sub PutImage(ByVal image As Image, ByVal fileName As String)
  Function GetImage(ByVal fileName As String) As Image
End Interface

Note the empty method signatures…

Interfaces contain no logic – they are simply a contract that each implementation agrees to follow.

So lets have a look at an implementation of IImageManager:

C#

public class FileSystemImageManager : IImageManager
{
  public void PutImage(Image image, string fileName)
  {
    //code to save the image on the file system
  }

  public Image GetImage(string fileName)
  {
    //code to get the image from the file system
  }
}

VB

Public Class FileSystemImageManager
    Implements IImageManager
    Public Sub PutImage(ByVal image As Image, ByVal fileName As String)
        'code to save the image on the file system
    End Sub

    Public Function GetImage(ByVal fileName As String) As Image
        'code to get the image from the file system
    End Function
End Class

The FileSystemImageManager implements IImageManager (indicated by the : in c#)

note, in visual studio, you can right on your interface implementation declaration and select Implement Interface – this will create the required method signatures within your class.

Implement Interface

Our class now conforms to IImageManager.

But – there’s no code! That doesnt technically matter.

As long as you’ve implemented each method (even by throwing a NotImplementedException), your class will compile.

So what’s the point?

Well, we now have a FileSystemImageManager class, that (after you’ve added your code) gets and puts images on the file system.

In our application, we can do something like:

C#

      //get the image:
      IImageManager imageManager = new FileSystemImage();
      var image = imageManager.GetImage("my_filename");

VB

'get the image:
Dim imageManager As IImageManager = New FileSystemImage()
Dim image = imageManager.GetImage("my_filename")

“Great” you say….

But that means you can “swap out” your functionality, really easily.

Instead of declaring imageManager as a new FileSystemImage() we could have another class, that implements IImageManager called “FlickrImage”

This could then use Flickr to get and put images (obviously additional functionality would be required to authenticate against Flickr API)

I’ll expand this tutorial at a later stage to explain how to effectively use config, factory patterns, IoC etc…

VN:F [1.8.2_1042]
Rating: 0.0/10 (0 votes cast)
VN:F [1.8.2_1042]
Rating: 0 (from 0 votes)
Tags: , , ,