locked
url rewritten httphandler deployment to webhosting RRS feed

  • Question

  • User1415983342 posted

    Reposting (reformatting) Nov 02, 04:00 GMT (from IE7)

    I have the httphandler on shared webhosting.
    It works.

    The httphandler webapp (virtual) dir of this httphandler does not have web.config
    and the whole shared user's website has web.config with only one uncommented statement:

    <compilation defaultLanguage="c#" debug="false"/>


    Now, I change it to:

    <system.web>
     <urlMappings enabled="true">
      <add url="~/CheckLoad" mappedUrl="~/BackupLicense.ashx?key=CheckLoad"/>
     <compilation defaultLanguage="c#" debug="false">
      </compilation>
    </system.web>


    This(*) works locally (on VS2008 internal webserver)
    but not on shared hosting (with IIS6).

    What do I miss?

    (*) means calling [1a], which works only locally but on shared hosting it gives
    "The page not found" "HTTP Error 404"

    [1a] Calling as:
    http://www.MySharedSite.com/CheckLoad
    (additionally to always and evertwhere working
    [1b] http://www.MySharedSite.com/BackupLicense.ashx?key=CheckLoad
    </p>

    Sunday, November 1, 2009 5:14 AM

Answers

  • User-627724879 posted

    This is a common problem when moving from WebDev to IIS. All request processed by WebDev are routed through the ASP.NET engine. Only the file types designated to be processed in IIS are routed through ASP.NET. This means if your are rewriting wildcard extensions then you must tell IIS to send all requests through ASP.NET to be processed.

    I wrote a blog on how to do this in IIS 6, I need to update this for IIS 7. So you will have to get your Hosting provider to set this mapping up for you, or if you have a control panel for your account figure it out there.

    http://professionalaspnet.com/archive/2007/07/27/Configure-IIS-for-Wildcard-Extensions-in-ASP.NET.aspx

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, November 1, 2009 7:26 AM