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

  • SEARCH
  • Home
  • 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 644171
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T21:21:44+00:00 2026-05-13T21:21:44+00:00

I have an MVC2 application, and HttpHandler Library. The library, to simplify, serves an

  • 0

I have an MVC2 application, and HttpHandler Library. The library, to simplify, serves an image. The problem is that if I invoke this handler from the root page ( http://whatever/ ), everything works fine. If, however, I change the Global.asax, so the same page now has the address of http://whatever/controller/action – it doesn’t work (ALT text comes out instead of image).

I didn’t write the handler library, but I have the code; so I put a breakpoint in ProcessRequest function of IHttpHandler implementation. For good situation the breakpoint gets triggered, but for bad case it isn’t. So, I assume that the handler isn’t invoked for non-root pages.

This is what I have in system.webServer/handlers section:

<add name="ImageHandler" verb="*" 
              path="ImageLib.axd" type="ImageHandler, ImageHandler" />

The view page has

<img src="ImageLib.axd?image=img001.jpg" alt="real image here" />

I don’t know if MVC plays any role in it… the old WebForms application works fine with the same settings.

Hopefully, I provided all that I know. Of course, if something isn’t clear, I’ll be happy to explain as much as I can!

  • 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-05-13T21:21:44+00:00Added an answer on May 13, 2026 at 9:21 pm

    Try this:

    <img src="/ImageLib.axd?image=img001.jpg" alt="real image here" />
    

    The fundamental problem is that you are relatively referencing ImageLib.axd. A browser will try to access it from wherever it is…in your case, when it requests the image, it is requesting it from http://whatever/controller/action/ImageLib.axd. I am assuming you need it to request from http://whatever/ImageLib.axd.

    Note that simply adding the preceeding whack (/) is not necessarily going to solve your problem. If ImageLib.axd is in some sub folder off of your root, you would have to include that. If your ImageLib.axd handler is in a folder called handlers off of your web site root, you would do the following:

    <img src="/Handlers/ImageLib.axd?image=img001.jpg" alt="real image here" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

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.