Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8207647
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T09:04:04+00:00 2026-06-07T09:04:04+00:00

I have an MVC application that I’m trying to add the ManagedFusion.Web.Captcha.CaptchaImageHandler into so

  • 0

I have an MVC application that I’m trying to add the ManagedFusion.Web.Captcha.CaptchaImageHandler into so that I can write the following code :

<label for="captcha">Enter @Html.Raw(Business.Captcha.CaptchaImage(Html, 50, 180))  Below</label>

and have the image appear. The code for that class is just cut and paste from the examples online:

public static string CaptchaImage(this HtmlHelper helper, int height, int width) {
            ManagedFusion.Web.Controls.CaptchaImage image = new ManagedFusion.Web.Controls.CaptchaImage {
                Height = height,
                Width = width,
            };
            HttpRuntime.Cache.Add(image.UniqueId, image,
                null,
                DateTime.Now.AddSeconds(ManagedFusion.Web.Controls.CaptchaImage.CacheTimeOut),
                Cache.NoSlidingExpiration,
                CacheItemPriority.NotRemovable,
                null);
            StringBuilder stringBuilder = new StringBuilder(256);
            stringBuilder.Append("<input type=\"hidden\" name=\"captcha-guid\" value=\"");
            stringBuilder.Append(image.UniqueId);
            stringBuilder.Append("\" />");
            stringBuilder.AppendLine();
            stringBuilder.Append("<img src=\"");
            stringBuilder.Append("/captcha.ashx?guid=" + image.UniqueId);
            stringBuilder.Append("\" alt=\"CAPTCHA\" width=\"");
            stringBuilder.Append(width);
            stringBuilder.Append("\" height=\"");
            stringBuilder.Append(height);
            stringBuilder.Append("\" />");
            return stringBuilder.ToString();
        }

I’ve added the following to my web.config

<system.web>

<httpHandlers>
  <add  verb="GET" path="test.sample"  type="ManagedFusion.Web.Handlers.CaptchaImageHandler, ManagedFusion.Web.Captcha" validate="false" />
</httpHandlers>
</system.web>

<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<modules runAllManagedModulesForAllRequests="true" >

</modules>
<handlers>
  <add name="CaptchaImageHandler" verb="GET" path="captcha.ashx"  type="ManagedFusion.Web.Handlers.CaptchaImageHandler, ManagedFusion.Web.Captcha" />
</handlers>

All previous SO questions point to the system.web->httpHandlers getting picked up by Cassini and the system.webServer->handlers getting picked up by IIS 7. But whenever I navigate to the view that has the aforementioned code, I always get a 404 for the /captcha.ashx. There is no route ignore rule in the global.asax. What is going on here? It’s like nothing I do will get the handler to fire either on my local machine or on a deployed IIS 7 instance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T09:04:06+00:00Added an answer on June 7, 2026 at 9:04 am

    In the Global.asax file, I needed to add the ignore route before the default route mapping, so the whole method looks like this:

    public static void RegisterRoutes(RouteCollection routes) {
            routes.Ignore("captcha.ashx");
    
            routes.MapRoute(
                "Default", // Route name
                "{controller}/{action}/{id}", // URL with parameters
                new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults
            );
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a MVC application that I am now trying to add authentication and
I have a web MVC application that I would like to add feature that
I have a spring mvc application that I have broken up into separate maven
I have an Asp.Net MVC application that works in the vs.net development web server.
I have an MVC 2 application that has the following on it; <% using(
I have a MVC application that produces the following output in a browser when
The setup I have an MVC application that's making AJAX requests into my controller.
I have an MVC application that I would like to add some custom stats
I have an asp.net mvc application that uses web service. I have various controllers
I have a hybrid asp.net web forms / mvc application that I recently converted

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.