I am working on a mvc4.5 project where I am using the embedded id to create an image using the CaptchaHtmlHelper
the config file is as bellow
<system.web>
<compilation targetFramework="4.5.1" />
<customErrors mode="Off" defaultRedirect="Error"></customErrors>
<httpRuntime targetFramework="4.5.1" />
<httpHandlers>
<remove verb="*" path="*.asmx"/>
<add verb="*" path="LanapCaptcha.axd" type="Lanap.BotDetect.CaptchaHandler, Lanap.BotDetect" />
</httpHandlers>
<handlers>
<remove name="LanapCaptchaHandler" />
<add name="LanapCaptchaHandler" verb="*" path="LanapCaptcha.axd" type="Lanap.BotDetect.CaptchaHandler, Lanap.BotDetect" />
</handlers>
and in my Global.asax.cs file I have set the route as
public class MvcApplication : System.Web.HttpApplication
{
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);
BundleConfig.RegisterBundles(BundleTable.Bundles);
}
when I load the page I get the following error
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
appreciate if you any one show me what I have to do.
thanks a lot