Tech Off Thread

15 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

Custom Niner Pages

Back to Forum: Tech Off
  • User profile image
    itprochris

    I see that the new Channel 9 has custom pages for each Niner (http://channel9.msdn.com/niners/itprochris for example). How would one acheive this? Are they aspx pages?

    Thanks!

  • User profile image
    dotnetjunkie

    I'd like to know this too, because directories are not handled by the ASP.NET isapi runtime!

    How did you do it Adam or Charles?

  • User profile image
    dotnetjunkie

    It's the same with /tags/... by the way!

    So please MS, share with us how you implemented this, I'd like to use it in some of my websites too!

  • User profile image
    AdamKinney
  • User profile image
    Maurits

    A custom 404 handler... I thought so Smiley

  • User profile image
    W3bbo

    ...wouldn't it be eaiser just to install a URL Rewriting ISAPI Filter?

  • User profile image
    AdamKinney

    I mentioned that we looked at those, but for our purpose this was the most effective solution.  If we expand on friendly url target we may have to go to something more robust.

  • User profile image
    W3bbo

    AdamKinney wrote:
    I mentioned that we looked at those, but for our purpose this was the most effective solution.  If we expand on friendly url target we may have to go to something more robust.


    ...but doesn't using a 404-method return a HTTP 404 or some other error to the client, rather than a 200-OK?

  • User profile image
    AdamKinney

    I'd have to test some more to see if the client ever gets wind of the 404 error.  My guess is no, since its all done on the server side.  But I'll check and see.

  • User profile image
    Minh

    It doesn't seem to return 404. My quickie WebClient test would raise a WebException for a true 404, but no exceptions for the vanity url.

  • User profile image
    Charles

    By instructing ASP.NET to "handle" 404 errors by running a page at a specific URL means that ASP.NET will not send an error message to the client...

    C

  • User profile image
    Harlequin

    Charles wrote:
    By instructing ASP.NET to "handle" 404 errors by running a page at a specific URL means that ASP.NET will not send an error message to the client...

    C


    Yup, start looking into HttpHandlers, they're quite handy.

  • User profile image
    sbc

    Using a custom 404 saves you having to tweak IIS. I've used 404 pages to redirect for a while now. When I want a new redirection I just add another IF statement and redirect.

    Much simpler than writing your own HttpHandlers, plus it works with folders as well as any files so is very useful on shared hosting accounts (or when you have no access to IIS). As long as you are directing users to a page/folder that does not exist you will always get a 404 error (and redirect before the user sees that page).

  • User profile image
    W3bbo

    Hmm, I've noticed something.

    The HTTP1.1 RFC doesn't have a 30X code for "Now redirecting you here for whatever reason". Instead, I noticed, servers give out "301 Moved Temporarily" or "302 Moved Pernamently"

    This just doesn't "seem right" to me.

  • User profile image
    Maurits

    The 301 is probably what you want.  The 302 was designed to allow browsers to update bookmarks.  But none of them do, AFAIK.

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.