September 30th, 2005
In anyones daily life as programmer you often find yourself staring at a “connection refused” or a “host not reachable” and when ping.exe doesn’t give you enough clues, you need some proper tools:
dns stuff : here you check name servers (obviously) but with a twist. you can see responses from the root servers, trace route, whois and more. Its sister site, dns report, checks your dns and warns about problems.
dsl reports : When your wireless router loses its connection randomly you go to the forums of dsl report. Here you can find answers to the most bizarre networking problems. They also have a tcp/ip online test that checks things like RWin, MTU and suggests ways to tweak your network connection, www.dslreports.com/tweaks.
I might also mention tptest. It measures your network speed to various Swedish servers. I just got 800 kbit/s up and 18.5 Mbit/s down using tcp. Yeay!
Posted in General | No Comments »
September 30th, 2005
Here’s a trailer for those of us who enjoy cosy family movies…
Posted in General | No Comments »
September 30th, 2005
Recently, when doing some contract coding for adeqvat.se a site selling online valuations of Swedish companies, I ran into the need of adding entries to the event log.
In this project we’re using dot net 2.0 and I remembered that the clr has built-in eventlog classes but since I didn’t remember the exact syntax I do what you do nowadays: I googled. And sure enough, I found many articles and posting that showed precisely how to do it.
The only problem being that none of them actually worked…
All the examples I found started by programmatically adding the event source and then writing the actual entry. In order to do this in Windowx XP SP2 and Windows Server 2003 you need to be an administrator. Or at least have a very specific right that only administrators have. (There’s an impressingly complex way of adding this right to any user found at microsoft support). Since asp.net usually doesn’t run as an admin we have a problem.
So, while I was contemplating the suggested procedure I stumbled across a posting that stated the obvious: since it’s only the actual creation of the event source that requires admin-rights, you create the event source at installation time, as an admin, and then an ordinary user account can add entries to the event log.
The proper solution is to create a key in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Application\ . The key’s name being the event source’s. And thats all that’s needed. It is useful though, to add an “expandable string value”, REG_EXPAND_SZ, with the value: “%SYSTEMROOT%\Microsoft.NET\Framework\[framework version goes here]\EventLogMessages.dll”. This prevents the annoying “a description for this event can’t be found etc”.
Export this as a .reg-file and you have an easy setup.
Posted in General | No Comments »