Please click this logo to help me get on their beta program:

Xobni outlook add-in for your inbox








26/10/2006

VPNs in Vista - yes, and OneCare again

Filed under: General — Oliver Sturm @ 2:35 pm - 1 year, 9 months ago

So I installed two of the three VPNs I need on my Vista machine.

First: isn’t there a proper UI somewhere to connect to networks? I hate that stupid “Connect to a network” window… The UI is horrible. I have to scroll up and down like crazy to get past the list of available wireless networks alone, while each of the entries takes up far too much place. Sure, I can switch over to “Dial-up and VPN”, but that setting isn’t remembered, so I have to switch over again each time I open the window. Right, did I mention that window closes on me all the time? Created a new connection? The window is gone. Connected to a network? Window gone again. Getting the window back needs two clicks on the tiny system tray icon and the context menu entry, plus a search through the stupid list. I want my normal “network connections” window from XP back! Maybe that’s not intuitive to the weekend Windows user, but I don’t care.
Update: I found it – the old network connections window is still available, only not as easy or intuitive to get to as it previously was. Doesn’t change anything about that peculiarity described under “Fourth” below…

Second, Installing VPNs… has anybody ever actually used that “Use gateway on remote network” option? Apart from switching it off, I mean? How about setting a useful default there? Instead they have changed the default for “include Windows logon domain”, which took me a while to notice. It has to be switched off, probably in most cases, but now it’s switched on by default.

Third, OneCare. Of course I wasn’t able to establish a connection with any of my VPNs without switching off the OneCare firewall. No noticification, nothing, it just doesn’t work. Wait, there’s the “analyze connection trouble” link… shoot, doesn’t find any reason. In fact it says everything’s great – right after informing me that the connection failed to be established.

The good news is that the “Firewall connection tool” manages to activate VPN connections through the OneCare firewall. For some reason, the button to run that tool was inactive in the options dialog for a while, but now it’s active again and setting that check box is really easy, provided you guess that you have to.

Fourth, what’s that crap with the Network and Sharing Center? Let’s call my two VPNs VPN1 and VPN2 for a moment. So I connected to VPN1. After a moment, I window came up asking me what that network was – Home, Work or Public, IIRC, and what the name was. Okay, I said it was Work and it was called VPN1. Great, so far. Then I killed that connection again and connected to VPN2 instead. Sat there and waited for the window to come up… nothing. Back into the “Connect to network” window – yes, it’s connected alright. Well. Then I noticed that in the context menu of the tray icon, sub menu Disconnect from, it said VPN1 instead of VPN2. Huh? Opened Network and Sharing Center and there it was: I’m connected to VPN1, Connection: VPN2. Huh? What? Plus, my private network classification from VPN1 had also carried over to VPN2, making this not only a usability thing but also a security issue.

I don’t see the point in the Network and Sharing Center, as far as network connections are concerned. It displays incomprehensible information and it offers no way of configuring the networks. In fact it (or the functionality behind it, rather) seems to be dangerous… in case anybody has something enlightening to say about this, please go ahead.

ANN: OneCare has automated Windows Mobile connectivity killer

Filed under: General — Oliver Sturm @ 1:55 pm - 1 year, 9 months ago

I have previously written about the fact that OneCare killed the connectivity with my Windows Mobile device. Now I got a OneCare update installed yesterday (I think it was yesterday) (oh yes, and I *loved* that “OneCare is going to reboot your system in 4 hours” dialog… WTF? What if wasn’t there over the weekend or something? Can you spell “loss of data”, Microsoft?) and so I thought today I’d just try whether the issue had maybe been fixed. Previously I had just disabled the firewall while on my secured home network and synced my phone – not nice, but it worked.

Now read this message carefully:

Onecare-changed-firewall

Wow! Ain’t that peculiarfantastic! So not they’ve done it: I can’t use my Windows Mobile device with my computer because of my firewall, and when I switch off the firewall and connect the device, the firewall automatically reactivates to protect me from the device! Let me repeat that: Wow!

So, the good news is that there’s an option “Automatically change my Firewall protection level when I connect to an unsecured network”. But this was already there in the previous version of OneCare, without the same effect… so obviously they changed something about the Windows Mobile connectivity thing, just not the right thing. Plus, I don’t really want to turn off that option, it’s a good option… oh, f#*k it.

(5 minutes later) Even with that option switched off, I still can’t make my phone connect… it used to work only a few days ago, so I wonder if there’s still something in the way, even though the firewall is now switched off (and stays switched off). Guess I’ll have to fiddle around, reboot, that kind of thing, to be sure – I’ll do that later.

Update: I have now rebooted and tried again, and as long as the firewall and the option are switched off, I can now connect and synchronize my phone again. Magic.

There are currently at least two bug reports on Microsoft’s Connect site: here and here. As is often the case, there doesn’t seem to be any reaction to these issues though. One of the things I hate about beta software from MS, I must admit: there’s never any direct contact with the responsible people.

25/10/2006

(Open)Pandora rocks

Filed under: General — Oliver Sturm @ 2:17 pm - 1 year, 9 months ago

Some will probably say I’ve been under a rock, but I hadn’t heard of this before. jk pointed me to OpenPandora today and so I had a look at the underlying Pandora service and I totally love it!

On a different note, I wouldn’t be surprised if that OpenPandora project had some problems coming, as it gets rid of all the ad sponsoring that the free service normally brings.

Definitely worth a look if you like listening to music on your computer. And they also interface with the Squeezebox

24/10/2006

WCF: Transport level security makes service hang on Open()

Filed under: General, Programming, .NET — Oliver Sturm @ 5:39 pm - 1 year, 9 months ago

A weird thing… I was working on a WCF sample program today and I was creating my ServiceHost instance from code, like this:

  Uri baseAddress = new Uri("net.tcp://localhost:7465/");
	
  singleton = new HelloWorldClassServerProxy(new HelloWorldClass());
  ServiceHost serviceHost = new ServiceHost(singleton, baseAddress);
	
  Binding binding = new NetTcpBinding( );
  serviceHost.AddServiceEndpoint(typeof(IHelloWorldContract), binding, "HelloWorld");
	
  serviceHost.Open( );

The code I was testing worked just fine, but every time the Open() call on the ServiceHost instance was executed, it took about 12 seconds. I used WCF tracing and I found out that an ActiveDirectoryOperationException exception was being thrown (but handled) with the message “Current security context is not associated with an Active Directory domain or forest.” That message is definitely correct, and some reflectoring revealed that the method Domain.GetCurrentDomain() throws this exception on my system, after waiting those 12 seconds for something unknown to happen. Seems correct, in a way, because my system is not part of a domain – funny though that I can observer the exact same behaviour on a different computer that is in an Active Directory domain. No idea what’s going on there, really.

Anyway, after I had found out that I had the same problem with or without a domain, I thought there had to be a code path through that Open() call that wouldn’t arrive at that same exception. A bit difficult to find though, because while WCF tracing logs that exception, it doesn’t include the complete stack trace, so I didn’t know exactly how I ended up in there. So I started playing with the various details of my connection setup. Exchanging my binding for a WSHttpBinding didn’t make any difference, but instantiating the NetTcpBinding with an explicit SecurityMode.None parameter finally got rid of the problem!

Apparently, the default constructor on NetTcpBinding uses SecurityMode.Transport, and when I pass that in explicitely, the problem is back. I have still no idea why something as seemingly harmless as activating transport level security triggers this rather bad behaviour on my systems, but I’ll just go for SecurityMode.None for the time being…

19/10/2006

Finalizing a DVD with Nero 7

Filed under: General — Oliver Sturm @ 8:20 pm - 1 year, 9 months ago

Wow, it’s read-the-forums day for me today. I burnt an ISO image on a DVD, and for some reason apparently I forgot to finalize the disc…

Let me mention this right here: I’m one of those people who use their DVD burner sporadically, and I manage easily to forget every time about details like finalizaton – am I supposed to do it? Shouldn’t the disc be usable if I don’t do? I know I can leave it open if I want to add something, but that doesn’t make sense if the disc is then not usable, does it? Well well… I just don’t care enough to be able to remember next time, I know that now already.

Anyway, when I wanted to read the disc in Vista, it wasn’t prepared to do that, but rather wanted to create a new file system on the disc all the time. So I hunted around Nero trying to find the menu entry to finalize a disc, which isn’t there – why not? Oh well… I finally found these instructions, which work just fine, although they appear to be for an older version of Nero. Pretty intuitive once you know how it works, but regarding CDs and DVDs I’m one of those people who theoretically know what multi-session is all about, but who’ve pratically never once done anything with it. I’m sure I’ll forget again next time, and I hope I’ll remember reading my blog to find out what the problem is :-)

Getting my DVD burner back

Filed under: General — Oliver Sturm @ 7:36 pm - 1 year, 9 months ago

Suddenly today I noticed that my DVD drive/burner was no longer available to me. In Device Manager the device was shown, but Windows had a problem: “Windows cannot load the device driver for this hardware. The driver may be corrupted or missing. (Code 39)”

Uninstalling and re-installing the device didn’t help, in fact the driver installation process ended with status “failed”. So I looked around and I got lucky to find this forum post, which actually solved the problem (even without a reboot on Vista RC1). Amazing.

As I never trust these forum people to leave the URL intact forever, I’m copying the text of that post here, if only for my personal help if that should ever happen to me again :-)

I had a similar error, and the problem also showed on on the ‘virtual drives’ with the error in the device manager. I know that the drives work fine, and the virtual drives being messed up further proves it is some type of driver error. I uninstalled the drives.. rebooted, reinstalled the drivers, rebooted and still have the same error message.. EXCEPT the error code is 41, not 39.

While reformatting and reinstalling windows would probably fix the problem, it would be a lot easier to just fix this problem without going through migration of the settings for each user to the new installation, and installing the 50 GB worth of programs installed on the system. (and imagine activating a lot of them over again also (eg Adobe CS2, Acrobat 7, Install Shield 11, etc…)

To fix this problem, I performed the following:

Start Registry Editor (Start, Run and type in regedit then click)

Find “UpperFilters” and “LowerFilters” (and “UpperFilters.bak” “LowerFilters.bak”, if they exist) value under the following key in the registry, and delete it:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E965-E325-11CE-BFC1-08002BE10318}

Quit Registry Editor.

Reboot.

NOTE: You might need to reinstall any CD recording apps you have, if they start to not work completely, after doing this.

18/10/2006

Using Delphi to develop for Vista

Filed under: General, Programming — Oliver Sturm @ 2:40 pm - 1 year, 9 months ago

Not normally something I post about these days, but Delphi is something I used to use a lot… what’s more, Developer Express as a company is obviously still very much involved in the Delphi market. So I found this article very interesting, which details a lot of the things you’ll want to know when targeting Vista from your (non-.NET) Delphi applications. Written by Nathanial Woolls, I should add – very good work!

Making Outlook open “bad” attachments

Filed under: General — Oliver Sturm @ 8:53 am - 1 year, 9 months ago

I forget about this every time and have to search the net again for the info: since Outlook 2000 there have been certain file types that can’t be opened or saved by default when they arrive attached to an email. If such attachments are encountered, Outlook shows the following message: “Outlook blocked access to the following potentially unsafe attachments”.

Everything you need to know to change this is on this Microsoft KB page, and it even works with Outlook 2007.

14/10/2006

Firefox 2.0 RC - the thing with the tabs

Filed under: General — Oliver Sturm @ 12:20 pm - 1 year, 9 months ago

Two things I don’t really like about Firefox 2.0 RC: the tabs each have a close button now, and when I open a large number of them in one window, I need to scroll right and left to see them all (sure, I can also use that tab list menu, but that’s yet another metaphor for working with tabs). I understand the reasoning behind these new features, but I just don’t like them – sometimes I want to close a bunch of tabs at the same time, and now I need to hunt for each of the close buttons with the mouse instead of just clicking ten times in one location. I’ve started using Ctrl+F4 instead, which works, but it solves a problem I wouldn’t even be having were it not for this change.

The scrolling tabs thing is similar – I see that tabs used to get extremely narrow after a while, but I’d rather have that than having to scroll to see them all. In general, if new features like this are introduced that change existing behaviour, why is there no option to switch them on and off? Developers have to understand that users get attached to a specific behaviour of an application, and that it’s not a good idea to just take it away.

That said, there is actually an option for the close button placement, only it’s not in the options dialog. If you want it, navigate to the URL about:config, enter “tab” in the filter field and look for an option called browser.tabs.closeButtons. The default is 1, which shows a close button on every tab. As far as I could see, it’s possible to set this to 0 (only a close button on the currently active tab) and 2 (only one close button to the far right, like it used to be). For some reason, there doesn’t seem to be a combination option for a close button on the right plus one per tab – I would have liked that, I think.

There doesn’t appear to be an option to switch off the tab scrolling, though… there are some that sound promising (tabMinWidth? tabClipWidth?), but I don’t see that they do anything useful in this regard. If you have an idea, please let me know.

13/10/2006

Drawing a selection rubber band, take 3

Filed under: General, Programming, .NET — Oliver Sturm @ 7:22 pm - 1 year, 9 months ago

In two previous posts (here and here) I have previously posted about how to draw rubber band selection rectangles similar to what Explorer does. Now a reader contacted me by email and asked for an extension: he wants to have a reverse selection, similar to this picture:

So, no problem of course :-) I started out from the improved version of the first demo and made a few changes – all you have to do is replace the SelectionPanel.OnPaint() method with this:

  protected override void OnPaint(PaintEventArgs e) {
    ColorMatrix colorMatrix = new ColorMatrix(new float[][] {
      new float[] {1.0f, 0.0f, 0.0f, 0.0f, 0.0f},
      new float[] {0.0f, 1.0f, 0.0f, 0.0f, 0.0f},
      new float[] {0.0f, 0.0f, 1.0f, 0.0f, 0.0f},
      new float[] {0.0f, 0.0f, 0.0f, 0.3f, 0.0f},
      new float[] {0.0f, 0.0f, 0.0f, 0.0f, 1.0f}
    });
	
    ImageAttributes imageAttributes = new ImageAttributes( );
    imageAttributes.SetColorMatrix(colorMatrix, ColorMatrixFlag.Default, ColorAdjustType.Bitmap);
    Point[] destPoints = new Point[] {
      new Point(ClientRectangle.Left, ClientRectangle.Top),
      new Point(ClientRectangle.Right, ClientRectangle.Top),
      new Point(ClientRectangle.Left, ClientRectangle.Bottom)
    };
    e.Graphics.DrawImage(backgroundBitmap, destPoints, usableRect, GraphicsUnit.Pixel, imageAttributes);
	
    if (mouseDownPos != Point.Empty) {
      Point mousePos = PointToClient(MousePosition);
      Rectangle selectedRect = new Rectangle(
        Math.Min(mouseDownPos.X, mousePos.X),
        Math.Min(mouseDownPos.Y, mousePos.Y),
        Math.Abs(mousePos.X - mouseDownPos.X),
        Math.Abs(mousePos.Y - mouseDownPos.Y));
	
      Point srcRectLocation = selectedRect.Location;
      srcRectLocation.Offset(usableRect.Location);
      Rectangle srcRect = new Rectangle(srcRectLocation, selectedRect.Size);
      e.Graphics.DrawImage(backgroundBitmap, selectedRect, srcRect, GraphicsUnit.Pixel);
	
      using (Pen pen = new Pen(Color.Black)) {
        pen.DashPattern = new float[] { 2f, 2f };
        int thirdOfHeight = selectedRect.Height / 3;
        int thirdOfWidth = selectedRect.Width / 3;
        e.Graphics.DrawRectangle(Pens.White, selectedRect);
        e.Graphics.DrawLine(Pens.White, selectedRect.Left, selectedRect.Top + thirdOfHeight, selectedRect.Right, selectedRect.Top + thirdOfHeight);
        e.Graphics.DrawLine(Pens.White, selectedRect.Left, selectedRect.Bottom - thirdOfHeight, selectedRect.Right, selectedRect.Bottom - thirdOfHeight);
        e.Graphics.DrawLine(Pens.White, selectedRect.Left + thirdOfWidth, selectedRect.Top, selectedRect.Left + thirdOfWidth, selectedRect.Bottom);
        e.Graphics.DrawLine(Pens.White, selectedRect.Right - thirdOfWidth, selectedRect.Top, selectedRect.Right - thirdOfWidth, selectedRect.Bottom);
        e.Graphics.DrawRectangle(pen, selectedRect);
        e.Graphics.DrawLine(pen, selectedRect.Left, selectedRect.Top + thirdOfHeight, selectedRect.Right, selectedRect.Top + thirdOfHeight);
        e.Graphics.DrawLine(pen, selectedRect.Left, selectedRect.Bottom - thirdOfHeight, selectedRect.Right, selectedRect.Bottom - thirdOfHeight);
        e.Graphics.DrawLine(pen, selectedRect.Left + thirdOfWidth, selectedRect.Top, selectedRect.Left + thirdOfWidth, selectedRect.Bottom);
        e.Graphics.DrawLine(pen, selectedRect.Right - thirdOfWidth, selectedRect.Top, selectedRect.Right - thirdOfWidth, selectedRect.Bottom);
      }
    }
  }

The result is this (I got rid of my main form drawing routine and inserted a nice background picture instead). Very nice!

Rubberband-demo-3

Update: As requested, I’m making the complete sample project available. Here’s the download.

12/10/2006

Could not find installable ISAM… my a*$%

Filed under: General, Programming, .NET — Oliver Sturm @ 3:49 pm - 1 year, 9 months ago

I had this test program that used a connection string to open a Jet format database. Worked just fine. I copied the connection string over to a more complex project, and all of a sudden I got an exception saying “Could not find installable ISAM”. Wow. Looking around, there’s lots of info about that message, some of it from Microsoft, like here and here. None of that seemed to have anything to do with my problem, though.

Know what it was? The connection string should have been this: Provider=Microsoft.Jet.OLEDB.4.0;Mode=Share Deny None;data source=blah.mdb;user id=Admin;password=;, but instead I had accidentally modified it to this: Provider=Microsoft.Jet.OLEDB.4.0;Mode=Share Deny None;datasource=blah.mdb;user id=Admin;password=;

Spot the difference? Yeah, right… Microsoft: how about an “Unknown parameter in connection string” exception, or at least a “Missing ‘data source’ parameter”. Could not find installable ISAM? WTF?

OneCare: Why do I have to install updates automatically?

Filed under: General — Oliver Sturm @ 9:32 am - 1 year, 9 months ago

Onecare-wants-auto-updatesAnother thing I don’t like about OneCare: it wants me to set automatic updates to the highest level, where they are automatically downloaded and installed. I don’t like to do that for a number of reasons – I just don’t want my computer trying to handle that kind of thing without me being there (and I have it running all day and night), and there are lots of situations during my workday when I just don’t want an automatic update to happen on my system. For example, when I’m giving a presentation, or simply when I’m in the middle of work with 28 windows open and two virtual machines running.

I understand Microsoft’s need to make the average user understand the necessity of regular updates, but showing everybody red status symbols all the time because they prefer to do things in their own time is not the way to go.

Right, as you can see, the other problem I posted about is also still there – I actually found an update to install today (MSXML or something), and there are several optional updates available right now for language packs I don’t need, but there’s no critical or security update anywhere to be found…

11/10/2006

Trace settings for unit testing?

Filed under: General, Programming, .NET — Oliver Sturm @ 6:36 pm - 1 year, 9 months ago

I’m currently working on a project to do automatic Remoting publication of XPO services, and as this is supposed to run as a service, I wanted to put in trace messages. I hope every .NET programmer is aware of the nice tracing framework integrated in the .NET framework (if I caught you here, head here and work your way through the related topics). I wanted to use a TraceSwitch instance and log messages with various levels throughout my code – this was easily done.

Then I stumbled upon a problem: in some places in my code I log with levels Info or Verbose, but the default level for the trace switch I used was only “2”, i.e. Warning. When the library is being used by an application, that’s not a problem but a feature: via the configuration section in App.config, the application developer can configure the trace level that is eventually being used by the switch. But when my unit and functional tests run (NUnit and TestDriven.NET), I would like to be able to see all the output from tracing for debugging purposes. Obviously there’s no App.config in place at this point, so I had to find another way of setting the default trace level for the switch.

I looked around extensively for a way to set the value that’s otherwise read from the config file from code – no way. Basically the whole configuration stuff, as it applies to default sections like “system.diagnostics”, is really well encapsulated in the System.Configuration assembly, so without a lot of bad reflection code it’s not possible to influence things from that side.

To make a long(ish) story short, the solution I found is this: just create an App.config file for the NUnit test assembly. What? Yes. Was complete news to me, but even though my test assembly is just a class library, it’s possible to add an App.config to it, and the configuration I put in there is used for the test run. Nice – you (I, at least) never stop learning… :-)

OneCare: More funny behavior on Vista

Filed under: General — Oliver Sturm @ 8:41 am - 1 year, 9 months ago

This morning, OneCare told me its status was “fair”, and the detail dialog claimed there were important updates not installed on my computer. Well, here’s what the Vista update dialog has to say to that:

Onecare-wants-updates

I have reported this issue to the OneCare feedback area, hope it gets fixed.

10/10/2006

Windows Live OneCare kills connectivity with Windows Mobile on Vista

Filed under: General — Oliver Sturm @ 1:23 pm - 1 year, 9 months ago

As posted previously, I have installed the new OneCare beta on my Vista RC1 machine. Now I found that everything’s not perfect with it: it kills connectivity with my Windows Mobile device, which had previously been working nicely. I’ve spent a moment looking around for relevant configuration opportunities and found none. I also looked for log files that might give more insight into the problem, but found none of those either. It’s possible to get a log file out of OneCare, but that doesn’t contain anything similar to a “normal” firewall logfile entry. Basically it seems like OneCare protects the virtual network adapter for the Windows Mobile device by letting nothing through, but at the same time it never mentions the fact to the user, nor does it let the user do anything about it. I hope that’s not the whole story, but I can’t spend much more time right now looking into it.

Update: word has reached me out of Microsoft that this is a bug related to the combination of various beta versions on my system. It’s being “looked into” – I’m looking forward to the result.

Next Page »

Powered by WordPress
© Copyright 2005-2008 Oliver Sturm