URL Redirect using RULES xml file and Application_BeginRequest

Last post 05-04-2008 4:44 PM by DigiMortal. 1 replies.

Sort Posts:

  • URL Redirect using RULES xml file and Application_BeginRequest

    05-04-2008, 6:49 AM
    • Loading...
    • mpavas
    • Joined on 02-19-2007, 10:09 PM
    • Posts 53

    I am trying a URL redirection by wrting a code in Application_BeginRequest in global.asax and using a rule.xml file Below is the scnerio #1 user enters a path http://sitename/project/Article06/issue6 This particlar folder "Article06/issue6"is not on the vistual direcory or on website. In Application_BeginRequest i read this path and if the path is equal to Article06/issue6 i redirect him to some other page. The code works fine when it is executed from visual studio. But when i deploy this in IIS it does'nt even go to Application_BeginRequest method of global.asax it gives me 404 error Any idea why it is not working on IIS and how can I solve it

    Pavas
  • Re: URL Redirect using RULES xml file and Application_BeginRequest

    05-04-2008, 4:44 PM
    Answer
    • Loading...
    • DigiMortal
    • Joined on 01-10-2007, 2:22 PM
    • Tallinn, Estonia
    • Posts 304
    Web development server (Cassini) that comes with VS handles all requests through ASP.NET. If you are using IIS then only specific types of files are going to ASP.NET handlers. If you need all files to be handled by ASP.NET then you should put up a rule in IIS that *.* is handled by ASP.NET ISAPI handler.
    Don't forget to mark solution providing post as "Answered".
    It helps others to find correct solutions!

    Also visit my ASP.NET blog!
Page 1 of 1 (2 items)