Archive for April, 2007

Virtual Server 2005 R2 SP1 RC1 – Upgrade

Monday, April 30th, 2007

environment Windows 2003 SP2, ISA Server 2006, Virtual Server 2005 R2 SP1 pre-RC1

story I upgraded to Virtual Server 2005 R2 SP1 RC1 remotely - somewhere in the middle, my Terminal Service Client connection disconnected - *PANIC*. But just keep calm and wait. I guess the network connection get shutdown due to some driver installation - the server became ready again by itself. I didn't need a reboot.

Gentoo, Tomcat 6.0, Apache, mod_jk

Monday, April 30th, 2007

Edit /etc/apache2/modules.d/88_mod_jk.conf at the end

jkAutoAlias /var/lib/tomcat-6/webapps/
# jkMount // ajp13
jkMount /fooApp/someServlet ajp13

Gallery customization: Logging ZipCart downloads

Sunday, April 29th, 2007

This is a customization for a photographer with a more or less permanent relationship with his customer.

The users only have permission to view scaled versions of the image.
I introduced a new flag in the zipcart configuration that lets the ZipCart download module override permissions to access the fullsize version.

Each download gets logged to the database.

The admin (or any other user with proper permissions) can view the log.

It's a hierarchical view Year -> Month -> User -> Images (time, host)

Patch for gallery

Customizing Gallery

Saturday, April 21st, 2007

environment Customizing gallery


Edit config.php

@ini_set('display_errors', 1);


Smarty - Toolkit

Gallery template reference

Gallery and Login/Logout Problem – Caching in ISA Server 2005 R2

Saturday, April 21st, 2007

environment gallery, ISA Server 2005 R2, WebSite hosted on Apache using http, publish through ISA with https.

problem login/logout issue. User logs in. Clicks the gallery logo in the top left. Gets the guest front page. If the user visits a sub page it works again... and for some not...

solution Turn of reverse proxy caching in ISA. Configuration/Cache/Cache Rules. Create a new rule including the server that hosts the web site. Check "Never cache the response" and disable http caching.

Database setup before UnitTests for each configuration with Team Foundation/MSBuild

Friday, April 20th, 2007

environment .Net Project, Team Foundation Server, MSBuild

problem Nightly Build containing multiple configurations (e.g. debug, release,...) and the requirement to install a database before the testcases are executed. It is not enough to install the database once for all configurations.

Initial we overwrote the BeforeTest target, but this is getting called only once for all configurations.


Edit TFSBuild.proj

<!-- copied from C:\\Program Files\\MSBuild\\Microsoft\\VisualStudio\\v8.0\\TeamBuild\\Microsoft.TeamFoundation.Build.targets -->
<Target Name="CoreTest"
        DependsOnTargets="$(CoreTestDependsOn)" >

        Condition="!Exists('$(TestResultsRoot)')" />

        Properties="BuildNumber=$(BuildNumber);Platform=%(ConfigurationToBuild.PlatformToBuild);Flavor=%(ConfigurationToBuild.FlavorToBuild);IsDesktopBuild=$(IsDesktopBuild)" />

<Target Name="RunTestWithConfigurationWithDB" >
  <!-- Make sure the Database is freshly setup for each FlavorToBuild -->

  <!-- Database Setup -->
  <Message Text="Creating fresh database. Flavor: $(Flavor) Platform: $(Platform) IsDesktopBuild: $(IsDesktopBuild)"/>

  <Exec Command="db.init.cmd" Timeout="1200000" WorkingDirectory="somedir)"/>

        Properties="BuildNumber=$(BuildNumber);Platform=$(Platform);Flavor=$(Flavor);IsDesktopBuild=$(IsDesktopBuild)" />

references Search for 'How To: Batch Tasks with Item Metadata' in MSDN. This gave me a good idea when targets are called multiple times and when not.

WCF invoking Java/JBoss using SOAP: Bad Performance

Thursday, April 19th, 2007

environment .Net calling a SOAP service exposed by Java/JBoss via a svcutil generated proxy using HttpBasicBinding

problem bad performance

solution Make sure you don't create the proxy everytime you invoke the service. Caching in a static member seems appropriate, but I'm unsure if you need recreate the proxy object in case of an error

comparision if you invoke a WCF with a similar wsdl, at least for us, it didn't make any difference in performance

.htaccess in Apache not working?!

Tuesday, April 17th, 2007

Add AllowOverride as shown below.

<Directory "/var/www/.../htdocs">
AllowOverride All

CodeGear JBuilder 2007, Vista

Tuesday, April 17th, 2007

environment: Windows Vista RTM

problem: Installation of CodeGear JBuilder 2007

solution: Goto


Properties, Compatibility Tab, Check "Run this program in compatibility mode for: Windows XP (Service Pack 2)" and "Run this program as administrator".

Run jbinstall.exe, ignore the warnings. done.

dnsmasq and dns servers for specific domains

Sunday, April 15th, 2007

environment OpenWrt, dnsmasq

problem A dns server for a specific domain (e.g. is either not available from outside OR due to firewall/vpn restrictions has a different ip than publicly available

solution Edit dnsmasq.conf and add