Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. urlrewrite - catch all paths on iis

urlrewrite - catch all paths on iis

Scheduled Pinned Locked Moved ASP.NET
questioncsharpvisual-studiojavascriptcss
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    Hanzaplast
    wrote on last edited by
    #1

    hi guys. i am working on url rewrite module that works fine on Visual Studio asp.net development server, but not on local IIS. i will minimize my code. here is rewriter class:

    public class UrlRewrite : IHttpModule
    {
    public void Init(HttpApplication context)
    {
    context.BeginRequest += new EventHandler(context_BeginRequest);
    //context.AuthorizeRequest += new EventHandler(context_BeginRequest);
    }

        void context\_BeginRequest(object sender, EventArgs e)
        {
            HttpApplication ha = sender as HttpApplication;
        //here i want to do some coding
    

    /*
    when running on VS development server i can access all paths of all elements on page,
    such as "link" path "App_Themes/LayOut.css" or "img" path "Slike/someimage.jpg" and of course main url
    of page "one/two/three" to rewrite it to "Default.aspx?arg1=one&arg2=two&arg3=three"
    */

    /*
    when i run page on local IIS i can access only main url (context_BeginRequest fires only one time)
    so i can rewirte only main url, but i can't rewrite my css, javascript, images and other
    stuffs paths...
    */
    }
    }

    so question is: how can i access (request) at context_BeginRequest all elements in IIS like i can in VS development server?

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups