mvc Captcha HTTP 404

Jan 23, 2014 at 10:32 AM
Hi
i am working on a project where i have to put a captcha image in the login page. i have tested it and it is working fine on my simple mvc project but one deployment i have to put the account protal project as a part of the main website so the the login page route start as http://server/secure/account/Login at this login/index i get create the capcha image. image i not displaying so generated source code looks as bellow
<img id="RegistrationCaptcha_CaptchaImage" src="LanapCaptcha.axd?get=image&amp;c=RegistrationCaptcha&amp;t=5867b4a657884bf0833531f097ac3403&amp;s=%2bYQ0mqVOvqhI6SwMKlzaU2lqKlJVF3VwRZdop9KKQ2w%3d" alt="CAPTCHA Code Image">
when i right click on the like and open in different window the url looks
http://uat5.loc/secure/account/LanapCaptcha.axd?get=image&c=RegistrationCaptcha&t=5867b4a657884bf0833531f097ac3403&s=%2bYQ0mqVOvqhI6SwMKlzaU2lqKlJVF3VwRZdop9KKQ2w%3d
the error message
Server Error in '/secure/account' Application.

The resource cannot be found.

Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly. 

Requested URL: /secure/account/LanapCaptcha.axd

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18408
my have included web config file
 <system.web>
        <compilation debug="true" targetFramework="4.5.1" />
        <customErrors mode="Off" defaultRedirect="Error"></customErrors>
        <httpRuntime targetFramework="4.5.1" />
        <httpHandlers>  
            <add verb="GET" path="LanapCaptcha.axd" type="Lanap.BotDetect.CaptchaHandler, Lanap.BotDetect"/>            
       </httpHandlers>        
        
      <sessionState mode="InProc" cookieless="AutoDetect" timeout="20"
      sessionIDManagerType="Lanap.BotDetect.Persistence.CustomSessionIDManager, Lanap.BotDetect" />
    </system.web>
  <system.webServer>
and the Global.asax.cs
public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
            routes.MapRoute(
                name: "Default",
                url: "{controller}/{action}/{id}",
                defaults: new { controller = "Login", action = "Index", id = UrlParameter.Optional }
            );
            
        }       

        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RegisterRoutes(RouteTable.Routes);
            //RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);
        }
have i missed out any why is not working appreciate all your help