PDA

View Full Version : How to convert httphandler in web.config from ASP.NET 3.5 to ASP.NET 4.0 IIS 7.5


earni23
07-16-2010, 03:09 PM
Hello
I have this on my local computer, running ASP.NET 3.5.

<httpHandlers>
<add verb="*" path="CaptchaImage.aspx" type="AspCaptcha.CaptchaHandler, AspCaptcha"/>
</httpHandlers>

How do I convert the above code in web.config to ASP.NET 4.0, which is running on a IIS 7.5 server?

earni23
07-16-2010, 06:38 PM
I tried this:


<?xml version="1.0"?>
<configuration>
<system.web>
<handlers>
<add verb="*" path="CaptchaImage.aspx" type="AspCaptcha.CaptchaHandler, AspCaptcha" resourceType="Unspecified"/>
</handlers>
<compilation debug="true" targetFramework="4.0" />
</system.web>
</configuration>


but I get this:
The configuration section 'handlers' cannot be read because it is missing a section declaration