Monday, May 12, 2008

A small note: if you are using Lightning for Thunderbird and you install or upgrade to Ubuntu 8.04 (Hardy), you might run into an issue of you calendars disappearing (probably only when using the build from the Lightning website):

Error: [Exception... "Invalid ClassID or ContractID" nsresult: "0x80570017 (NS_ERROR_XPC_BAD_CID)" ...

.../extensions/%7Be2fda1a4-762b-4020-b5ad-a41df1933103%7D/components/calItemModule.js
Line: 67

This is related to the fact that Hardy upgrade the C++ libraries to libstdc++ 6. In order to fix this, you might want to try installing the 5.x version of libstdc++. 

Another goodie: starting with Lightning 0.8, WCAP support for the Java Calendar Server is now part of the main trunk.


Monday, May 12, 2008 4:59:03 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  | 
Tuesday, February 19, 2008
I had a SunBlade 1000 (UltraSPARC III based) system available, so I started on a Friday afternoon project of getting Ubuntu installed on this box. Here is what I did to get a running system, including a Gnome desktop:

1. Get the Gutsy ISO image from http://ubuntu.com/ and burn it. You must select the UltraSPARC version, which is - unfortunately - only available for Ubuntu server (more about this below).

2. Run the installer from the CD. THis should be fairly straightforward, but different if you are only used to the desktop edition of Ubuntu. For starters, there is no Live CD with X windows functionality included.

3. You should have a running Ubuntu server system by now. Now in order to get the windowing environment, you need to login and get the entire desktop:
    user@host:~> sudo apt-get install ubuntu-desktop
This should work for the kunbuntu, xubuntu, etc. desktop as well. Good luck trying.

4. During the install, you will likely be prompted to configure Xorg. If this fails for any reason, you can reconfigure X by
    user@host:~> sudo dpkg-reconfigure xserver-xorg
or even
   
user@host:~> sudo Xorg -configure

5. By now you should be able to start a naked Xorg server, e.g. by running

   
user@host:~> Xorg & sleep 15 ; killall Xorg
This command will kill the X server after 15 seconds, in case the keyboard mapping does not support <Ctrl> <Alt> F1 console switching (try it out).

6. My system has and Elite3D graphics board (sunffb), and even through Xorg would start just fine by itself, when starting X through the gdm, the X server would die after a split-second. To overcome this, I added an option to the gdm.conf file:
Locate
the command=/usr/bin/X line in the [server] section of gdm.conf. You need to add the following option at the end of this line:
    +XINERAMA
Apparently, gdm probes for Xinerama support, and the Xorg server for the sunffb will die when being probed without enabling this.

7. After rebooting, the login screen should appear now.

tag: , , ,

Tuesday, February 19, 2008 2:42:02 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  | 
Friday, January 25, 2008

For years I have been playing around with all kinds of computer based TV and multi-media solutions and toys: Windows MCE in its various editions from 2004 to Vista, early versions of MythTV and proprietary stuff. Until now none of these where really at a point where they were actually useful for a family room:

While Windows did have a reasonable UI from the start, the fact that it recorded to a highly proprietary format with nasty DRM implication was a deal-killer right from the start. Some of the tuner-cards (like ATI) attempted to mitigate this by bundling plugins for MPEG-2 conversion, but these were implemented rather clumsily and had frequent failures.

MythTV was - until recently - also more of a geek toy: nice for my lab or office, but nothing I could really throw at my family. Now, with the 0.20 config found in the Gutsy release of Mythbuntu, MythTV takes a rather large leap towards usability. 

  • The UI is basically usable and driver support (especially for the tuner cards) is becoming acceptable. I am using an WinTV HVR-950 USB stick now with my digital-over-the-air setup and there is not a lot more I could ask for in terms of device support.

  • The proprietary NVidia drivers are good enough and support the motion extensions that are needed to offload motion processing to the GPU.

  • For audio, I require at the very least S/PDIF support (mostly for lossy Dolby Digital, but there is no other format like e.g. MLP being used for digital TV at this time), which has been quite painful, but ultimately doable.

  • There seems to be decent remote support, but I am right now still fighting with my old ATI Remote Wonder (I think that I will cave in here at some point in time though).

The by far most important factor for family room usability for me is RTC wakeup: I could not near having a computer with its nasty fans running all the time. Enter ACPI controlled RTC wakeup: using a couple of scripts[1], I was able to make the MythTV box boot up in time for any show that I wanted to record. Very cool.

One thing that I was fighting with in the end was a problem with the way MythTV could be shut down automatically after an unattended recording session. For this, MythTV provides mythwelcome(1) which is a helper program to start the MythTV frontend[2]. The trick that made is work for me was to instruct[3] mythwelcome(1) to not start mythfrontend(1) automatically: This overcomes a problem with session management in Ubuntu and mythwelcome, and allows the box to shutdown automatically after it completed recording.

Bottom line is that I am quite happy with my MythTV box for now.

tag: , , ,

[1] There are quite a few of tutorials on ACPI wakup out there, many using nvram-wakeup. Discard all these, and only use those centered on /proc/acpi/alarm, instead (if you can).

[2]  Mythbuntu Gutsy is actually quite smart about using mythwelcome(1): You only need to go into /etc/mythtv/session-settings and enable the welcome shell. No need to change the mythstartup.sh script.

[3] Press the 'i' key while in mythwelcome(1) to configure this.

Friday, January 25, 2008 9:44:22 PM (Eastern Standard Time, UTC-05:00)  #    Comments [1]  | 
Wednesday, December 26, 2007

I am slowly extending my base of used operating systems: after Windows and Solaris, I am now playing a bit with Ubuntu. This is quite exciting for me, since after about 8 years of the early days of Linux (I started with SLS, kernel 0.99.7) I started to focus more on Solaris and Windows after joining Sun. A lot has happened since, and I am quite pleased with the end-user experience that a modern distribution like Ubuntu offers in these days.

One issue I had (like Lauren) was that hibernation of Ubuntu 7.10 was not exactly working out of the box:

Sending the system (a Toshiba Tecra M2 with a GeForce FX Go5200) to hibernate was very straightforward. But resurrecting it after a hibernation resulted in a dark screen[1]. I tried a couple of tricks I found (like using the extremely useful toshset(1) utility, part of the Gutsy Gibbon distribution), but to no avail.

Finally, I stumbled over a setting to be applied to the X configuration (see also here). It requires disabling the chipset AGP drivers (e.g. intel_agp) and enabling the restricted NVidia driver to provide AGP support by setting a separate option in the xorg.conf file.

Now, hibernation and wake-up work with one little caveat: after waking up the system, you must close the lid for  about 5 seconds, in order to have the backlight turn on.

tag: , , , ,

[1] Note that I am using the NVidia proprietary drivers.

Wednesday, December 26, 2007 5:44:21 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  | 
Tuesday, October 16, 2007

When you are working with Glassfish (like I am doing now), you might need to capture your HTTPS traffic. In an earlier post, I explained how to capture and decrypt any SSL/TLS traffic, as long as you have the server private key.

While this method is quite effective and universal, it is still a little cumbersome, especially since the actual SSL decoder in Wireshark is not yet fully integrated into the analyzer itself.

For Sun's Glassfish application server, there is a fairly simple way to monitor any web services HTTPS traffic:

simply go into the domain.xml file of your domain and add the following <jvm-options>:

<jvm-options>-DWSIT_HOME=${com.sun.aas.installRoot}</jvm-options>
<jvm-options>-Dcom.sun.xml.ws.transport.http.HttpAdapter.dump=true</jvm-options> <jvm-options>-Dcom.sun.xml.ws.transport.http.client.HttpTransportPipe.dump=true</jvm-options>

The server.log (in <installRoot>/domains/domain1/logs) will then contain the fully assembled web services exchanges.

tag: , , , ,

Tuesday, October 16, 2007 1:11:41 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  | 
Tuesday, October 09, 2007

Wireshark can decrypt SSL traffic as long as you have the server private key. This can be extremely useful, if you have to debug HTTPS traffic and cannot use HTTP instead or put a MITM in the front (e.g. Windows CardSpace applications).

Unfortunately, the documentation on this feature is at this time rather thin. the wireshark wiki has one page dedicated to it (along with some sample traces - great to get started!!), but there is some information missing. This is what I did:

1. Make sure that the server private keys are in unencrypted PKCS#8 PEM format (RSA)

If in doubt, take a look at your key file. If it is binary, chances are that it is in a DER format which cannot be used with wireshark. Assuming that you have at least an PKCS#8 DER file, you can instruct openssl to convert this file for you:

openssl pkcs8 -nocrypt -in derfile.key -informat DER -out key.pem -outformat PEM

If your DER file is encrypted, you need decrypt the key with the right passphrase first. After you are done, you first line in the key.pem file should look like this:

-----BEGIN RSA PRIVATE KEY-----

2. Configure Wireshark to use this key

You have to go into the Preferences for SSL and configure the RSA key list. Check the wireshark wiki on how to do this. Make sure to specify the debug file - you really need this!

3. Capture you traffic and debug

If you now start to capture your traffic, you *should* be good to go. Make sure that you find a line like

ssl_init private key file c:\temp\key.pem successfully loaded

in you ssl debug line (at the top).

One particular issue that I had was that I got in the debug file for the first application packet the following debug output:

ssl_restore_session can't find stored session

This happens if your client talked to the server before you started the trace (or during an earlier trace) and some key exchange messages are missing. Restart your client (e.g. CardSpace or the browser) and the server, and you should be good to go. 

tag: , ,

Tuesday, October 09, 2007 2:03:36 PM (Eastern Standard Time, UTC-05:00)  #    Comments [1]  | 
Monday, October 08, 2007

keytool is a useful utility for dealing with Java keystores, but it has a significant disadvantage: you can not export private keys with a certificate using keytool. Therefore, the only thing you can so is to add the certificate as a trustedCert into the keystore, but not as a keyEntry.

Obviously, this is easily possible through the programmatic interface, but that can be hasslesome at times. At http://couchpotato.net/pkeytool/ you can find a really nice little tool that allows you to extract the private key in a separate file, and then re-import the private key file and the cert into a new keystore.

tag: , ,

Monday, October 08, 2007 4:49:30 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  | 
Tuesday, September 18, 2007

Just to satisfy myself that the Solaris 10 U4 iSCSI target is working well, I fired up a few file system stress test processes to see if the Solaris machine (and the iSCSI initiator) hold up.

For the test itself, I took an old but reasonably reliable SQL Server hard drive test (can be downloaded e.g. from here). I took the default parameters with medium workload (100MB files), especially since my test drive was a virtual machine on my laptop. Write caching was off. The purpose of this test was not to create a performance evaluation or a real stress test, but much more a proof-of-concept that the two systems would work together.

Here is the final result:


The next step would be a full stress test, preferably with at least 3 or 4 high-powered drivers. That might take some time, though. Meanwhile: happy SAN building.

tag: , ,

Tuesday, September 18, 2007 8:21:14 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  | 
Friday, September 14, 2007

Here is a really nice add-on that got shipped with Solaris 10 update 4 (08/07): starting with this OS release, Solaris supports iSCSI targets. Together with the Microsoft iSCSI initiator for 2000/XP/2003, this allows building a very comprehensive and compelling SAN (Storage Area Network). Here is a screenshot:

Now, in order to get this to work, you need to do the following things:

  1. Install Solaris 10 08/07 (update 4)

  2. Install Windows and the Microsoft iSCSI initiator 2.05 build 3392

  3. Follows these guidelines to configure a target

  4. Read up on the MS initiator on how to discover and mount an iSCSI target

Overall, this procedure is not very difficult and you will have a system running within a few minutes. 

Please note that I did not (yet) test CHAP authentication or Vista compatibility, but - given some time - I will try this later.

tag: , ,

Friday, September 14, 2007 3:21:12 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  | 
Thursday, May 24, 2007

In order to go through some exercise here, I recently needed to create a few Java classes from XSD schema. "Well," I thought, "JAXB with its integrated XJC is your friend!" And so it is, but you might have to dig a little deeper.

The problem I was facing was a schema that had references to WS-Security, XML Encryption and XML Signature. As such, it imported all these schemas from the web using <xsd:import namespace="..." schemaLocation="http://..." />. Since xjc is pretty flexible, accessing these schemas on the web was a charm, even through the firewall. After all, this is much better than downloading all the referenced schemas (and all schemas they reference) and edit the imports to point to the right location in the file system.

Well, not so quick. In their infinite wisdom and foresight, the schema developers at OASIS and W3C decided to use different schema locations for XML Dsig. They reference the same schema (with identical namespace, obviously), but import through different schemaLocation URIs. That confuses xjc to no end, since it detects a re-definition of the same object and gives up.

In order to resolve this problem, you can create an XML Catalog, that allows you to rewrite (or redefine) URLs referenced in you schema. Here is an example:

<?xml version="1.0"?>
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
  <system
      systemId="http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/xmldsig-core-schema.xsd"
      uri="http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd" />
</catalog>

This simple catalog redefines the URI used by the XML encryption schema to point to the one used by OASIS. The XML Catalog specification provides many more options, and it is good to know that xjc supports this.

While this is quite simple, I found it relatively hard to find concrete examples on how to use this mechanism.

tag: , , , , ,

Thursday, May 24, 2007 3:17:18 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  | 
Monday, May 07, 2007
In the free VMWare Server edition, there is no vmfstools program that could be used to extend and manage virtual drives, as it would be e.g. needed to extend boot partitions. Instead, the program is called vmware-vdiskmanager and performs - as far as I can tell - the same function.

tag: ,

Monday, May 07, 2007 6:40:03 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  | 
Tuesday, January 16, 2007
Since I am using VMWare a lot for all kinds of testing, I am really happy to have found this simple procedure: it allows you to extend the Boot partition of your Windows box without having to resort to 3rd party tools.

Tuesday, January 16, 2007 4:53:49 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  | 
Friday, September 15, 2006

I just installed Windows Vista RC1 (Build 5600) and had some serious problems getting Windows Update to work from behind my proxy server. The error I got was 8024402C, along with the recommendation to try the Automatic Proxy configuration. Needless to say that this did not work ...

Here is how to get rolling with this issue:

1. Get the WinHTTP system proxy settings right

When configuring IE in Vista, you DO NOT configure the system HTTP proxy settings. In former versions of Windows you would use the proxycfg.exe command for doing this. In Vista, you will have to use the netsh.exe. (Does anybody know of a UI way to do this?) Do this:

netsh> winhttp

netsh winhttp> set proxy myproxy.company.tld:80

You have to do this in a CMD.EXE windows with administrative privileges (right click CMD.EXE in Accessories and select 'Run as Administrator').

2. Delete old setting for Windows update

- Stop the Windows Update service (e.g. through the Services MMC plug-in or through net stop wuauserv).

- Delete C:\WINDOWS\SoftwareDistribution (again, with administrator privileges)

- Start the Windows Update service

It should work now.

Friday, September 15, 2006 11:21:46 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  | 
Thursday, September 14, 2006

Just like some time earlier this year, Build 5600 (RC1) of the Windows Vista OS has difficulaties with VMWare. Fortunately, life is somewhat easier this time around: If your problem is that Vista seems to freeze during installation at the "Windows is load..." text stage, you should try to add the following lines to your .VMX file:

svga.maxWidth = "640"
svga.maxHeight = "480"

Thanks to Joel on Software for this tip.

Thursday, September 14, 2006 12:06:30 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  | 
Wednesday, August 30, 2006

Here is a suggestion for the dasBlog folks:

After our corporate blog host (http://blogs.sun.com/) was upgraded to Roller 3.0 (which - by the way - has a couple of really nice improvements), my cross-poring would no longer work. Since this is quite annoying is went to figure out why this is so. It turns out that the Roller folks (at least at Sun) were thinking ahead and made sure that all calls the XMLRPC endpoints get redirected to a protected HTTPS handler. Makes sense.

Unfortunately, this break the posting mechanism for dasBlog, as well as a lot of other blog clients out there. While the Roller admins are now fixing this, I came up with a small idea how to get dasBlog to post to HTTPS endpoints as well. Since it uses the Cook Computing XML-RPC library, this fix is actually very straight forward:

You will need to fix just a very few items:

  • The CrosspostSite class in the newtelligence.dasBlog.Runtime namespace. Here you should add a propety like String transportProtocoll = "http" or similar. Also the schema for the siteConfig file file to accomodate this additional attribute.
  • The UI to allow proper configuration (duh!).
  • The HandleCrosspost() method in newtelligence.dasBlog.Runtime.DasBlogDataServiceGFactory.BlogDataServiceXml.CrosspostJob. This UriBuilder should be reconfigured to something like:
    UriBuilder uriBuilder = new UriBuilder
                                    (ci.Site.transportProtocol,
                                     ci.Site.HostName,
                                     ci.Site.Port,
                                     ci.Site.Endpoint);
And this should be it.

Obviously, for the long run I would love to see an ATOM protocol based mechanism, but so far this is a dream (I guess?!). Here is the URL for the Bug I submitted on SF.NET.

dasBlog" rel="tag">dasBlog

Wednesday, August 30, 2006 4:08:24 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  | 

Well, I finally bit the bullet and decided to update my production blog engine to the latest build. This will be a new adventure, since I am now really on some 'terra incognita': I am running on a beta platform, with unchecked code. Cool.

Part of this experience was to migrate away from CVS (at least for this project) to SVN. One of the reasons I was hangin on to CVS was the wonderful Tortoise CVS gui that makes versionb control usable even for people who do not love command lines of at least 120 chracters. Realizing that there is now a Tortoise client for SVN as well (here), the move was easy.

The next 'challenge' was to migrate my blog from a .NET 1.1 platform to 2.0 (since I definitively prefer VS.NET 2005 over the older versions, and also like some of the performance improvements in 2.0). Again, this was reasonably painless (almost like Java (tm) ;-)).

So now here I present dasBlog 1.9 on ASP.NET 2.0. Hope it does not break.

BTW: Many thanks to the entire dasBlog developer team! Great job.

Wednesday, August 30, 2006 9:00:37 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  | 
Monday, August 28, 2006

Since I was recently going through my inventory of Javascript components to update a web site, I decided to link a few of the nicer ones here. They are not as integrated as the GWT or Microsoft Atlas, but - at times - still quite useful:

Tigra Menu

http://www.softcomplex.com/products/tigra_menu/

This is a nice, easy to configure JavaScript menu bar that works quite well across different browsers (with the notable exception of using absolute positioning, so IE and FireFox will *always* require some different handling).

There are a few more components ot SoftComplex - check also their 'Tigra Hints', 'Tigra Tree Menu', and some more of their components.

The basic edition is free - they have PRO components for money.

SynForce

http://www.netspinner.co.uk/synforce/html/synforce.html

This is a small validation library, that comes under LGPL.

Xin Calendar 2

http://www.yxscripts.com/xc2/index.html

Really nice JS calendar that is free, as long as you keep a link to yxscripts.com from your web site. REALLY nice and extremely configurable.


Monday, August 28, 2006 4:33:33 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  | 
Monday, July 24, 2006

Here is a nice AJaX pattern:

In most samples that I have seen so far, a global XMLHttpRequest variable is declared, since you cannot pass variables to the action handler.

In this article, they show a nice pattern, where you declare an anonymous function that calls another named function which may accept parameters; like this:

    http_request.onreadystatechange = function(){
        do_the_thing(http_request);
    };

This is particularly useful if you need to send of multiple XHRs without being able to gurantee the order in which they return.

Thanks to Joan Morris DiMicco for finding this.

Monday, July 24, 2006 8:44:45 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  | 
Tuesday, June 13, 2006
NOTE: Do not do this to any of your production machines - you will make then unusuable!

So here is a way that should work for getting the Vista BootMgr to load Linux or Solaris. Note that I did not yet get this working - this is very much work in progress:

Essentially you install both OSes and boot into Linux. You then start GRUB and install the loader into the partition where Linux lives:

grub
> root (hd1,0)
> setup (hd1,0)


After that, you need to get a copy of the bootsector. Following these instructions from O'Reilly, you need to do this:

dd if=/dev/hdb1 of=/tmp/grub.bin bs=512 count=1

Take the grub.bin and move it to your Vista partition (eg. by USB stick).

---

On Vista, start a CMD shell (remember to run as administrator!) and copy ntldr, ntconfig.exe, and grub.bin into your C:\ root directory.

You need then to edit boot.ini to reference grub.bin - again, take a look at the O'Reilly article for details.

After this, you need to tell BCD to use the legacy loader and include it in the boot menu:

bcdedit /displayorder {current} {ntldr}

At this point, the Vista boot manager should be able to load Linux. For me, it does not work yet. If you get this to work, please tell me how... Otherwise stay tuned for more.


For some more information on the bootsector, see:

http://www.bcpl.net/~dbryan/ntfs-dual-boot.html


Tuesday, June 13, 2006 3:38:49 PM (Eastern Standard Time, UTC-05:00)  #    Comments [1]  | 

This is an update for an earlier article I wrote on getting Vista and Linux to dual boot. I received some feedback about that article, particularly that the solution I outlined was not working for some people. So today I tried it again - this time with Vista Beta 2 and Ubuntu 6.06 on a VMWare platform, emulating 2 IDE drives and a x32 platform.

To my surprise, everything worked right out of the box:

  1. Install Vista on the first drive. Note that I did not hae the second drive installed at that time, so Vista did not have any opportunity to modify the MBR of that drive.
  2. Install Ubuntu from the Live CD. Ubuntu will automatically install GRUB on the MBR for the first drive, but since GRUB cannot figure out the file system type for the Vista partition, it will simply not create any entries.
  3. Reboot after the Ubuntu installation and edit the /boot/grub/menu.lst file. For your reference, here is what you need to add:

    title          Windows Vista (Beta 2)
    root           (hd0,0)
    makeactive
    chainloader    +1

    I also recommend changing the default timeout from 3 seconds to something more reasonable (maybe 15 seconds?).

Interestingly enough, even though GRUB was not able to identify the Vista partition, Linux mounts it with no problems (although I have not really tested this functionality - but you can definitively see your files).

After that, all should work. If you run into any problem, please drop me a line at work at beuchelt dot com.

Tuesday, June 13, 2006 1:17:59 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  | 
Friday, June 02, 2006

I am a big fan of electronic calendars: no paper to loose, you an copy the data anywhere, great integration with other electronic collaboration tools, etc. One of the problems I had with the Sun Calendar Srever so far was that it is really designed around being on-line all the time. It has a reasonable (but aging) web interface and that's pretty much it. There is really no good support for disconnected clients like a laptop.

Thunderbird (particularly with the Mozilla Calendar extension) on the other side has great potential to become a strong contender in the collaboration client business. Getting those two products to work together was something I was looking for in a long time.

Today, I found a small perl script by John Littell, that runs as a daemon and translates from WebDAV to the WCAP protocol that Sun Calendar Server uses.

So finally, I can use the Mozilla Calendar extension and read and write to my corporate SCS based calendar. The setup is almost trivial: you start the perl script, point your Mozilla Calendar to the daemon (e.g. http://localhost:7080/beuchelt/) and it will translate your client's WebDAV requests into WCAP commands. This is just awesome.

UPDATE: Ah, I forgot to mention this: this script also works with Apple's iCal client.

Friday, June 02, 2006 4:08:35 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  | 
Thursday, May 25, 2006

Here is a nice little tweak for Visual Studio 2005:

In a debug session with the default settings, you can only see "External Code" in the call stack for the Windows/.NET code base. If you go to Tools -> Options... -> Debugging -> General, and unselect "Enable Just My Code", you can then see the entire call stack.

There is one caveat however: if you enable this option, VS gets a lot dumber about stepping into your code, so you have to set breakpoints very extensively.

Thursday, May 25, 2006 11:52:51 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  | 
Wednesday, May 17, 2006

Well, I really do not have any big secrets to uncover, but I wanted to point you WCF developers to an extremely useful tool: sgen.exe.

In itself the tool is quite handy, since you can pre-generate and compile serialization code that would otherwise be generated and compiled by WCF during runtime. The cost for doing this (while only during startup) is quite significant, so using sgen.exe, you can avoid this penalty.

The by far best part of sgen.exe is, however, the '/keep' switch. If you turn this on, WCF keeps the source code for the custom IXmlSerializable implementation, and you can tweak, adjust or - in my case - debug - your serialization process.


Wednesday, May 17, 2006 1:32:49 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  | 
Tuesday, April 11, 2006

In an earlier article, I showed how to make a system dual-boot Windows Vista and Debian Linux through GRUB. This was fairly straightforward, even with the new boot loader (BCD) that ships with the latest Vista builds. All of that happened in a reasonably simple environment - I used Microsoft Virtual PC 2004 SP1 to run Vista build 5342 and Debian.

This time, things are bound to get a little bit more interesting: I am installing Vista build 5342 on a Sun Ultra 40 AMD workstation. The other OS is - obviously - Solaris 10 01/06 (Update 1).

The overall procedure is very similar to what I have described before:

1. Install Windows Vista

2. Install Solaris and edit /boot/grub/menu.lst as described here.

STOP: Solaris is not quite as smart about the boot loaders as GRUB and does some strange things to the MBR - OR - Vista x64 has a different behavior about writing its boot records. At this point, I could start Solaris by default. Vista did NOT boot for me - it was complaining about \Windows\System32\Winload.exe missing.

As such, I ran the System Recovery option from the Vista boot DVD, which reinstalled the Vista boot loaders. To be sure, I ran the bootsect.exe with switch /nt60 on the SYS volume.

For the restore options it is very important that you decline to have the boot problems fixed automatically .Just say "No" and click "Next" and you will be taken to a menu where you can get a full Windows shell - this is MUCH better than the recovery console.

3. Reboot into the Windows shell on the Vista Install DVD.

4. bcdedit /set {default} device partition=c:

5. bcdedit /set {default} osdevice partition=c:

6. Run d:\boot\bootsect /nt60 c:

You should be all set.

If you screw up GRUB

Now back into booting Solaris by throwing the Solaris install DVD into the drive, going to the command prompt of grub and specifying

	root (hd0,1,a)
kernel /platform/i86pc/multiboot
module /platform/i86pc/boot_archive
Great. Solaris boots. Now run installgrub(1M) with the following arguments:

installgrub /boot/grub/stage1 -m /boot/grub/stage2 /dev/rdsk/(this is the char device for your root slice)

NOTE: After you re-install GRUB, you will need to go back to the Vista Recovery console.

Tuesday, April 11, 2006 10:45:07 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  | 

Here is a help page from Microsoft on BCDEDIT.EXE. Note that you must run COMMAND.EXE as administrator, otherwise BCDEDIT.EXE is not in your search path and will not execute.

Here is a discussion on how to use BCDEDIT in some more situations.

Tuesday, April 11, 2006 8:37:54 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  | 
Thursday, April 06, 2006

Windows Vista introduces a new 'Network Level Authentication' mechanism to RDP. It will be intereting to find out what they are doing there exactly, but meanwhile you might want to be able to use your legacy RDP clients to access your Vista desktop. Here is how you do this:

To configure Vista for the old RDP clients, go to Control Panel -> System -> Advanced System Settings. Select the "Remote" tab and then "Allow connections from computers running any version of Remote Desktop". That works - at the very least - good for mstsc.exe on Windows.

Here is a screen shot (Build 5342):



Now, the interesting thing would be to get this to work with rdesktop(1) and similar non-Windows RDP clients as well. Unfortunately, the latest Build 5342 is very uncooperative here. rdesktop fails miserably. Compare the TCP streams (upper one is rdesktop, lower one is mstsc.exe on Windows XP SP2):





Thursday, April 06, 2006 2:00:47 PM (Eastern Standard Time, UTC-05:00)  #    Comments [2]  | 

Since Vista features the new boot loader system, multi-boot is not quite so trivial. There are various guides and FAQs on how to do XP/Vista dual boot (see e.g. here or here), but getting a GRUB based OS (such as Solaris 10 U1 or Debian Linux 3.1) dual booted is not very well documented.

I used the 5342 build of Vista, which ships with the bootsect.exe command in the \boot directory of the installation medium (in my case a DVD ISO image). Ths utility is only needed if you want to go back to the original Vista boot loader by running: bootsect.exe /nt60 ALL

I first installed Vista on my system with all defaults on my first hard drive (IDE 0:0). The new boot loader was in place on the MBR for that drive.

Now I installed Debian and agreed that GRUB should take over the MBR for the IDE 0:0 drive (/dev/hda). After that, Vista became invisible and Debian booted just fine from /dev/hdb (IDE 0:1).

Now, in Debian, you have to edit the /boot/grub/menu.lst that configures grub at run time. I simply added an entry for Vista:

title Windows Vista (Build 5342)
root (hd0,0)
makeactive
chainloader   
+1

Then you simply reboot and - voila: it should offer you a menu item for Vista. If you select that, the Vista boot loader takes over and the Windows OS comes up.

Some notes:

  • I was using Virtual PC 2004 SP1 for this experiment. That is also the reason why I did not use Solaris 10, since VPC and Solaris are not really a happy couple. Since Solaris 10 U1 also uses GRUB, there should be no difference.
  • For some strange reason I am getting a "Boot Failure" prompt now, right after the BIOS check. After hitting the <any> Key, I get to the GRUB menu.
  • I have no idea if this will work similar on AMD x86 machines.

Thursday, April 06, 2006 9:41:08 AM (Eastern Standard Time, UTC-05:00)  #    Comments [3]  | 
Tuesday, April 04, 2006
Here is a nice little tool for Firefox that helps in creating tags for blogs entries. It allows you to create master lists to choose your frequently used tags from. While it has a somewhat odd interface, it is still quite useful.

Tuesday, April 04, 2006 8:18:50 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  | 
Monday, March 27, 2006
In order to limit access for specific pages on MediaWiki (e.g. for developing internal ideas etc.) you might find this add-on to MediaWiki interesting. It add a 'restrict' functionality to each article, similar to the 'protect' mechanism. Its access control is not very fancy (if you are in a group called 'restrict' you can view and edit all restricted pages), but it is useful in general.

Tags: MediaWiki

Monday, March 27, 2006 11:39:08 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0]  | 
Thursday, March 23, 2006
I recently started to play around with a useful tool called TrueCrypt. It allows to create an encrypted diskfile, that can be mounted on most major operating systems by giving the proper password.

This comes in REALLY handy, when you have a USB key chain drive to spare: I have been using it to store a lot of my personal information like passport and credit card numbers, but also scans of certificates, degrees etc.

Given the fact that you can employ a triple encryption using AES, Twofish and Serpent, along with RIPEMD-160 or Whirlpool for hashing. The code is open source.

Tags: Security, TrueCrypt,