Loading custom web control from an .aspx Code-Behind page

Date March 21, 2007

Yesterday one of our clients requested a simple change to a custom user control for one of their ASP.NET 2.0 site. We made the change, and deployed ONLY the .ascx file to their production server.
The deployment resulted in the following run-time error:
Unable to cast object of type ‘ASP.controls_customControl_ascx’ to type ‘controls_customControl’.
This error appeared to [...]