URL Rewrite HTTP Module

Discussion in 'Microsoft Development' started by tomfloate, Oct 6, 2009.

  1. tomfloate

    tomfloate Perch

    Hi there,

    I have created some URL Rewriting code that I have working perfectly locally under testing.

    The code is under my App_Code directory and all compiles fine, I have a line in my web.config called

    <add name="URLRewriter" type="URLRewriter"/>

    This causes my code URLRewriter (My class) to be called everytime there is a request.

    However, now that I have uploaded this to my standard jodohost directory it is not doing anything. I dont think that bit of code is even firing ... does anybody have any ideas?
  2. Stephen

    Stephen US Operations Staff Member

    using MVC?
  3. tomfloate

    tomfloate Perch

    no ... just standard shared hosting.
  4. SubSpace

    SubSpace Bass

    When using IIS6, the code in the module is only executed if the requested URL is set to be handled by ASP.NET in IIS. Try requesting something with an .aspx extension and see if your code fires then. With full access to IIS settings, you can change the defaults so pretty much everything gets run through the module, but you don't have that option in a standard shared hosting environment. This behavior is documented fairly widely throughout the net if you want more background info.

    In IIS7, .NET is more integrated and you have more options that determine when something is run through your module, but as far as I know, JodoHost uses all Windows 2003 machines, which means IIS6. IIS7 defines HTTP modules in a different config section of the Web.config, by the way: configuration/system.webServer/modules.

    PS: MVC stands for Model, View, Controller. Stephen was referring to the ASP.NET MVC Framework :)
  5. Stephen

    Stephen US Operations Staff Member

    we'll map mvc for this with a ticket, but we do keep a list as it makes it more vulnerable to DOs attack as well
  6. SubSpace

    SubSpace Bass

    The MVC Framework is one example of this, but yes, it is a common use.
    It's good to know anyway, I had started on a MVC website of my own without giving it much thought. Then again, I'm not sure I'll ever finish it :)
  7. tomfloate

    tomfloate Perch

    Hi guys ... thanks for the info.

    No we are not using MVC. Only just came across that thanks to the link.

    Its using a bit of custom code ... putting .aspx at the end subspace makes no difference unfortunately.

Share This Page

JodoHost - 26,000 hosting end-users in 100 countries
Plesk Web Hosting
VPS Hosting
H-Sphere Web Hosting
Other Services