.Net ramblings
# Thursday, 28 June 2012
Windows Phone 7 update 7.10.8773.98 released for O2 Ireland

A long awaited Windows Phone 7 update has finally been released on the O2 network in Ireland. The main feature i'm looking for is Wifi tethering, to use the phone as a wifi hotspot. My data package with O2 includes a few Gb every month and it's handy to be able to use this for remote access on a laptop etc. My old Nokia E52 used to have a built-in modem that i could just plug in to the laptop and dial up, this feature is sadly missing from the Windows Phone 7 operating system. Currently i have to pull out the sim card and swap it in to a USB modem to plut in to the laptop. I used to use a wifi tethering app on the E52 called Joiku Spot but it had a remarkably ability to drain a battery in an hour that would typically last 8 days. Since getting the Lumia 800 i have joined the rest of the world of smartphone users who must charge up their phone every day, one step forwards two steps backwards. Well, i usually get 2 days so not as bad as the iphone :)

the first update Zune told me about was 7.10.8112.7, then it went through the update process again and installed 7.10.8773.98. after the update my phone reports firmware version 1600.2487.8107.12070. Disappointingly there is no sign of the Internet Sharing feature in Settings. but wait, apparently i can turn the phone face down to silence an incoming call, whup-de-doo. false alarm, not even that feature is included with this update.

According to the nokia software update availability page, O2 Ireland are still waiting for approval for the Lumia 800. but according to their blog post yesterday if i have the Tango update i should have all the new features. i guess this isn't Tango then, false alarm, in the words of the great Mr Myagi "patience daniel son"...


Thursday, 28 June 2012 11:37:43 (GMT Daylight Time, UTC+01:00)  #    Comments [0]  General

# Friday, 14 October 2011
Asus P6T deluxe v2 overclock settings with Intel i7 920
Found a safe/low-temp overclock @ 3.6Ghz for this board. Using 1600Mhz DDR3 RAM. standard air cooling in a z-machine GT1000 case.

RAM set to XMP profile #1. 8/8/8/24/1.66V/1.35v
BCLK:180
PCIE:100
Speedstep/turbotech:enable
RAM:~1450 Mhz
CPU Volt:1.25V
QPI/DRAM:1.35V
DRAM bus:1.66v

everything else auto/default
CPU Fan and chassis fan set to Standard profile.

44c @ idle. 66c under orthos CPU stress test.  The 1.25 CPU voltage keeps the temps nice and low, and it's very stable.  the 920 does this o'c with ease, could probably go lower but stability is more of a priority for a software dev PC.


Friday, 14 October 2011 13:42:08 (GMT Daylight Time, UTC+01:00)  #    Comments [0]  General

# Monday, 24 January 2011
Playing a DVD remotely from a network share
you can rip a DVD and then stream the file to a remote computer, or with VLC media player you can stream the DVD itself, but that takes a bit of setting up.  i wanted to pop a DVD into my desktop PC and then play it remotely from a netbook plugged in to the TV.  so i share out the DVD drive on the desktop, all well and good, i can see the VIDEO_TS and AUDIO_TS folders on the netbook, but there isn't an Autoplay option or any way to 'start' the DVD.  i found a useful tip from the VLC forums, you can drag the VIDEO_TS folder into VLC (on the netbook, for example) and then it will start playing the DVD, with full support for menus and chapters etc.  The bit i got stuck on was that you have to start the DVD for a few seconds on the host PC (desktop in my case) which authenticates the disc and allows it to be streamed. 

not very high tech, but handy, if you ever find yourself without a DVD player.


Monday, 24 January 2011 20:43:52 (GMT Standard Time, UTC+00:00)  #    Comments [0]  General

# Thursday, 17 June 2010
Nokia Ovi Suite Calendar Sync Cancelled error message
I have a nokia E52 and in general i'm very happy with the Nokia Ovi Suite software.  But today it refused to synchronise my calendar with a "Sync Cancelled" error message, other items synchronised fine.  The solution was to reset the nokia profile/files on my computer.  Make sure to close Outlook, Ovi Suite, and end the "nokiamserver.exe" process.  Then open up explorer and browse to C:\Users\Name\AppData\Local and C:\Users\Tim\AppData\Roaming.  You could delete these files, but just in case i renamed the "Nokia" and "Nokia Ovi Suite" folders to "xNokia" and "xNokia Ovi Suite".  If anything goes wrong you can always rename them back to their original names.
Then open up Ovi Suite again and reconnect the phone.  It should synchronise fine then, there must be some bug with the calendar synchronisation that can corrupt the local database.


Thursday, 17 June 2010 09:44:58 (GMT Daylight Time, UTC+01:00)  #    Comments [0]  General

# Wednesday, 10 December 2008
Outlook Macro to Remove Attachments
great outlook macro to strip attachments from selected emails, darin archer's blog



Wednesday, 10 December 2008 13:04:44 (GMT Standard Time, UTC+00:00)  #    Comments [0]  General

# Thursday, 01 May 2008
SonicWall Global VPN Client, Acquiring IP...
Trying to get SonicWall Global VPN Client working on vista, i kept getting stuck at "Acquring IP".  Adding the program to the windows firewall made no difference, nor did opening port 443 as has been suggested by others.  What did work was disabling IPv6 on the virtual adapter. 
Start->Control Panel->Network and Internet->Network and Sharing Center->Mange network connections page. Select SonicWALL Virtual Adapter and right click on properties.  Untick IPv6 and you should be good to go.  i didn't have to configure my router or anything to get this to work.

Update Sept 2008

Install the latest client from Sonicwall and this problem goes away, the virtual network adapter is automatically disabled when not in use.

Thursday, 01 May 2008 16:09:52 (GMT Daylight Time, UTC+01:00)  #    Comments [5]  General

# Tuesday, 08 April 2008
disable hibernation in vista
powercfg -h off
run this as an administrator from the command prompt.  thanks to Mitch Tulloch for his post.


Tuesday, 08 April 2008 16:27:37 (GMT Daylight Time, UTC+01:00)  #    Comments [0]  General

# Monday, 28 January 2008
Vista, CPU problems, explorer.exe, lsass.exe, SearchIndexer.exe
I was in the same boat as a lot of the folks on this MSDN forum thread.  Vista stability went out the window a few weeks ago.  mostly related to Search, but disabling the Search service only seemed to shift the problems to explorer.exe or lsass.exe.  installing SP1 RC1 refresh 2 seeemed to help but after rebuilding the index the same problems came back.  i found some useful info about lsass, and finally found a great solution by Aaron Tiensivu on his blog post about resetting a corrupt vista user profile. i didn't think it had anything to do with a corrupt profile, but the stuck-in-a-loop lsass.exe activity referencing the SamSs service made me try it out.  it did work, but after a day or two the explorer.exe CPU problems came back.  however, disabling Search has given me normal stability back, which is very welcome.  it's running smoothly so far. 

i guess Windows 7 isn't that far away really, hopefully MS will be more careful next time :)

Monday, 28 January 2008 14:27:41 (GMT Standard Time, UTC+00:00)  #    Comments [1]  General

# Thursday, 20 December 2007
GA-P35-DQ6 overclock settings
just posting my config here with a Gigabyte GA-P35-DQ6 motherboard
  • Processor: E6600 / 2.4Ghz Core Duo.
  • Ram: 4x512Mb Crucial Ballistix PC6500 4-4-4-12 @ 2.2v
  • Cooling: OCZ Vindicator
  • Disks: 74Gb 10k WD Raptor, 500Gb WD SATA 2, 1Tb WD MyBook eSATA.
My current stable overclock settings are as follows:
  • FSB 395 Mhz x9
  • Memory Multiplier 2.0
  • vCore 1.375
  • vFSB +.05
  • vMCH +.05
  • vDimm +.2
  • Memory timings: 5-5-5-18-auto-etc.
This results in a very happy 3.554 Ghz currently running @ 59 celsius under max load (orthos).  It could go a good bit higher but i don't want to be worrying about overheating problems long term since it is a work PC, and this represents about a 50% overclock which is great. 


I haven't tried pushing the memory yet but i'll try out the 4-4-4-12 @ 2.2v next.  Some earlier attempts at overclocking were foiled by bad memory settings, it was good advice i read to relax the memory settings before overclocking because it can cause stability problems that are not related to your FSB adjustments etc.

by the way, before i got these settings working, i was getting crazy temps like 79c with hardly any overclocking with this same setup. it all came down to not enough thermal paste. 

Thursday, 20 December 2007 23:08:55 (GMT Standard Time, UTC+00:00)  #    Comments [1]  General

# Wednesday, 28 November 2007
Format a FAT32 partition above 32Gb
Windows has a pointless 32Gb sizelimitation on FAT32 partitions.
a very sound chap called Tom Thornill wrote a partition formatting utility that does not have this limit. full details on his site


Wednesday, 28 November 2007 15:04:31 (GMT Standard Time, UTC+00:00)  #    Comments [0]  General | Windows Server

# Monday, 08 October 2007
Look After Your Eyes!
i went to the optician yesterday for an annual check up, i'm always a bit worried because i write code for most of the day and that's not very healthy for eyes etc etc.  i know you're supposed to take breaks every 15 mins or so but that's difficult to do in practice.
the test showed one of my eyes with a very slight deterioration which makes no difference really but still i found it quite alarming that i'm doing damage to my eyes, specially since you only get 2 for your whole life.  i dug out a program i wrote a few years ago to go 'ding' in the background every 10 minutes to remind you to take an eye break.  apparently relaxing your eyes on a distant object for a minute or two is a good idea etc.  i was going to post up my little exe file but then i went looking and found "TakeYourBreak" on download.com, it is a much better program!


Monday, 08 October 2007 15:44:00 (GMT Daylight Time, UTC+01:00)  #    Comments [0]  General

# Sunday, 15 July 2007
Migrating from Windows software RAID to Hardware RAID
i started a thread on the DELL community forums asking about migrating my windows 2003 software RAID setup to a hardware RAID controller, without reinstalling windows.  you can read the thread to get the context for these documented instructions below:

success. after a marathon 7 hour session in the datacenter it finally works. however the whole thing was much too stressful for my liking!

my problems were significantly compounded by the lack of a CD drive, so i had to get my imaging software (Terabyte Unlimited 'Image') to boot via a USB drive, which was never going to be easy with a Dell BIOS etc. although to be fair it does work, once you understand that you must reboot after configuring the BIOS to recognise the USB drive, and then go into the bios again and tell it what order to boot in.

i thought it useful to document the steps i took in case anyone else is in a similar situation.

in summary, i wanted to do an in-place migration from software raid in windows 2003 to hardware raid with the dell/adaptec CERC 6 channel SATA RAID card. all without using a CD drive (trust me, get one if you ever have to do this. i tried but couldn't get the BIOS to recognise the drive).

i got a very helpful email from Terabyte support before starting the migration:
****************************************
Hello,
If you just have a single simple volume (once the software RAID is broke), you can remove the dynamic drive by changing the file system ID back to 7 (via BootItNG partition work/properties). If you backup while dynamic, it will just backup the whole dynamic partition sector by sector.
So what I'd personally do is:
1. break the raid, (maybe remove the secondary drive as a backup)
2. ensure it's a single simple volume that's left (I'm assuming you just have c,
3. boot BootItNG, change the file system ID to 7,
4. boot back to windows (if it didn't boot, just put back the file system id to dynamic),
5. install the CERC drivers (if needed),
6. do the image, with byte-for-byte validation (slower in windows because it thrashes a bit),
7. ensure I can access the image to restore with Image For Dos or Image For Linux.
8. Configure the hardware RAID,
9. restore the image (use additional option of TA when restoring the boot partition).
*****************************************

windows software RAID requires dynamic disks, which are not officially reversible back to basic disks. this further complicated the process because i wanted to go back to basic disks for the RAID. you can convert back to a basic disk as described above with BootItNG, and also via the DskProbe windows support tool, instructions available from: http://www.nthelp.com/NT6/dynamic.htm. although i also read that if you use software raid, you shouldn't use this approach, so i unplugged the second drive, booted into windows and removed the mirror, and the offline disk from Windows Disk Manager. Then i changed to a basic disk via DskProbe and it did work, although DiskManager reported a single drive, which was marked offline or something very worrying like that. however the files were all there and working etc.

i followed the instructions above, although i did install the RAID card before changing any drivers or removing the software RAID, and i got windows to load up the drivers for it, so it would work automatically once booting from the RAID controller. this was one less problem in the equation and i was keen to get it out of the way as early in the process as possible.

to get Image For Dos to boot off USB, i used the bundled 'makedisk' utility without any init strings. I configured the BIOS to emulate a USB drive as a hard drive, floppy did not work. Then rebooted and changed the boot sequence so that the USB drive came first.
the disk image (of the 'active' drive, the other was still unplugged) took about 30 minutes with byte-for-byte validation, ~25Gb of data, copying to an external USB drive, using ImageForDos. i had to change the keyboard to a PS2 connection because in my first attempt the program locked out the keyboard after identifying the USB drive.

then i verified that i could access the image with the restore option. and went ahead with setting up a RAID mirror in the CERC configuration utility. plugged in both drives into ports 4 and 5. incidentally i needed a longer SATA cable for drive0 because it only had a 4inch cable and the RAID plugs on the card are miles away from the drive bays. The cable for the other drive fit with a stretch into the last port on the card.
so i did a reboot, pressed Ctrl-A etc. initialise the 2 drives. set up a RAID 1 mirror as per the manual instructions. i used the quick-init option because i was really in a hurry to get the job done. i set high priority also. i did not 'clear' the drives, but this may have been no harm to do.

then i rebooted and loaded my restore image with ImageForDos. the 'TA' option referred to in the instructions marks the partition active and inserts a standard MBR. it took about 30 minutes again and finished successfully. i was a bit worried because the restore program asked me which drive did i want to restore to, i assumed it didn't matter and chose the second drive. my cause for concern was that i wasn't sure if the controller would do it's mirroring thing during this restore operation. my fears were doubled when i rebooted after the restore, and got a message something like "no operating system, F1 to continue, F2 to setup". at this stage i had about 5 minutes before 'visiting hours' were over in the datacentre and i would have had to take the server home for the weekend to get it ready before monday 9am, no thanks! i thought it had failed. i was about to pack up and go home when i went in to look in the bios one last time in case i missed anything. i didn't change anything, and i also inspected the RAID config via the BIOS utility, but again, didn't change anything. i tried to turn off caching as a desperate attempt to fix the boot problems, but it wouldn't accept the change for some reason. anyhow, i rebooted again, said a quiet prayer, and i couldn't believe it but windows started loading, i was never so happy to see that Windows logo appear on screen (you probably had to be there to understand, 7 hours of white noise from being surrounded by a gzillian racks, no lunch, very frustrated etc!)

now all is well with the 2 drives showing up 'optimal' in the DELL/Adaptec storage manager. i gather this means that the build/verify has already completed in the background. the URL for the storage manager is http://tinyurl.com/2nddta

i didn't want to install all that dell 'management' software that came with the RAID card.
another good thing i forgot to mention. windows disk manager now shows a healthy primary partition for C:. it doesn't say 'fault tolerant' anymore obviously because the software raid is gone and the hardware RAID is abstracted away from the windows disk manager.

hope this helps someone someday.


Sunday, 15 July 2007 00:33:07 (GMT Daylight Time, UTC+01:00)  #    Comments [3]  General | Windows Server

# Thursday, 05 July 2007
Vista Driver problems, Formac USB Hard Drive
i just got a 160Gb Formac portable USB/firewire hard drive. I plugged it in to Vista and i get a message saying that Windows needs to install a driver to get it to work, i wasn't expecting this as i thought these drives did not need any drivers.  I let it check Windows Update but it found nothing.  I tried the firewire option but it was no different.  I contacted Formac tech support and got the following reply, which was actually very helpful:
"If a driver is required, then it is required for your USB, or FireWire interface inside your PC. External harddrives didn´t require special drivers, because they are ATAPI compatible."
I grabbed an old USB card reader which i know does not require any additional drivers, and i plugged it in.  I got 12 prompts to install drivers and each time it searched Windows Update and found nothing.  I took a guess at searching in c:\windows and it found them one by one.  I couldn't figure out why Windows would not search its own driver store automatically.  Apparently there is some bug with Vista where you can get a corrupt driver cache file and if you delete it then it will solve all these problems. 
The culprit file is called INFCACHE.1 and it's located in c:\windows\inf.  I discovered this on a newsgroup post.  This is the relevant part:

The solution to this annoying problem (I had it on one PC), seems to be to locate and delete the file INFCACHE.1, which may be corrupted and causing the problem. To delete this file, you will first have to modify its permissions so the users group can access it (right-click on the
file->Properties->Security). INFCACHE.1 file.  It's located at C:\Windows\inf (scroll down to the file). (Note: to see INFCACHE.1, you must set Windows Explorer to display hidden and system files)

When modify these system files, i usually find i have to take ownership first for my own user account, then add myself to the permissions with full control.  then you can delete it, or rename it to X_INFCACHE.1, etc.

I'm glad to say Vista is loading all my USB devices nicely now and the Formac drive works beautifully with USB and Firewire.


Thursday, 05 July 2007 10:18:30 (GMT Daylight Time, UTC+01:00)  #    Comments [32]  General

# Tuesday, 26 June 2007
Mounting ISO images in Vista
Just in case anyone was as stuck as i was today trying to virtually load an ISO image.  the Virtual CD Control Panel thing doesn't work in Vista, and for some reason VirtualCloneDrive wouldn't work for me either.
i eventually found a free tool called PowerISO which works great.  you can create several virtual drives and mount an ISO in each one.  i'm currently installing Orcas Beta 1 from an ISO mounted across the network, i wasn't sure if it could do that but it had no problems.


Tuesday, 26 June 2007 16:48:13 (GMT Daylight Time, UTC+01:00)  #    Comments [0]  .Net General | General

# Friday, 09 March 2007
Really simple and affordable web server monitoring
If you run a web server, chances are you have some form of automated monitoring system in place.  If you use MOM or another enterprise level thing then this post won't be of much relevance.  If, like me, you have simpler requirements, read on.

I have been caught out a few times with my web sites being down because Windows Server 2003 automatically installed an update and something went wrong and IIS got stopped, or like this morning at 4am, SQL 2005 SP2 failed to install and left the SQL Service offline.  i didn't find out till i got a phone call from a client.

My datacenter provide very good ping monitoring with SMS alerts etc., but this is not a complete solution because the web site may have a configuration error, and it will still respond to pings.  similarly, you can't just check for an OK HTTP status code because your error ASPX page may not be configured to send an error HTTP status code.

I have used various online web site monitoring services, with varying degrees of success / satisfaction.  My current provider are InternetVista.com and for €70 a year i get a 10 minute check for a single HTTP site, with a keyword match on the contents of the page, and an email/sms alert if the match is not found.  You can pay for extra and more frequent checks, but €70 is as much as i think the service is worth.  To have this level of checking done on 10 sites would cost a lot, so to save a few quid i wrote a very simple aspx page that does a series of tests on all the resources i want to verify on the server, e.g. SQL Server, MS Access, IIS web sites.  The aspx code is listed below, i wrote it inline rather than compiled/dll because it is easier to deploy in an existing web site without any risk of any side effects (dll collisions), it should be straight forward to understand for a c# programmer.  let me know if you have questions.  It runs in a few miliseconds on my server so i'm not worried about polling all these resources every 10 mins.



Run_Server_Tests.aspx code:
<%@ Page Language="C#" %>
<%@ Import Namespace="System.Collections" %>
<%@ Import Namespace="System.Collections.Generic" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.OleDb" %>
<%@ Import Namespace="System.Data.SqlClient" %>
<%@ Import Namespace="System.Net" %>

<script RunAt="server">

/* Server Monitoring Script:
* - test SQL databases by running an sql string against an SQL connection string
* - test Access databases by running an sql string against a JET connection string
* - test web sites by Regex matching a search string against the contents of a HttpWebRequest
*/

enum TestType {Sql_Server, Ms_Access, Http_Request } // different types of supported requests

/// <summary>
/// Container class to represent a 'test' object for a resource on the server.
/// </summary>
class TestObject
{
public TestType Type; // e.g. Sql_Server.
public string TestString; // e.g. connection string for a database. or URI for http request.
public string TestParam; // e.g. sql string for a database. or search string for a http request.

public TestObject(TestType type, string testString, string testParam)
{
this.Type = type;
this.TestString = testString;
this.TestParam = testParam;
}
}

void Page_Load(object sender, EventArgs e)
{
List<TestObject> tests = new List<TestObject>();

tests.Add(new TestObject(TestType.Sql_Server, @"Data Source=.\SQLEXPRESS;Initial Catalog=DB1;Integrated Security=True", "select top 10 * from Table1"));
tests.Add(new TestObject(TestType.Sql_Server, @"Data Source=.\SQLEXPRESS;Initial Catalog=DB2;Integrated Security=True", "select top 10 * from Table1"));
tests.Add(new TestObject(TestType.Sql_Server, @"Data Source=.\SQLEXPRESS;Initial Catalog=DB3;Integrated Security=True", "select top 10 * from Table1"));
tests.Add(new TestObject(TestType.Sql_Server, @"Data Source=.\SQLEXPRESS;Initial Catalog=DB4;Integrated Security=True", "select top 10 * from Table1"));

tests.Add(new TestObject(TestType.Ms_Access, @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\Inetpub\Database\DB5.mdb;Persist Security Info=True", "select top 10 * from Table1"));
tests.Add(new TestObject(TestType.Ms_Access, @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\Inetpub\Database\DB6.mdb;Persist Security Info=True", "select top 10 * from Table1"));

tests.Add(new TestObject(TestType.Http_Request, "http://mysite1.ie/", "Site 1"));
tests.Add(new TestObject(TestType.Http_Request, "http://mysite2.ie/", "Site 2"));
tests.Add(new TestObject(TestType.Http_Request, "https://mysite3.ie/", "Site 3"));
tests.Add(new TestObject(TestType.Http_Request, "https://mysite4.ie/", "Site 4"));
tests.Add(new TestObject(TestType.Http_Request, "https://mysite5.ie/", "Site 5"));

int numCompleted = 0;
int numFailed = 0;

// write the HTML header. (a result is flushed to the client after each test finishes.)
Flush(@"
<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN' 'http://www.w3.org/TR/html4/loose.dtd'>
<html>
<head>
<title>Server Test</title>
<meta name='ROBOTS' content='NOINDEX,NOFOLLOW'>
<link rel='stylesheet' type='text/css' href='ServerTestStyles.css' />
</head>
<body>");

foreach(TestObject test in tests)
{
try
{
switch(test.Type)
{
case TestType.Sql_Server:
runQuerySql(test.TestParam, test.TestString);
break;
case TestType.Ms_Access:
runQueryOleDb(test.TestParam, test.TestString);
break;
case TestType.Http_Request:
string pageContents = new WebClient().DownloadString(test.TestString);
if(!Regex.IsMatch(pageContents, test.TestParam, RegexOptions.IgnoreCase))
throw new Exception("Search string not found: " + test.TestParam);
break;
default:
throw new Exception("Test type not handled " + test.Type);
}
Flush(String.Format("<span class='pass'>Pass</span> &nbsp; <span class='type'>{0}</span> &nbsp; {1} <hr />", test.Type, test.TestString));
numCompleted++;
}
catch(Exception ex)
{
Flush(String.Format("<span class='fail'>Fail</span> &nbsp; {1} <span class='type'>{0}</span><BR><span class='error'>{2}</span><hr />", test.Type, test.TestString, ex.Message));
numFailed++;
}
}
if(numFailed > 0)
Flush(String.Format("<h1>{0} errors occured</h1>", numFailed));
else
Flush(String.Format("<h1>All Good!</h1>", numFailed)); // if you use this page with an automated monitoring service, look for "All Good" in the page contents. otherwise an error occured
Flush("</body></html>");
}

/// <summary>
/// Method to run an sql string against an sql database
/// </summary>
public static DataSet runQuerySql(string sql, string connString)
{
SqlConnection conn = new SqlConnection(connString);
DataSet ds = new DataSet();
SqlDataAdapter dba = new SqlDataAdapter();
SqlCommand cmd = new SqlCommand(sql, conn);

try
{
dba.SelectCommand = cmd;
dba.Fill(ds, "Table");
return (ds);
}
catch(Exception e)
{
throw e;
}
finally
{
cmd.Connection.Close();
conn.Close();
}
}

/// <summary>
/// Method to run an sql string against an Access database
/// </summary>
public static DataSet runQueryOleDb(string sql, string connString)
{
OleDbConnection conn = new OleDbConnection(connString);
DataSet ds = new DataSet();
OleDbDataAdapter dba = new OleDbDataAdapter();
OleDbCommand cmd = new OleDbCommand(sql, conn);

try
{
dba.SelectCommand = cmd;
dba.Fill(ds, "Table");
return (ds);
}
catch(Exception e)
{
throw e;
}
finally
{
cmd.Connection.Close();
conn.Close();
}
}

/// <summary>
/// Flush output to the browser (useful to indicate which tests are causing any delay)
/// </summary>
/// <param name="output"></param>
private void Flush(string output)
{
Response.Write(output);
Response.Flush();
}

</script>

ServerTestStyles.css:  (just to make the output more legible)

body
{
font-size: 90%;
font-family: Calibri, Helvetica, Sans-Serif;
padding: .5em;
}

hr
{
color: #87ceeb;
background-color: #87ceeb;
margin: .3em 0 .3em 0;
padding: 0;
height: 1px;
}

.pass
{
color: Blue;
font-weight: bold;
}
.fail
{
color: Red;
font-weight: bold;
}
.type
{
color: purple;
font-weight: bold;
}
.error
{
color: Red;
font-size: small;
}

I have configured the test in InternetVista to search for "All Good" in the url for the test page.  If this isn't present, i'll get an SMS/email alert and i can go and see what exactly is wrong.  It should be fairly easy to add other test types if you have different resources you need to check on.
Enjoy.


Friday, 09 March 2007 17:43:24 (GMT Standard Time, UTC+00:00)  #    Comments [3]  .Net General | Asp.Net | Database | General

# Thursday, 01 March 2007
Problem with protected files on Micro SD card from Nokia 6233
i bought a 2gb SD card to replace the 64Mb one that came with my nokia 6233.  since the applications and games are stored on the 64mb card, i tried to copy them across to the new card, using my harddrive to help with the transfer.  problem is some of the JAR files are protected and cannot be read from the disk, i tried running as admin, xcopy, but access denied every time.  eventually i found Winimage which can create a 'virtual hard drive' from any disk (Micro SD in this case) and can then extract the files to the hard drive, bypassing the protection.  i then copied the files to the 2gb card keeping an identical folder structure.  seems to work nicely so far.


Thursday, 01 March 2007 13:42:02 (GMT Standard Time, UTC+00:00)  #    Comments [1]  General

# Sunday, 18 February 2007
VSS: listing deleted files
my Visual Source Safe database had grown very large and i couldn't see why.  digging around in the aaaaaaamb.a files revealed an episode of robin-hood that had accidentally been checked in to VSS.  the thing was i had deleted it through VS but it hadn't been purged from VSS.  with the VSS graphical interface, you can right-click any folder and it will tell you in the deleted items tab if there are any deleted (but not yet purged) items.  however this is very time-consuming.
thanks to a post on a newsgroup, i discovered the command line interface, which has an option to list deleted files, and you can then purge them. you still have to scan through the output, which is presented in a very crude way to say the least.  if there are deleted files, you would think it should just list them.  but no, it lists every directory and says 'no items found under ...' after it, which makes for a lot of noise when you are trying to scan for directories that actually contain deleted files. 
anway, here's the commands:

set SSDIR=C:\Data\VSS                                        ** the folder containing of your srcsafe.ini file **
cd "C:\Program Files\Microsoft Visual SourceSafe\"
ss dir -R -D $/*.*


Sunday, 18 February 2007 11:42:07 (GMT Standard Time, UTC+00:00)  #    Comments [0]  .Net General | General

# Friday, 05 January 2007
Code 39 error on DVD drive in Vista...
all of a sudden my dvd drive stopped working, and i couldn't figure out why.  there was no drive listed in explorer and the device was not working, code 39.  i eventually found this ms kb article that gets you to delete 2 registry settings to fix the problem.  they said it could be caused by installing Easy CD Creator.  i tried to uninstall AsusDVD and that may have done it.  in any case, it works now.


Friday, 05 January 2007 17:27:30 (GMT Standard Time, UTC+00:00)  #    Comments [1]  General

# Tuesday, 19 December 2006
Global hotkeys with Windows Media Player / Vista
WMP 11 isn't so bad, but the big criticism of WMP all along is that it doesn't support global hot keys like winamp does.
enter "WMP Keys" from sourceforge.  It runs like a champ and does the job, using Ctrl-Alt-Right Arrow for next track, Left for previous track etc.  you need to register the plugin dll, and when i ran it from the command prompt first of all, it didn't succeed.  you need to register it with admin privilege, to do this right click the command prompt in the start menu and run it as administrator. 


Tuesday, 19 December 2006 12:29:37 (GMT Standard Time, UTC+00:00)  #    Comments [4]  General

# Friday, 08 September 2006
Handy Excel Tip to Show Duplicate Entries
http://office.microsoft.com/en-us/assistance/HA011366161033.aspx


Friday, 08 September 2006 14:42:58 (GMT Daylight Time, UTC+01:00)  #    Comments [0]  General

# Wednesday, 16 August 2006
Global country list
i took this off Wikipedia and trimmed it down to plain text for a database.  just posting it here for reference:

You may be more interested in the ISO official list of countries and their 2-digit codes.

Abkhazia
Afghanistan
SBA Akrotiri and Dhekelia
Åland
Albania
Algeria
American Samoa
Andorra
Angola
Anguilla
Antigua and Barbuda
Argentina
Armenia
Aruba
Saint Helena Ascension Island
Australia
Austria
Azerbaijan
The Bahamas
Bahrain
Bangladesh
Barbados
Belarus
Belgium
Belize
Benin
Bermuda
Bhutan
Bolivia
Bosnia and Herzegovina
Botswana
Brazil
Brunei
Bulgaria
Burkina Faso
Burundi
Cambodia
Cameroon
Canada
Cape Verde
Cayman Islands
Central African Republic
Chad
Chile
China
Christmas Island
Cocos (Keeling) Islands
Colombia
Comoros
Congo
Cook Islands
Costa Rica
Côte d'Ivoire
Croatia
Cuba
Cyprus
Czech Republic
Denmark
Djibouti
Dominica
Dominican
Ecuador
Egypt
El Salvador
Equatorial
Eritrea
Estonia
Ethiopia
Falkland
Faroe Islands
Fiji
Finland
France
French Polynesia
Gabon
Gambia
Georgia
Germany
Ghana
Gibraltar
Greece
Greenland
Grenada
Guam
Guatemala
Guernsey
Guinea
Guinea-Bissau
Guyana
Haiti
Honduras
Hong Kong
Hungary
Iceland
India
Indonesia
Iran
Iraq
Ireland
Isle of Man
Israel
Italy
Jamaica
Japan
Jersey
Jordan
Kazakhstan
Kenya
Kiribati
North Korea
South Korea
Kosovo
Kuwait
Kyrgyzstan
Laos
Latvia
Lebanon
Lesotho
Liberia
Libya
Liechtenstein
Lithuania
Luxembourg
Macau
Macedonia
Madagascar
Malawi
Malaysia
Maldives
Mali
Malta
Marshall Islands
Mauritania
Mauritius
Mayotte
Mexico
Micronesia
Moldova
Monaco
Mongolia
Montenegro
Montserrat
Morocco
Mozambique
Myanmar
Nagorno-Karabakh
Namibia
Nauru
Nepal
Netherlands
Netherlands Antilles
New Caledonia
New Zealand
Nicaragua
Niger
Nigeria
Niue
Norfolk Island
Northern Cyprus
Northern Mariana Islands
Norway
Oman
Pakistan
Palau
Palestinian
Panama
Papua New Guinea
Paraguay
Peru
Philippines
Pitcairn Islands
Poland
Portugal
Pridnestrovian Moldavian Republic
Puerto Rico
Qatar
Romania
Russia
Rwanda
Saint Helena
Saint Kitts and Nevis
Saint Lucia
Saint Pierre and Miquelon
Saint Vincent and the Grenadines
Samoa
San Marino
São Tomé and Príncipe
Saudi Arabia
Senegal
Serbia
Seychelles
Sierra Leone
Singapore
Slovakia
Slovenia
Solomon Islands
Somalia
Somaliland
South Africa
South Ossetia
Spain
Sri Lanka
Sudan
Suriname
Svalbard
Swaziland
Sweden
Switzerland
Syria
Tajikistan
Tanzania
Thailand
East Timor
Togo
Tokelau
Tonga
Trinidad and Tobago
Tristan da Cunha
Tunisia
Turkey
Turkmenistan
Turks and Caicos Islands
Tuvalu
Uganda
Ukraine
United Arab Emirates
United Kingdom
United States
Uruguay
Uzbekistan
Vanuatu
Vatican City
Venezuela
Vietnam
Virgin Islands (British)
Virgin Islands (United States)
Wallis and Futuna
Western Sahara
Yemen
Zambia
Zimbabwe


Wednesday, 16 August 2006 16:39:04 (GMT Daylight Time, UTC+01:00)  #    Comments [5]  .Net General | Asp.Net | General

# Sunday, 05 March 2006
The Microsoft Origami Project and back to hand-writing
Screenshot of origami hand-held (probably)For anyone who hasn't heard the buzz about Microsoft's Origami Project, take a look at this vido file to get a glimpse of what it is probably about.  the video is a year old but i reckon it's a fairly accurate preview of the real thing.  the thing that really struck me about the video was that people were writing hand-written notes to each other, in emails, messages etc.  What a bizarre idea.  Yeah we've had PDA's without keyboards for a long time, but they only ever had a very small user base, because of the need to learn a new form of writing that the palmtop could understand. traditional touch screen hand-writing technology is woefully slow to right messages of any length on.   if the Origami device becomes mainstream, which i think it probably will, then it is quite a departure from the way we interact with computers since they were invented. 

personally i do so much typing and so little hand-writing that i tend to think about pen + paper as an old thing i left behind many years ago.  But... when you stop to think about it, emails and 'typed' communications lose a huge amount of personality compared with traditional hand-writing.  You can't identify the writer of an email based on the style of writing, like you can with a hand-written letter from someone you know well.  emails are usually so limited in expression that we have created a whole new culture of emoticons to bridge the gap, but it's hard not to come across as cheesy and immature when you write things like :-)  :O)   :^) etc...

Screenshot of origami hand-held (probably)We've all got very good at typing, because computers understand fixed characters much better than squiggles of writing.  Typed content is also more efficient in terms of storage size, and search capabilitiy.  You still can't meaningfully scan a JPEG of a hand-written letter and be sure to get all the words out of it.  But it looks like that is the way Microsoft are headed.  It is really a massive shift if this takes off, because the modern computer experience is built around typed content.  The internet would be nothing if we had to wade through volumes of illedgible hand writing before we found the information we wanted.  Obviously this is looking at the extremes, and we'll always have typed content with us, but to me it seems like this is the first mainstream introduction of mixed text content arriving on our desktops, from the pen and the keyboard. 

In the grand scheme of things, i actually think typed content will be a blip on the radar of the way we record text information.  For thousands of years we've been writing things down, and i can't think of any good idea for why that should all be thrown out the window, except technology limitations.  It looks like Microsoft are challenging those limitations.

Sunday, 05 March 2006 12:44:07 (GMT Standard Time, UTC+00:00)  #    Comments [0]  General

# Thursday, 19 January 2006
The best free zip / compression software: 7-zip
i gave up using winzip a long time ago because it is way too 'naggy' in terms of making you register. 
windows 2000/XP has its own built-in 'send to > compressed folder' option when you right-click a file or rolder.  but the windows zip software is pretty rubbishy.  it takes forever to set or remove passwords on archives, or to simply delete a small file from an archive can take 20 seconds. 

by far the best zip software i have used is called 7-zip and you can download it for free at http://www.7-zip.org
it is lightning fast, and although the custom zip format '7z' does not appear to be anything great, especially because its not compatible with other zip software, set the program to use normal 'zip' by default and it works great. 


Thursday, 19 January 2006 11:57:28 (GMT Standard Time, UTC+00:00)  #    Comments [0]  General

# Wednesday, 04 January 2006
PROBLEM: Firefox clipboard not working sometimes
Note: i still don't know a work around for this problem.  The post below seems to help somewhat, but does not solve the problem completely.

Tom Keating wrote a very good description of Firefox's dodgy clipboard functionality on this blog post.  More correctly, it is a problem with Microsoft Office locking the clipboard and preventing other applications using it.  I found that by closing all Office applications, the firefox copy/paste problem went away temporarily.  I did some more testing and remembered that after i installed Office 2003, i hid the annoying Office Clipboard and stopped it popping up every time i copied something.  I suspected that it was still running in the background, interfering with other applications like Firefox. The way to turn it off completely is to open up Word, Edit > Office Clipboard.  Click on the options button at the bottom, and untick all the menu options.

This has minimised the problem a lot for me, it doesn't bother me much anymore.  However Tom wrote back to say he still gets the problem. 


Wednesday, 04 January 2006 17:45:32 (GMT Standard Time, UTC+00:00)  #    Comments [5]  General

# Sunday, 11 December 2005
How Not to Develop Software

Usability quote of the day

i'm doing some contract work developing a content management system for a software/design company, and the boss doesn't think it's a good idea to involve the client at all in the process, basically they want a localizable CMS with built-in publishing / approval process, and they are going to be given something along those lines (which i'm hired to develop) and be told how to use it.  That's about as far as the communication goes with the client.  this is bad enough, but yesterday there was a certain design decision we had to make that would seriously affect the client and how they can use the system, and i suggested asking the client for their opinion...

"  oh jeez no!  "

this was the response from the boss of this un-named company, "don't talk to them until the thing is finished ".  i had to hold back the laughter at such a dim view of developing software.  i have a distinct feeling the client would like it done differently but what can you do!  i should buy this guy a ticket to a jakob nielsen conference on usability...


Sunday, 11 December 2005 16:28:44 (GMT Standard Time, UTC+00:00)  #    Comments [1]  General

# Friday, 09 December 2005
Micrsoft Word: System Call Failure
I laughed out loud when this message popped up, typical of Microsoft - the inventor of useful error messages. 
i was in outlook, using word as the email editor, and it wouldn't save draft or send the message at all.  i had to kill the winword and outlook processes and restart outlook. luckily it let me copy/paste into notepad so i didn't lose anything.

no idea what caused it.


Friday, 09 December 2005 19:31:13 (GMT Standard Time, UTC+00:00)  #    Comments [0]  General

# Friday, 19 August 2005
Tortilla Española: the real deal

Ever since i went to Malaga in Southern Spain 10 years ago, i have tried and failed to reproduce the authentic taste of the amazing "Tortilla Española", the Spanish Omelette.  I remember paying about a euro for a large tortilla that would be perfectly acceptable to eat for breakfast, lunch or (and!) dinner.
fortunately, i came across a recipe online today that i am posting here for future reference.  although i am fairly handy with the old omelettes in general, this was a real find, in particular the discovery that you fry the potatoes in lots of olive oil, which makes them go soft and gives a lovely soft texture to the whole tortilla.
You can see it on it's original location here, i'm only copying it here in case that url ever disappears or goes down.

Spanish TortillaServes four as a main course; twelve as a tapa.

  • 1 and 3/4 cups vegetable oil for frying (or plain olive oil)
  • about 5 medium-sized potatoes, peeled
  • 2 tsp. coarse salt
  • 2 or 3 medium-sized onions, diced
  • 5 medium cloves garlic, very coarsely chopped
  • 6 large eggs
  • 1/8 tsp. freshly ground black pepper

In a 10 or 11 inch non-stick skillet (should be at least 2 inches deep), heat the oil on medium high. While the oil is heating, slice the potatoes thinly, about 1/8 inch. Transfer to a bowl and sprinkle on the 2 tsp. of salt, tossing to distribute it well.

When the oil is very hot (a potato slice will sizzle vigorously around the edges without browning), gently slip the potatoes into the oil with a skimmer or slotted spoon. Fry the potatoes, turning occasionally (trying not to break them) and adjusting the heat so they sizzle but don't crisp or brown. Set a sieve over a bowl or else line a plate with paper towels. When the potatoes are tender, after 10 to 12 min., transfer them with the skimmer to the sieve or lined plate.

Add the onions and garlic to the pan. Fry, stirring occasionally, until the onions are very soft and translucent but not browned (you might need to lower the heat), 7 to 9 min. Remove the pan from the heat and, using the skimmer, transfer the onions and garlic to the sieve or plate with the potatoes. Drain the oil from the skillet, reserving at least 1 Tbs. (strain the rest and reserve to use again, if you like) and wipe out the pan with a paper towel so it's clean. Scrape out any stuck-on bits, if necessary.

In a large bowl, beat the eggs, 1/4 tsp. salt, and the pepper with a fork until blended. Add the drained potatoes, onions, and garlic and mix gently to combine with the egg, trying not to break the potatoes (some will anyway).

Heat the skillet on medium high. Add the 1 Tbs. reserved oil. Let the pan and oil get very hot (important so the eggs don't stick), and then pour in the potato and egg mixture, spreading it evenly. Cook for 1 min. and then lower the heat to medium low, cooking until the eggs are completely set at the edges, halfway set in the center, and the tortilla easily slips around in the pan when you give it a shake, 8 to 10 min. You may need to nudge the tortilla loose with a knife or spatula. (I found i had to turn it down very low to keep it from burning)


Set a flat, rimless plate that's at least as wide as the skillet upside down over the pan. Lift the skillet off the burner and, with one hand against the plate and the other holding the skillet's handle, invert the skillet so the tortilla lands on the plate (it should fall right out). Set the pan back on the heat and slide the tortilla into it, using the skimmer to push any stray potatoes back in under the eggs as the tortilla slides off the plate. Once the tortilla is back in the pan, tuck the edges in and under itself (to neaten the sides). Cook until a skewer inserted into the center comes out clean, hot, and with no uncooked egg on it, another 5 to 6 min.

Transfer the tortilla to a serving platter and let cool at least 10 min. Serve warm, at room temperature, or slightly cool. Cut into wedges or small squares, sticking a toothpick in each square if serving as an appetizer.

If the idea of cold tortilla doesn't get you going, you should try it, it might surprise you like it did me.  I didn't even like eggs when i got hooked on tortillas :)

Many thanks and all credits to Sarah Jay for sharing this great recipe.
By the way, it's incredibly filling because of all that oil, so eat about half as much as you'd think, then wait a while to see how you get on!  no wonder the spaniards have so many siestas, eating tortilla all the time would knock anyone out.


Friday, 19 August 2005 16:34:36 (GMT Daylight Time, UTC+01:00)  #    Comments [2]  General

HowTo: Clear a stuck print job in Windows

MS Word crashed in the middle of a print job, and the document was stuck in the print queue, not obeying commands to delete or cancel it, even after reboots.
To fix this, i opened c:\windows\system32\spool\PRINTERS and deleted all the files there.  If the files are locked and won't delete, stop the Print Spooler service first and then delete the files.
This worked for me!

Friday, 19 August 2005 13:41:49 (GMT Daylight Time, UTC+01:00)  #    Comments [1]  General | Windows Server

# Tuesday, 02 August 2005
How to properly use the javascript string replace function

i've seen a ton of different approaches to people using the javascript string function, including some homemade versions. 

the javascript replace function uses regular expressions, so it doesn't work like the C# or VB functions.  (i hoped it would)

what is also unusual for c# programmers is that the pattern you pass into the function does not get wrapped in quotes.

example: to replace all single-quotes in a string variable (called s) with the ` character:

s = s.replace(/'/gi, '`');

if that looks like gobbledegook i'll explain. the first / character starts the pattern, and the ' character is what we want to replace. the second / character ends the pattern and allows us to include options for the regex parser. g means global and i means ignore case.

i'm really only posting this so i'll remember it myself!


Tuesday, 02 August 2005 13:43:45 (GMT Daylight Time, UTC+01:00)  #    Comments [1]  General

# Saturday, 22 January 2005
Howto: Disable windows automatically adding network printers and faxes

i am configuring my new web server, and i noticed that the event log keeps getting 5 or 6 system warning events about printers getting added or deleted. since i pay close attention to my log, and have no print requirements on the web server, those print logs are clutter. i noticed that windows kept adding in printers that are available on my network, even after i deleted them. after hunting around online, i found that microsoft humbly admit that the feature to automatically add network printers may be undesirable, which it is in my case. at least they let you turn it off.

Open windows explorer, Tools > Folder Options > View > Advanced Settings > turn off "Automatically search for network folders and printers", its the first option in the list.

http://support.microsoft.com/?kbid=320138

The KB article says it only applies to XP but it applies to windows server 2003 also.


Saturday, 22 January 2005 22:28:46 (GMT Standard Time, UTC+00:00)  #    Comments [2]  General | Windows Server

# Monday, 17 January 2005
[FIX] Network bridge with Wireless + Wired connections is slow

Many thanks to James Crossley for his post on google which saved me a lot of bother.

"I have a wired network and an ad-hoc wireless network bridged on a Windows XP machine, which is also connected to broadband. The wired side ran fine but the wireless side ran very slowly (around 500kbps).
It ran at full speed when out of the bridge. The fix for this was:

  1. Run cmd (start, run, type cmd)
  2. type : "netsh bridge show adapter". Check which number is your wireless adpater.
  3. type : "netsh bridge set adapter x forcecompatmode=enable", where x is the number of your wireless adapter.

After I ran this, the network ran at full speed in the bridge."

This worked for me too.  both interfaces are running at normal speeds.


Monday, 17 January 2005 12:33:11 (GMT Standard Time, UTC+00:00)  #    Comments [2]  General | Windows Server

# Friday, 23 July 2004
Outlook 2003 blocking attachments, kb fix didn't work

someone sent me a .mdb attachment today and i couldn't open it in outlook. no amount of searching the options could change this behaviour. i searched online and found a few microsoft kb articles about it, and how to change the registry to add exemptions to the 'Level 1' list of file extensions, which outlook regards as unsafe.  i did all the steps in the article but it still didn't work.  then i found this GREAT outlook plug in which adds a tab to the outlook options and allows you to configure how outlook handles all the attachments.

http://www.slovaktech.com/attachmentoptions.htm

How on earth MS forgot about this is beyond me.  they actually suggest that you ask the person who sent it to rename the file with a bogus extension and resend the attachment.  surely it is sufficient to force users to save the file to disk and then open it themselves by choice.  sheesh!


Friday, 23 July 2004 17:51:56 (GMT Daylight Time, UTC+01:00)  #    Comments [0]  General

# Monday, 31 May 2004
Installing Windows XP on a Shuttle ST61G4 with SATA hard disk (no floppy drive)

This is my first post on my new PC, a Shuttle ST61G4.  3Ghz P4, 1Gb ddr 400 ram, 160Gb SATA hard disk.  It feels like a small miracle that it's working, that's how difficult it was for me to install Windows XP on the SATA hard disk.  

Partly it was due to me never having used SATA before, and not realising that Windows XP doesn't bundle the SATA drivers I need for the Silican SATA Controller (Si3112r) that is part of the Shuttle mainboard.  Also, the most annoying part was that Windows setup only allows you to specify additional drivers from a floppy disk.  The shuttle, being a modern compact PC, doesn't come with a floppy of course, so i was stumped.  I really didn't want to pull out the old floppy drive from my other PC, but i was forced to in the end. 

There is a way to slipstream the drivers into the Windows setup files and then burn them back to a CD, but this sounded way too complicated for me. 

The CD with the shuttle mainboard drivers had instructions for how to create the required floppy for a Windows install, and this worked OK, when i finally figured out how to get the Shuttle to recognise the floppy drive.  It took a while to find the plug in the motherboard for the floppy, at the back around the side under the power supply.  Then i had to enable Floppy Disk 1 in the bios as a 1.44mb drive.  Still didn't work, so i enabled Boot up Floppy Seek.  Still didn't work, and i finally found out that another setting 'FDC Controller' was disabled, which i needed to enable.  Then the floppy drive worked, and it went without hitch from there on in.  you also need to enable the Raid controller in the bios. 

When the computer boots, the SATA controller part still says "Drive 1542311Mb - Drive not found" or something, although this doesn't seem to matter since windows is able to recognise it. 

I found all this out the hard way, and i looked for a long time online to find an easier way of doing it, or clear instructions detailing every step necessary, and i found a FAQ page on shuttle.com (afterwards!) which details the process very well, its a shame it was so hard to find through the shuttle web site. 

But my shuttle is fast and very lovely, and it is the quietest thing i have never heard. I can't figure out why they make you press the reset button with a pen though, its so tiny.  In the end, i love it.  


Monday, 31 May 2004 00:20:44 (GMT Daylight Time, UTC+01:00)  #    Comments [2]  General

# Saturday, 17 April 2004
Use a HOSTS file to block banner ads

You can use the HOSTS file in Windows to prevent banners from displaying in web pages.  It is usually in c:\windows\system32\drivers\etc. Note that it has no file extension. There are a few good sample files online that contain thousands of known advertisers.  I use http://everythingisnt.com/Hosts as a reference.  If that link is down, use my mirror copy (29 k).  The way it works is by redirecting the url (e.g. ad.doubleclick.net) to your own computer, instead of the proper doubleclick.net server.  Your local web server (if you have one) won't contain any of banner images or pages requested and you see a 404 page not found in the browser in place of the banner image / web page.


Saturday, 17 April 2004 17:53:23 (GMT Daylight Time, UTC+01:00)  #    Comments [1]  General

# Thursday, 01 April 2004
Working around DVD install problems. Use Xcopy instead...

when i was building my computer, i got a cheap DVD drive, and i'm paying for it now with trouble installing any of the software that came on DVDs with my MSDN subscription.  I tried installing Windows Server 2003 from the DVD by booting straight from the CD but it failed at different stages, saying file not found, or corrupted files etc.  I'm convinced its because of the quality of the dvd drive.  To be safe, I now copy all the files to the hard drive and then install from there.  Even copying the files to the harddisk through Windows was not trivial as ms point out in http://support.microsoft.com/default.aspx?scid=kb;en-us;Q318945, they recommend using the xcopy command to verify that the files are copied correctly. The copy speed with xcopy was several times faster than using windows explorer, I have no idea why, but i always do it that way now. The syntax is:

xcopy <source> <destination> /V /H /Y /E

e.g. (from the command prompt. Start > Run > cmd.exe)
xcopy E:\VS2003\ C:\Local\VS2003 /V /H /Y /E

The switches mean:
/V = verify
/H = hidden files
/E = sub folder including empty folders
/Y = suppresses prompting to overwrite


Thursday, 01 April 2004 15:25:50 (GMT Daylight Time, UTC+01:00)  #    Comments [0]  General

# Friday, 26 March 2004
Micorosft Empower Program, the motivation behind it...

My application to join the MS Empower Program for ISVs was accepted this week.  The first thing I did was go straight to the MSDN download section and drool over all the software now available to me to download.  (Shame I'm on 56k... oh eircom get your act together and deliver broadband soon, it's not like I live in the sticks or anything <moan moan>)

For a €375 subscription fee I get the equivalent of €30k worth of software, of which I will realisitically only use a few thousands worth, but still, how bad.  There are a few costs associated with it, like a software verification test, digital ID from Verisign etc. but it's still a great deal, and actually the cheapest way for me to start using Visual Studio 2003 architect. 

I sat today wondering why MS are acting so desperate to get ISVs like me to write software for .Net in particular.  Then it struck me... (a rare moment of mental clarity), and I remembered back to what a man was saying at a Longhorn conference I was at earlier in the year.  He said that Windows Longhorn will run with 2 kernels, one for Win32 apps and a new kernel for apps written in .Net, i.e. managed code.  This is obviously great for backwards compatibility, with the advantages being given to new applications with the new kernel.  BUT... what if .Net apps don't become mainstream for 5 or more years?!  the new kernel will be more or less unused and we might as well be running a souped up XP pro instead.  Avalon, the new user interface, will also only work with .Net apps (.Net 2.0 at that), and other apps will look the same as XP.  It is no wonder MS are not giving a solid release date for Longhorn, since I reckon it depends on the take-up of .Net software.  If it is great, they will push to release longhorn early to give users the advantages of running .Net apps on a managed operating system.  But if it is slow, they will throw more and more resources to the developers and software companies in programs like Empower for ISVs until the knock-on effect of that is to put a whole lot more .Net software in to the marketplace until .Net becomes the standard. 

Here we are 2 or 3 years into the launch of .Net and most people around here still think it's bleeding edge technology if they have heard of it all.  (Yes there is a modern side to Ireland, but a lot of it is still running Windows 95, that's the reality of the environment we are building software for).

Something about knowing that my apps will one day execute in a managed Kernel in Longhorn really gets me going :) but i think it might be longer than MS think before it becomes the norm.


Friday, 26 March 2004 23:57:16 (GMT Standard Time, UTC+00:00)  #    Comments [3]  General

# Saturday, 13 March 2004
Howto: configure a Psion Series 5 for internet access with a Nokia 6610 (GPRS)

This took ages to figure out, and plenty of experimenting with different settings, so hopefully this might save someone else the hastle of having to spend half a day to get their Psion 5 (not MX) connected to the net with a Nokia 6610.  I would say it would work with similar settings on other GPRS phones.

The internet settings are for the O2 network in Ireland and will need adjustments for a different network.

  1. install Psion Series 5 Message Suite version 1.52.
  2. Create a new modem called nokia 6610:
     speed 57600
     connection infrared
     fax class auto,
     init string: ATZ
     flow control: hardware (RTS/CTS)
  3. Create new Internet Service called GPRS with the following settings.
     
     connection type: dialup
     uncheck smart dialing
     standard dial-up number: *99#
     manual login unchecked
     username gprs 
     password gprs
     addresses: get IP from server. get dns address from server unchecked.
     primary dns address: 62.40.32.33
     secondary dns address: 62.40.32.34
     login: use login script checked. default 8 bit no partity 1 stop bit,
     delete all content of login script text box, leave blank.
     advanced: enable PPP extensions checked. allow plain text authentication checked.  
  4. On the psion, set Remote Link to Infrared 57600.
  5. Get the GPRS settings for your phone from your network. O2 will send those details to your phone if you request it from http://www1.o2.ie/CM/getcontent/0,1177,txt_html_OTA_Home,00.html. Save these details to your phone.
  6. Activate Infrared on the phone. Connectivity > Infrared.
  7. Point the Infrared port of the phone thin black band on top of phone) to the Infrared port on the psion (1cm band on back of psion) a few inches away.

Saturday, 13 March 2004 23:10:23 (GMT Standard Time, UTC+00:00)  #    Comments [0]  General

Introduction...

Hi, welcome to my blog.  This is where I will post solutions to problems I encounter while writing software for the .Net platform, in the hope that they may be of some use to people trawling google for an answer to the same problem.  I realise that I wouldn't be half the developer I am today if it weren't for the likes of Charles Carroll's aspNG community, GotDotNet, ms newsgroups, asp.net, windowsforms.com, to name but a few.  I have drawn on these resources for advice and technical assistance many times and this is my way of returning some of that generosity to the community at large, (as well as a space for me to rant about stuff and things).

a little about me
I've been developing in .Net since Beta 2 in 2001 and I write in C#.  I did my undergrad in University of Limerick in Computer Systems, and now I am self employed, doing contracts, training courses, developing software, etc. in Limerick, Ireland.

Flying Simon's Super-10 kite at CastleGregory, Ireland 2002Outside work, I like surfing, table-tennis, flying big kites, cooking and other stuff, so from time to time, you may see the odd post that is nothing to do with .Net...


Saturday, 13 March 2004 19:12:01 (GMT Standard Time, UTC+00:00)  #    Comments [3]  General