In the 17th century the chapel had its own building in Whitehall , which burned down in 1698 . Since 1702 it has been based in St. James 's Palace . In the 17th century the chapel had its own building in Whitehall , which burned down in 1698 ; since 1702 it has been based at St James 's Palace .