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 6975585
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T17:23:13+00:00 2026-05-27T17:23:13+00:00

First time asking a question here so thanks in advance for your time. I

  • 0

First time asking a question here so thanks in advance for your time.

I have this issue:

I am hosting image files (jpg, png, gif) in a folder of my ASP.NET 4.0 application. I know that some people hot link these images as avatars or pictures in other forums, blogs, etc… . I would like to know where.

Searching a little, I found that I can create a custom HTTP handler to serve these files and then have the handler return me a string of the URL where it is accessed from. Unfortunately, I only did basic coding in ASP.NET and this HTTP handler stuff is a little bit over my comprehension. Could anybody point me towards a sample of how it’s done?

Many thanks!

  • 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-27T17:23:14+00:00Added an answer on May 27, 2026 at 5:23 pm

    you’ll want to implement IHttpHandler. then in the web.config map this handler to the type(s) of extensions/requests you want to handle. for example all requests for jpg or gif. IHttpHandler has 2 members to implement

    bool IsResuable {get;}
    void Process(HttpContext context)
    

    IsResuable informs asp.net whether a new handler must be initialized for every request, or if the handler can be cached. Process is where the work is done. from Context you have access to everything in the request and response.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is my first time asking a question, please be gentle! I have a
this is my first time asking a question here so apologies if I am
First time asking a question here. I have a question, I have a UIImageView
this is my first time asking a question here so I hope I am
Well this is not the first time im asking these question here but I
This is the first time i'm asking a question here at stack overflow so
It's my first time asking here (I have visited the site several times, but
I'm asking this question because it isn't the first time I saw this coding
First time asking a question here. Usually I can find my answer without having
This is my first time asking my question at stackoverflow. I'm working on a

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.