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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T00:50:05+00:00 2026-05-14T00:50:05+00:00

I am trying to process both .aspx and non-extension page requests (i.e. both contact.aspx

  • 0

I am trying to process both “.aspx” and non-extension page requests (i.e. both contact.aspx and /contact/) using a custom HttpHandler in IIS7. My handler works just fine in either one case or the other, but as soon as I try to process both cases, it only works for one. Please see Handlers snippet from my web.config below:

If i keep only mapping to “*.aspx” then all .aspx requests are processed correctly, but obviously extensionless requests won’t work:

<add name="AllPages.ASPX" path="*.aspx" verb="*" type="Test.PageHandlerFactory, Test" preCondition="" />

If i change the mapping to “*” then all extensionless requests are processed correctly, but “.aspx” requests that should still be handled by this handler stop working. Note that i added the StaticFiles entry in order to process files that are on disk like images, css, js, etc.

<add name="WebResource" path="WebResource.axd" verb="GET" type="System.Web.Handlers.AssemblyResourceLoader" />
<add name="StaticFiles" verb="GET,HEAD" path="*.*" type="System.Web.StaticFileHandler" resourceType="File" />
<add name="AllPages" path="*" verb="*" type="Test.PageHandlerFactory, Test" preCondition="" />

The crazy thing is that when i load an “.aspx” request (with the 2nd configuration shown) IIS7 gives a 404 not found error. The error also says that the request is processed by the StaticFiles handler. But I made sure to add resourceType=”File” to the StaticFileHandler in order to avoid this. According to MS this means the request is only for “physical files on disk”. Am i misreading/interpreting the “on disk” part?

My .aspx file isn’t on disk, that’s why i want to use the handler in the first place.

  • 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-14T00:50:05+00:00Added an answer on May 14, 2026 at 12:50 am

    The 2nd configuration will cause *.aspx get handled by StaticFileHandler because the files do exist so they meet the criteria for the handler. However, the handler is configured not to serve these files and produces a 404 message instead.

    A better solution would be to use an HttpModule implementation such as URL Rewrite Module to rewrite virtual paths to pages or handlers.

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

Sidebar

Related Questions

I'm trying to create a child process in another process. I am writing both
I am trying to process xml files using Hadoop's StreamInputFormat. And I am using
I am trying to process the response from paypal on my page. I found
I'm currently trying to optimize the sluggish process of retrieving a page of log
I am trying to set-up a two step signup process using Devise in Rails
I generated classes using xjc, and I am trying to process the following XML
In trying to mix precision in a simple program - using both real and
I am currently trying to create a multi-page form that uses both jQuery and
I'm trying to redirect both the standard in and out of a process that
I am trying to process 2 independent tasks using the new .NET 4.0 Task

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.