Having successfully implemented OAuth in a recent project I thought I would blog about my experience in getting everything configured.
So, why bother with this post? Well, I spend most of time working within Visual Studio so whenever I think about creating a new GUID I automatically think Continue reading
I’ve recently been working on an application which has to make use of data from within two databases (one onsite and one remote) with SQL generated to query the two databases along the lines of:
SELECT a.*, b.* FROM [TableA] a INNER JOIN [DatabaseB].[SchemaB].[TableB] b ON a.ID = b.ID
Referencing the second database using its full name is annoying to type but also limiting. Imagine if you were working on a couple of projects, each of which used the same version DatabaseA, but which needed to reference different versions of DatabaseB. If you were developing each of these databases in SQL Server you’d have to call the second version of DatabaseB something different which would end up breaking your SQL as it specifically references DatabaseB by name. Continue reading
From time to time you may want to change the source of an image based on a user’s interaction with your web form.
Below is a simple way of achieving this result using jQuery:
To start with I’ve created an image tag. Continue reading
A question I’m asked from time to time is why and when should I use a using statement within my code.
For me, using statements are all about convenience. They provide a nice simple way of ensuring that I am using IDisposable objects correctly, plus I also like tidy code. What’s an IDisposable object? It’s an object which implementes the IDisposable interface, which from a coding perspective means that you have access to a .Dispose() method Continue reading
DNS lookups. Generally a pain and difficult to do in .Net. The built in Dns class from the System.Net namespace provides a nice way of resolving an IP address or host name via its GetHostEntry() method but if you want to delve a little further into the DNS record then you’re screwed.