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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T18:39:29+00:00 2026-05-13T18:39:29+00:00

Many hosting companies let you define which page will be shown to the user

  • 0

Many hosting companies let you define which page will be shown to the user if the user goes to a page that does not exist. If you define some .aspx page then it will execute and be shown.

My question is, why not use this for routing. since I can parse the users URL and then do a server.transfer to the page I want. I checked and there is no redirect sent to the client and the http headers are HTTP/1.1 200 OK.

So, is this a good idea for servers that don’t have ASP.NET 3.5 SP1 or if you are not using MVC?

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-13T18:39:29+00:00Added an answer on May 13, 2026 at 6:39 pm

    You “can” do that, but why not just create an HttpModule and handle the routing there? That’s how most of the URL rewriting systems work (in actuality, it’s also how the MVC routing works since global.asax is just a pre-build HttpModule with a few extras).

    The big thing with relying on that kind of server handling you describe is that you really aren’t in control of it, and it is a hackish mechanism… by that I mean you are taking a function of the web server that has a specific purpose and design and laying a different meaning and function on top of it… which means you now have no built in handling for an actual 404 error. Plus, the mechanism you are contemplating is harder to adapt to your purpose than just using the other options available to you.

    Unless you need something special from routing, you should consider using an existing routing component such as Mod-Rewrite or one of the dozen or so other popular URL rewriters that were built before the MVC routing engine was implemented and work fine in older versions of asp.net. There are also numerous tutorials on using HttpModules, HttpHandlers, and various other techniques to do routing in asp.net webform environments.

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

Sidebar

Related Questions

Many times I have seen Visual Studio solutions which have multiple projects that share
Many applications have grids that display data from a database table one page at
I'm severely annoyed with many shared hosting providers not enabling SoapClient support on their
Instead of renting a server on Amazon and other hosting companies (which would cost
Many people have asked about Rails hosting on this site, but I'm not familiar
There are many subversion hosting companies, some free, some charge a bit/a lot. When
My webserver is hosting many apps whose path looks like http://example.com/app1/ http://example.com/app2/ ... I
Many simple MEF examples (listed below) uses AttributedAssemblyPartCatalog . Hosting MEF in an application
I user godaddy hosting and they allow database use upto 200 mb. I plan
I have a web server hosting an HTTP chat application that works with long-polling.

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.