The web.config file controls all compilation settings in a default web site project. To treat compiler warnings as errors, you'll need the following in web.config:
Note: You can only twiddle with compiler settings under full trust, but then you'll only need this setting at build time.