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.
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...