473,321 Members | 1,667 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,321 software developers and data experts.

Intercept .asp requests and redirect to corresponding .aspx page

I'm hoping someone here can help me. We have a rather large site
that's undergoing a conversion from Classic ASP to .Net. It's pretty
much been rewritten already. Let's say there was a /Travel.asp page,
the new corresponding .Net page would be /Travel/Default.aspx

We can easily create a config (xml) file with entries for each page
and it's corresponding redirect page.

But the question is, how do I intercept these requests and then
redirect to the correct converted page?

Someone in our department suggested that HttpHandler may be the
answer, but in setting that up, we run into errors with the way the
site is currently coded. It seems all functions and subs must be
between <script></scripttags rather than <% %>. Otherwise, we get
the following error:

"Statement cannot appear within a method body. End of method assumed."

There's no way this would be a feasible solution seeing as how large
our site is, and to be honest, how poorly it was designed in the past.
Think of the spaghetti model...

So I think that option is out - unless someone has gotten this to work
and I'm just doing something wrong.

Basically I'm thinking any option that would require asp.net's dll to
process our .asp pages would be a no-go because of this.

So then I've read about ISAPI filters, and from my understanding,
incoming requests to IIS are intercepted, but when it goes to the
final page, the correct .dll will process the page still. No changes
required to which .dll process which extension. Before I go digging
in this direction, I was hoping for a little advice.

One other final way would be just to call a function in one of our
master includes (I'm sure hoping this include is in every page) and
handling the logic in there.

Thanks in advance,

Chris T.
Nov 17 '08 #1
0 1271

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

19
by: Joshua Beall | last post by:
Hi All, I would like to setup my site so that when a page is request that does not exist, transfer is instead passed to a certain page that I specify. For instance, if the user requests...
13
by: Kai Grossjohann | last post by:
It seems that Ctrl-N in Mozilla opens a new empty browser window. That's fine, I don't need to do anything about it. But Ctrl-N in IE appears to clone the current window. Is there a way to...
0
by: Jiong Feng | last post by:
Hi, I have a ASP.net application, which is in root folder. I hope my http module to intercept requests like: http://localhost/abc/def http://localhost/abc/def/ http://localhost/abc/ where...
1
by: Brian Smith | last post by:
Good afternoon. How can I force all images and static html files within an ASP.NET Web Application to be redirected if the user has not logged in yet via Forms Authentication. For example, I...
25
by: moondaddy | last post by:
I have an application where users need to upload images and in my web.config file I have a setting like this: <httpRuntime maxRequestLength="512" /> Which restricts image larger than 500k from...
1
by: super todd | last post by:
user launches: GET http://www.somewhere.com/someVirtual we need to intercept and redirect to: http://www.somewhere.com/handler.aspx?virtual=someVirtual Any ideas how? The key here is...
3
by: jeff29_b | last post by:
I have customers posting data to an asp page. I would like to respond to their request from an asp.net page without doing a response.redirect from the asp page. Is there some way to do a...
0
by: rsiena | last post by:
When a page is requested in the .net architecture I believe there are a number of events that happen prior to .net actually trying to find the page in the file system. I would like to intercept...
7
by: ADN | last post by:
Hi, I am creating a custom HTTPModule to intercept the request of when the user is attempting to retrieve a session variable. For instance, if I set a session variable in my code like so: ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.