Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / July 2005

Tip: Looking for answers? Try searching our database.

Rewrite asp url as aspx url?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
T - 22 Jul 2005 20:15 GMT
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...
Marina - 22 Jul 2005 21:01 GMT
Keep the original ASP page, and replace all of its code with a redirect to
its ASPX counterpart.

> Hi group,
>
[quoted text clipped - 12 lines]
>
> Thanks for any ideas...
gerry - 22 Jul 2005 21:21 GMT
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.

> Hi group,
>
[quoted text clipped - 8 lines]
>
> Thanks for any ideas...
T - 22 Jul 2005 21:53 GMT
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

> you can map anything and everything to aspnet_isapi.dll in IIS.
>
[quoted text clipped - 17 lines]
> >
> > Thanks for any ideas...
jasonkester - 23 Jul 2005 16:56 GMT
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/
gerry - 24 Jul 2005 18:58 GMT
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 ?

> 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
[quoted text clipped - 31 lines]
> > >
> > > Thanks for any ideas...

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.