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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T20:50:30+00:00 2026-05-10T20:50:30+00:00

I have a system which sits on a web server and generates files on

  • 0

I have a system which sits on a web server and generates files on the fly in response to HTTP requests. This is currently implemented as an HTTPHandler.

Once the files are generated, they don’t change very often, so I’d like to implement a cache.

Ideally, I’d like the web server to look at the cache folder and serve the files directly from there without any of my code having to execute (web servers are designed to be good at serving files after all, so if I can keep out of the way of that so much the better!).

What I’d like to then do is hook into the server’s ‘file not found’ event as an opportunity to create the file, drop a copy in the cache folder for the next time it’s requested and also return it to the user instead of the ‘file not found’ message.

This way, repeat requests for files will be lightening fast and my code will only get called in ‘exceptional’ cases.

So – the question is – how do I wire my code into the ‘file not found’ event in as unobtrusive and lightweight way as possible?

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. 2026-05-10T20:50:31+00:00Added an answer on May 10, 2026 at 8:50 pm

    It’s actually really simple, just point your 404 error page in IIS to your HTTPHandler.

    Request.RawUrl will look like:

    http://yourdomain.com/yourhandler.ashx;originally/requested/url 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 67k
  • Answers 67k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer Linux has a file command that uses a listing of… May 11, 2026 at 11:59 am
  • added an answer I assume by preferences you are referring to your application's… May 11, 2026 at 11:59 am
  • added an answer CommandProxy by Mike Chambers. Look it up (http://www.mikechambers.com/blog/2008/01/17/commandproxy-net-air-integration-proof-of-concept/). This nifty… May 11, 2026 at 11:59 am

Related Questions

I have a system which sits on a web server and generates files on
I have a system which is writing files to a folder using FTP. I
I have a scenario in a system which I've tried to simplify as best
I have a system in which different server processes are handling requests passed as
I have a web system which has a classical parent-children menu saved in a
I have a current system which is build as a Windows Application, and does
I have a logger system which basically is a fancy way of writing my
I have a system in place which applies calculations to a set of numbers
I have a J2EE-based system which is running currently on Apache Tomcat. We are
I have a C# app which uses a System.Diagnostics.Process to run another exe. I

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.