Opera 10 Alpha last night prompted me to automatically update, and lo and behold it installed the Beta 1.
The most noticeable change is the default skin, which is lighter and more consistent, using some new etching effects and icons everywhere. More changes are on the horizon for this for Beta 2, from the skin designer John Hicks.
A cool new enhancement is you can drag down the tab bar to get thumbnails for all the tabs, known as Visual Tabs:

There’s now an interface to customize the Speed Dial (rather than manually editing ini files)
Opera Turbo, the Opera proxy service that offers compression of web pages (suitable for low-bandwidth connections) is built in and can be switched on or off or set to auto mode (turning itself on if it detects you’re on a slow internet connection). I have tested this out while I’m on 64kbps, and it’s ok but it’s probably not worth it unless Opera have some New Zealand or Australia proxies. I suspect it would work great in Europe.
Tags: beta, internet, opera, opera 10, web browser
I’ve been writing some unit tests recently that test some multi-threaded functionality.
Typically this involves hooking up some event handlers then waiting for some asynchronous code to fire the event before proceeding with the unit test and assertions.
The ManualResetEvent class (MSDN) seems a good choice for this, and this post has a small example of using it in a unit test:
[Test()] public void AfterRunAsync() { ManualResetEvent manualEvent = new ManualResetEvent(false); TestTestCase tc = new TestTestCase(1, "", 0, 0); bool eventFired = false; tc.RunCompleted += delegate(object sender, AsyncCompletedEventArgs e) { Assert.IsInstanceOfType(typeof (TestTestCase), sender, "sender is TestCase"); bool passed = tc.Passed; string output = tc.Output; eventFired = true; manualEvent.Set(); }; tc.RunAsync(); manualEvent.WaitOne(500, false); Assert.IsTrue(eventFired, "RunCompleted fired"); }
Tags: .net, asynchronous, c#, events, mstest, nunit, threading, unit test
This details how you can debug an application running on a remote machine from Visual Studio on your local machine, as if the remote application was running on your local machine.
The keys are:
You have several options for launching the Remote Debugger.
It’s a good idea to run this as a Windows application as recommended by the Visual Studio 2008 Remote Debugger Configuration Wizard (and in my opinion easier to troubleshoot).
At this point if you’re not logged in as the new user you created, you might want to do that now so that you can run the Remote Debugger under them.
Once you’ve followed instructions for installing, run the remote debugger if it isn’t already by going to Start > Programs > Microsoft Visual Studio 2008 > Visual Studio Tools > Visual Studio 2008 Remote Debugger.
It should say that it’s running an instance similar to DebugUser@RemoteMachineName
Tags: .net, attach, debug, domain, local, machine, remote, remote debugger, remote debugging, visual studio, vs
The IPFilter Updater application now has its own page: http://www.davidmoore.info/ipfilter-updater/
uTorrent is one of the most popular BitTorrent clients out there. In my opinion it’s the best.
You can set up IP filtering in uTorrent to block bad seeds and peers from a list maintained by the community.
I’ve written a simple program that will download the ipfilter.dat from SourceForge and copy it into the file where uTorrent expects it.
Download uTorrent IPFilter Updater [ Requires .NET 3.5 ]
UPDATED 26 Jan 2010: Now requires .NET 3.5, and allows mirror selection
- Extract the files to a folder, and run IPFilter.UI.exe
- Wait for it to download the mirrors, select the one you want, and click Go
- Once the file has downloaded and extracted, you can close the window
Enhancements
Done:
- Download and extract zip file to speed up the download time and minimize the download usage
- Allow selection of mirror you want to use
To Do:
- Automation through command-line arguments, for scheduled tasks
Source Code: http://github.com/DavidMoore/IP-Filter-Updater/
You have two options:
Looking in the Log should show a message similar to “Loaded ipfilter.dat xxxxxx entries)”
Because IP ranges and addresses change often, it’s a good idea to update your filter list often too.
Tags: .net, bittorrent, bt, ipfilter, ipfilter.dat, ipfilterupdater, torrent, utorrent
In some of the work I’m doing right now, I’m manipulating an assembly after compile time – having it disassembled into IL, tweaked, then re-compiled back into an assembly.
The assembly is signed and what is being done to the assembly is breaking the strong name. This is quite comforting to know; the strong name wouldn’t be so strong if it was that easy to hack an assembly with a strong name.
When trying to load the hacked assembly, I am getting an exception (FileLoadException in this case but I’m guessing this may differ depending on your assembly load method) with the message “Could not load file or assembly ‘MyAssemblyName’ or one of its dependencies. Strong name validation failed.”.
The first interesting thing here is that the assembly named in the error message isn’t the hacked assembly; the hacked assembly is one of MyAssemblyName’s dependencies and is what’s triggering the error.
Make sure that you check the dependencies of the assembly named in the exception message when troubleshooting. The problem may be with one of the dependencies.
In my case the exception isn’t a surprise because of what’s being done to the assembly. But until I resolve that, how can I get around this for now?
You can exclude an assembly from strong name validation for development purposes using the Microsoft (R) .NET Framework Strong Name Utility tool aka sn.exe:
"%ProgramFiles%\Microsoft SDKs\Windows\v6.0A\bin\sn.exe" -Vr "C:\Path\To\Assembly.dll"
Make sure you change the sn.exe path depending on which version of the .NET Framework SDK you have installed. If you’re having trouble, get into the ”%ProgramFiles%\Microsoft SDKs\Windows” dir and search for sn.exe, and use the newest one you can find.
You might find it handy to add this as a Post-build event command-line for your project from within Visual Studio in Project Properties > Build Events:
"%ProgramFiles%\Microsoft SDKs\Windows\v6.0A\bin\sn.exe" -Vr "$(TargetPath)"
So how do you switch the strong name validation back on for your assembly?
Use the -Vu switch:
"%ProgramFiles%\Microsoft SDKs\Windows\v6.0A\bin\sn.exe" -Vu "C:\Path\To\Assembly.dll"
Tags: .net, assembly, c#, exception, failed, sn, sn.exe, strong name, validation
Opera has built-in torrent support which is very handy and nice, but not quite as nice as a full-fledged client like uTorrent
To disable the Torrent support in Opera so that uTorrent or your default torrent client will be used instead:
You won’t have to restart Opera for this change to take effect
Tags: bittorrent, disable, opera, torrent, turn off, utorrent
Tags: flip, gym, swiss ball
Here’s the article I followed to create my bootable USB flash drive when installing Windows 7 – something that’s essential when you don’t have a floppy drive or an optical drive in your machine.
http://kmwoley.com/blog/?p=345
To make the process even simpler, you can use WinRAR or an ISO-mounting or reading application to get the installation files and boot sector from the Windows 7 RC1 ISO image without needing to burn a DVD.
Tags: boot, bootable, bootsect, diskpart, flash drive, mount, mountable, rc1, usb, windows 7
If you have several applications that are using NLog, it can be a good idea to install NLog into the GAC and reference that.
A gotcha you must watch out for is caused by this piece of configuration from the NLog site:
<configuration>
<configSections>
<section name="nlog" type="NLog.Config.ConfigSectionHandler, NLog"/>
</configSections>
<nlog>
</nlog>
</configuration>
Because you are not using the strong name for the Assembly-qualified name of ConfigSectionHandler, it’s impossible to do a GAC lookup, therefore NLog won’t be found and you’ll get an application error (even if NLog is actually in the GAC).
This means your application will throw an exception when the configuration is loaded; there will be no NLog.dll in your application folder and it can’t check the GAC as it doesn’t have the strong name of the assembly you want.
You can fix this by including the strong name:
<section name="nlog" type="NLog.Config.ConfigSectionHandler, NLog, Version=1.0.0.505, Culture=neutral, PublicKeyToken=5120e14c03d0593c" />
Tags: .net, assembly, c#, config, ConfigSectionHandler, gac, global assembly cache, NLog