Results 1 to 12 of 12

Thread: [2005] Issues with re-writing URLs and Global.asax

Threaded View

  1. #1

    Thread Starter
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985

    Question [2005] Issues with re-writing URLs and Global.asax

    So I setup Global.asax to manage my URLs and it works great in my development environment (running on the Visual Studio server) but when I publish the site and place it under IIS (IIS 7; Vista) to test it, it doesn't seem to work at all.

    Is there something I'm missing?

    All of my URL re-writing is done in the Application_BeginRequest event using Context.RewritePath.

    Small snippet:
    Code:
    List<string> Args = new List<string>(HttpContext.Current.Request.Path.Split('/'));
                Args.RemoveAll(EmptyString);
                if (Args.Count > 0)
                {
                    switch (Args[0].ToUpper())
                    {
                        case "ABOUT":
                            Context.RewritePath("/Pages/About.aspx");
                            break;
                     }
                }
    Would it be better to convert to using an Http Handler?
    Last edited by Kasracer; Aug 21st, 2008 at 07:33 PM.
    KrisSiegel.com - My Personal Website with my blog and portfolio
    Don't Forget to Rate Posts!

    Free Icons: FamFamFam, VBCorner, VBAccelerator
    Useful Links: System.Security.SecureString Managed DPAPI Overview Part 1 Managed DPAPI Overview Part 2 MSDN, MSDN2, Comparing the Timer Classes

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width