Re: shortcut url's and asp.net

Discussion in 'ASP .Net' started by Phil Winstanley [Microsoft MVP ASP.NET], Jun 14, 2004.

  1. Phil Winstanley [Microsoft MVP ASP.NET], Jun 14, 2004
    #1
    1. Advertising

  2. Phil Winstanley [Microsoft MVP ASP.NET]

    Hans Kesting Guest

    "Phil Winstanley [Microsoft MVP ASP.NET]" <> wrote in message news:cak1jv$...
    > Hans,
    >
    > Right okay, so you want to create a system like http://tinyurl.com but
    > for internal usage?
    >
    > Hth,
    > Phil Winstanley
    > Microsoft ASP.NET MVP
    > http://www.myservicescentral.com
    >


    I think that's about it, yes.
    Is that possible *within* asp.net or do I need to write IIS plugins (or whatever)?

    Hans Kesting
     
    Hans Kesting, Jun 14, 2004
    #2
    1. Advertising

  3. Phil Winstanley [Microsoft MVP ASP.NET]

    Hans Kesting Guest

    "Hans Kesting" <> wrote in message news:...
    >
    > "Phil Winstanley [Microsoft MVP ASP.NET]" <> wrote in message news:cak1jv$...
    > > Hans,
    > >
    > > Right okay, so you want to create a system like http://tinyurl.com but
    > > for internal usage?
    > >
    > > Hth,
    > > Phil Winstanley
    > > Microsoft ASP.NET MVP
    > > http://www.myservicescentral.com
    > >

    >
    > I think that's about it, yes.
    > Is that possible *within* asp.net or do I need to write IIS plugins (or whatever)?
    >
    > Hans Kesting
    >
    >


    To clarify (again :-( )

    I *do* know how to store and retrieve data, I *can* redirect the visitor
    to somewhere else. What I do *not* know is how to detect that the
    visitor used a non-existent directory (and directory *only*, no "whatever.aspx" added)
    so I can retrieve the correct link based on the directory used.

    Is it possible to configure the asp.net application to catch these directories?
    Can an HttpHandler intercept it?
    Or do I need to configure IIS to redirect 404 messages to my own "redirect.aspx"
    page (a possible solution that just now came to mind)?

    Hans Kesting
     
    Hans Kesting, Jun 15, 2004
    #3
  4. "Hans Kesting" <> wrote in message
    news:u5%...
    >
    > "Hans Kesting" <> wrote in message

    news:...
    > >
    > > "Phil Winstanley [Microsoft MVP ASP.NET]" <> wrote

    in message news:cak1jv$...
    > > > Hans,
    > > >
    > > > Right okay, so you want to create a system like http://tinyurl.com but
    > > > for internal usage?
    > > >
    > > > Hth,
    > > > Phil Winstanley
    > > > Microsoft ASP.NET MVP
    > > > http://www.myservicescentral.com
    > > >

    > >
    > > I think that's about it, yes.
    > > Is that possible *within* asp.net or do I need to write IIS plugins (or

    whatever)?
    > >
    > > Hans Kesting
    > >
    > >

    >
    > To clarify (again :-( )
    >
    > I *do* know how to store and retrieve data, I *can* redirect the visitor
    > to somewhere else. What I do *not* know is how to detect that the
    > visitor used a non-existent directory (and directory *only*, no

    "whatever.aspx" added)
    > so I can retrieve the correct link based on the directory used.
    >
    > Is it possible to configure the asp.net application to catch these

    directories?
    > Can an HttpHandler intercept it?
    > Or do I need to configure IIS to redirect 404 messages to my own

    "redirect.aspx"
    > page (a possible solution that just now came to mind)?


    I don't think you can do this. You want to handle "directory" requests. It
    turns out that there are no such things as far as ASP.NET is concerned. What
    happens on a "directory" request is that IIS looks through its list of
    default documents until it finds one within the specified directory. Since
    you want to use non-existent directories, you're out of luck.

    Maybe you could use a custom 404 page - just make it 404.aspx or something.
    I don't know if IIS sends enough information to that page for you to be able
    to determine what the original request was.
    --
    John Saunders
    johnwsaundersiii at hotmail
     
    John Saunders, Jun 15, 2004
    #4
  5. Phil Winstanley [Microsoft MVP ASP.NET]

    Hans Kesting Guest

    "John Saunders" <> wrote in message news:%...
    > "Hans Kesting" <> wrote in message
    > news:u5%...
    > >
    > > "Hans Kesting" <> wrote in message

    > news:...
    > > >
    > > > "Phil Winstanley [Microsoft MVP ASP.NET]" <> wrote

    > in message news:cak1jv$...
    > > > > Hans,
    > > > >
    > > > > Right okay, so you want to create a system like http://tinyurl.com but
    > > > > for internal usage?
    > > > >
    > > > > Hth,
    > > > > Phil Winstanley
    > > > > Microsoft ASP.NET MVP
    > > > > http://www.myservicescentral.com
    > > > >
    > > >
    > > > I think that's about it, yes.
    > > > Is that possible *within* asp.net or do I need to write IIS plugins (or

    > whatever)?
    > > >
    > > > Hans Kesting
    > > >
    > > >

    > >
    > > To clarify (again :-( )
    > >
    > > I *do* know how to store and retrieve data, I *can* redirect the visitor
    > > to somewhere else. What I do *not* know is how to detect that the
    > > visitor used a non-existent directory (and directory *only*, no

    > "whatever.aspx" added)
    > > so I can retrieve the correct link based on the directory used.
    > >
    > > Is it possible to configure the asp.net application to catch these

    > directories?
    > > Can an HttpHandler intercept it?
    > > Or do I need to configure IIS to redirect 404 messages to my own

    > "redirect.aspx"
    > > page (a possible solution that just now came to mind)?

    >
    > I don't think you can do this. You want to handle "directory" requests. It
    > turns out that there are no such things as far as ASP.NET is concerned. What
    > happens on a "directory" request is that IIS looks through its list of
    > default documents until it finds one within the specified directory. Since
    > you want to use non-existent directories, you're out of luck.
    >


    I though so, I just hoped there was a way around it.

    > Maybe you could use a custom 404 page - just make it 404.aspx or something.
    > I don't know if IIS sends enough information to that page for you to be able
    > to determine what the original request was.


    That's what I finally came up with, haven't tried it yet though.

    > --
    > John Saunders
    > johnwsaundersiii at hotmail
    >
    >


    Thanks,

    Hans Kesting
     
    Hans Kesting, Jun 15, 2004
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Chetna Joshi
    Replies:
    0
    Views:
    527
    Chetna Joshi
    Jul 5, 2003
  2. Hans Kesting

    shortcut url's and asp.net

    Hans Kesting, Jun 14, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    566
    Hans Kesting
    Jun 15, 2004
  3. Phil Winstanley [Microsoft MVP ASP.NET]

    Re: shortcut url's and asp.net

    Phil Winstanley [Microsoft MVP ASP.NET], Jun 14, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    437
    Phil Winstanley [Microsoft MVP ASP.NET]
    Jun 14, 2004
  4. Richard Townsend

    Resolving windows shortcut to url

    Richard Townsend, Sep 21, 2007, in forum: Python
    Replies:
    4
    Views:
    563
    Richard Townsend
    Sep 21, 2007
  5. JB
    Replies:
    1
    Views:
    6,272
    Jason Keats
    Sep 29, 2010
Loading...

Share This Page