 In March 1798, Viktor von Wattenwyl, the 71st and last Landvogt, surrendered the castle to the advancing French troops.In 1803 the Canton of Aargau was founded, and a year later the castle passed into its possession.The cantonal authorities were uncertain what use should be made of the castle and so it stood empty for almost twenty years.