Ramblings of an IT Consultant

Archive for the ‘Microsoft’ Category

Dates: Why are they so tricky?

In asp.net, Microsoft, Technology on November 14, 2010 at 1:19 pm

We all have problems with dates in our lives.  We have all forgotten someones birthday or an anniversary, some of us may have had some disastrous first dates or even a blind date!

Today another instance where a simple date got the better of me.  I was doing some work in Access and I just couldn’t get between dates to work.  This is an issue I always seem to have with most query languages I use.  SQL Server makes the issue even more tricky at times.  I am pleased to say it does not look like I am the only one who suffers with dates.  Google has hundreds of articles about date related issues so it can’t just be me.

Does anyone else struggle with dates?  The best date I ever went on was my first date with the current Mrs G!


The problem with browsers

In Microsoft on November 1, 2010 at 6:26 pm

Today I have had a very frustrating day.  As a web developer I am responsible for making sure that a website will display correctly in all current and some historic browsers.

If you are sitting there and wondering what the big fuss is about, I can tell you it’s no simple task.  I usually test using Firefox, Safari and Internet Explorer.  However one of these browsers always gives me grief.  If you was thinking anything other than Microsoft’s Internet Explorer you would be very mistaken.

You see Firefox and Safari adhere to all of the rules, they just don’t tolerate sloppy website code.  Internet Explorer is the opposite and seems to thrive on bad web development.  Imagine my surprise today when I had to find a workaround to make one of Microsoft’s own browser components.  Shockingly it would not work in Internet Explorer 8 and 9, but would in both Firefox and Safari.  Now I know version 9 is a beta release but you would  think even as a beta, it would be better than version 8.  If only this was the case!

Lets hope Microsoft’s upcoming release of IE9 Is a big improvement!

ASP.NET 301 Redirect in VB

In Google, Microsoft, PageRank, SEO on October 22, 2010 at 10:05 am

I have been recently been moving a complete website to a new domain and the client asked what will happen to all of the broken links in Google.  They were quite concerned that their page rank would drop due to the massive changes.  Simple I said a 301 redirect and an update to the sitemap will help.

There is a way you can do this from within the web.config or even java script, but for this site decided to create 301 code in the page init event.

Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init
Response.Status = “301 Moved Permanently”
Response.AddHeader(“Location”, “http://www.gallagherit.co.uk”)
End Sub

I made sure that all of the old pages were redirected to their matching new page and following a quick update of the sitemap to remove the broken links and away we went.  I used XML-Sitemaps.com to generate my sitemaps which is free if your website is less than 500 pages in size.

The good thing about 301 redirects is that it keeps Google happy and we all like to keep Google happy dont we?

Internet Terror Threat!

In BBC, Microsoft, Technology, War on Terror on October 20, 2010 at 7:40 pm

So its been plastered all over the news that the UK will be hit by hackers in a new terror threat.  On Radio 2 yesterday they were discussing if this was possible and its effect on the UK and its banking and energy systems.

I think we are already being terrorised by Microsoft!  They sell and promote software that can be hacked and always needs updating.  All we need is another virus like the one we had a few years ago.  That virus restarted thousands of computers across the world anytime they connected to the internet!

Now imagine that virus but a lot more powerful.  Maybe with the capability to destroy the boot sector of a pc then the world’s computer systems could be in deep trouble!  Just think there could be a Microsoft vuneriability out there already just waiting to be exploited.

Just a thought!