473,396 Members | 1,864 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,396 software developers and data experts.

Rewrite asp url as aspx url?

T
Hi group,

I'm trying to create a temporary replacement scheme for a particular url
that gets generated all over an existing app. It would be very difficult to
find every spot where the url gets created. So I'm thinking of doing a url
rewrite solution where i look for the url signature at the application (or
higher?) level. The twist is that the original url is classic asp. So how
do I grab this asp url from a .net httpmodule (or other thing) and redirect
the request to an aspx page? Of course you can't map .asp files to
aspnet_isapi.dll in IIS. Can this be done?

Thanks for any ideas...
Nov 19 '05 #1
5 3455
Keep the original ASP page, and replace all of its code with a redirect to
its ASPX counterpart.

"T" <T@discussions.microsoft.com> wrote in message
news:E3**********************************@microsof t.com...
Hi group,

I'm trying to create a temporary replacement scheme for a particular url
that gets generated all over an existing app. It would be very difficult
to
find every spot where the url gets created. So I'm thinking of doing a
url
rewrite solution where i look for the url signature at the application (or
higher?) level. The twist is that the original url is classic asp. So
how
do I grab this asp url from a .net httpmodule (or other thing) and
redirect
the request to an aspx page? Of course you can't map .asp files to
aspnet_isapi.dll in IIS. Can this be done?

Thanks for any ideas...

Nov 19 '05 #2
you can map anything and everything to aspnet_isapi.dll in IIS.

we commonly map .htm .html and .asp to aspnet_isapi.dll and rewrite the url
when the request hits our web app.


"T" <T@discussions.microsoft.com> wrote in message
news:E3**********************************@microsof t.com...
Hi group,

I'm trying to create a temporary replacement scheme for a particular url
that gets generated all over an existing app. It would be very difficult to find every spot where the url gets created. So I'm thinking of doing a url rewrite solution where i look for the url signature at the application (or
higher?) level. The twist is that the original url is classic asp. So how do I grab this asp url from a .net httpmodule (or other thing) and redirect the request to an aspx page? Of course you can't map .asp files to
aspnet_isapi.dll in IIS. Can this be done?

Thanks for any ideas...

Nov 19 '05 #3
T
if i set up a mapping of .asp file to aspnet_isapi, how do i handle the many
cases where asp.dll needs to handle a request? i only want to rewrite
certain .asp requests that match a signature i'm looking for, e.g.,
MyPage.asp?mode=5 would be mapped to MyNewPage.aspx, whereas
MyPage.asp?mode=4 should be processed by asp.dll.

Here's what happened: someone wrote a GIGANTIC asp page that handles all
sorts of stuff based on a "mode." It posts to itself and takes different
paths based on which mode its in, i.e., update, display, etc. To add to the
devastation, the code in question runs inside of an iframe, so I can't
Server.Transfer or Redirect in the asp code.

thanks

"gerry" wrote:
you can map anything and everything to aspnet_isapi.dll in IIS.

we commonly map .htm .html and .asp to aspnet_isapi.dll and rewrite the url
when the request hits our web app.


"T" <T@discussions.microsoft.com> wrote in message
news:E3**********************************@microsof t.com...
Hi group,

I'm trying to create a temporary replacement scheme for a particular url
that gets generated all over an existing app. It would be very difficult

to
find every spot where the url gets created. So I'm thinking of doing a

url
rewrite solution where i look for the url signature at the application (or
higher?) level. The twist is that the original url is classic asp. So

how
do I grab this asp url from a .net httpmodule (or other thing) and

redirect
the request to an aspx page? Of course you can't map .asp files to
aspnet_isapi.dll in IIS. Can this be done?

Thanks for any ideas...


Nov 19 '05 #4
Nice. Looks like you have three options:

1. Modify the giant SWITCH statement in MyPage.asp to redirect as
necessary.
2. Map .asp to aspnet_isapi and .asp2 to asp.dll. Build a webform with
a giant SWITCH statement that redirects back to MyPage.asp2 as
necessary.
3. write an ISAPI filter with a giant SWITCH statement to fix the
incoming URLs before they make it to that page.

At any point, you could replace that switch statement with a table
lookup if you wanted to save yourself some grief and tedium.

Good luck!

Jason Kester
Expat Software Consulting Services
http://www.expatsoftware.com/

Nov 19 '05 #5
ok - you didn't mention the 'selectively' part

in that case jason about covers the options.

one question though - why do you say that you can't transfer or redirect
because it is in an iframe - why should that matter ?

"T" <T@discussions.microsoft.com> wrote in message
news:10**********************************@microsof t.com...
if i set up a mapping of .asp file to aspnet_isapi, how do i handle the many cases where asp.dll needs to handle a request? i only want to rewrite
certain .asp requests that match a signature i'm looking for, e.g.,
MyPage.asp?mode=5 would be mapped to MyNewPage.aspx, whereas
MyPage.asp?mode=4 should be processed by asp.dll.

Here's what happened: someone wrote a GIGANTIC asp page that handles all
sorts of stuff based on a "mode." It posts to itself and takes different
paths based on which mode its in, i.e., update, display, etc. To add to the devastation, the code in question runs inside of an iframe, so I can't
Server.Transfer or Redirect in the asp code.

thanks

"gerry" wrote:
you can map anything and everything to aspnet_isapi.dll in IIS.

we commonly map .htm .html and .asp to aspnet_isapi.dll and rewrite the url when the request hits our web app.


"T" <T@discussions.microsoft.com> wrote in message
news:E3**********************************@microsof t.com...
Hi group,

I'm trying to create a temporary replacement scheme for a particular url that gets generated all over an existing app. It would be very difficult
to
find every spot where the url gets created. So I'm thinking of doing
a url
rewrite solution where i look for the url signature at the application
(or higher?) level. The twist is that the original url is classic asp.

So how
do I grab this asp url from a .net httpmodule (or other thing) and

redirect
the request to an aspx page? Of course you can't map .asp files to
aspnet_isapi.dll in IIS. Can this be done?

Thanks for any ideas...


Nov 19 '05 #6

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

Similar topics

0
by: darrel | last post by:
We're using ISAPI rewrite on our site. We have a URL that looks like this: /district/2/ that gets rewritten to: /default.aspx?siteID=2
1
by: baroque Chou | last post by:
Thanks for the help available on msdn, I have succesful done the rewrite job. But there are 2 problems arise: 1.when I try to rewrite the url from say: www.yoursite.com/beverages.aspx to...
1
by: Miguel Isidoro | last post by:
Hi all, I am developing a ASP.NET 2.0 application that must use friendly URLs. As an example, a content in http://www.mysite.com/music/pearljam for instance should be rewritten to...
2
by: Max2006 | last post by:
Hi, I am using a asp.net hosting service and I don't have access to IIS MMC. I would like to implement a URL rewriting service so all urls with shape: http://domainname.com/nnnn.jpeg get...
0
by: myalog | last post by:
In the transition of a website from one domain to the other I would like to "rewrite" http://www.myoldsite.com/dir1/content/content.aspx?p1=1&p2=2 into...
0
by: George | last post by:
Can not figure out why but if I have button with PostBackUrl specified it breaks UrlRewrite. All buttons stop working. Form submits but corresponded event procedure never called. And it only...
1
by: polilop | last post by:
Is there a URL rewrite module that allows to rewrite url by looking at the database. Egxample: http://www.somesite.com/object.aspx?objectCountryId=1&objectId=22 now i look into the database, see...
3
by: aag | last post by:
Hey there! I've got an URL rewrite issue that I'm wondering if the masters out there can help with :) I have a site that resides at (for example) foo.com - it's a full site with tons of pages...
1
by: mazdotnet | last post by:
Hi all, I've installed the new Microsoft URL Rewrite Module for IIS 7.0 http://www.iis.net/downloads/default.aspx?tabid=34&i=1691&g=6 on both my laptop (Vista Home Premium) and my desktop...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.