title: How to disable HttpHandlers for production server
body: <p>My website is using the MSCaptcha library for captcha functionality. The implementation requires handlers to be defined in the web.config file, a web/httphandler for older IIS and the development server, and a webServer/handler for IIS7+.</p>
  
  <p>Now, every time I publish my project to the production server (which runs IIS7), I get an internal server error message because http handlers have been defined in the config file. Once removed, the website runs perfectly. However, when I am testing locally I need to have http handlers defined as the dev server doesn't seem to read webServer/handlers.</p>
  
  <p>Obviously one solution is to simply remove the httphandlers temporarily every time I publish my website to the production server, but since I do this pretty often it is a bit cumbersome. Is there any way to specify when the http handlers should and should not be included in the config file?</p>