Whispering-gallery mode (WGM) microdisk lasers show great potential for highly sensitive label-free detection in large-scale sensor arrays. However, when used in practical applications under normal ambient conditions, these devices suffer from temperature fluctuations and photobleaching. Here we demonstrate that these challenges can be overcome by a novel referencing scheme that allows for simultaneous compensation of temperature drift and photobleaching. The technique relies on reference structures protected by locally dispensed passivation materials, and can be scaled to extended arrays of hundreds of devices. We prove the viability of the concept in a series of experiments, demonstrating robust and sensitive label-free detection over a wide range of constant or continuously varying temperatures. To the best of our knowledge, these measurements represent the first demonstration of biosensing in active WGM devices with simultaneous compensation of both photobleaching and temperature drift.