HttpModule has issues on the server but not on the development machine! RRS feed

  • Question

  • User1779468316 posted

    Okay, I've switched from trying to make things with with an HttpHandler and am now using an HttpModule.

    Everything works perfectly on the development machine, but the server is another story...

    Server issues:

    1) Background jpg images are not being displayed. Of course on the development machine everything appears as it should.

    2) There is a page error coming from the server:
    something about an object expected... Of course this never happens on the developmnent machine.

    3) When I try a url like: http://www.my-msi.net/Admin, which works on development, on the server I get back:

    The page cannot be found

    Any suggestions?



    Wednesday, May 20, 2009 2:11 PM

All replies

  • User-1136466523 posted


    From your description, it seems that you have an httpmodule and it works on development side, but fails on product machine, right?

    As it works in your local side, it indicates that the logic of your HttpModule works. And I think the cause of the issue is that you didn't setup the module properly on your product side.

    You may try the following article, and especially for "Deploying Module" part.



    Sunday, May 24, 2009 11:18 PM
  • User1779468316 posted

    Thanks, but my issue is somewhat different.

    The httpModule is being executed just fine, as evidenced by the black bar at the bottom of each page on my site which is coming from a EndRequest event in my handler.

    The problem is that something in the IIS Pipeline is detecting that the url doesn't exist and returning a 404 error before my handler gets a chance to run it's BeginRequest method.

    I need to find a way to stop this from happening, and the sooner the better.

    Having just checked the server log, the specific error I get is 404 0 2

    Monday, June 1, 2009 2:14 PM
  • User1040459954 posted

    I know on my development machine, the module's Begin_Request event is raised for every file type (even files that don't exist), but running the module from an IIS server the event is only fired for URLs that are mapped to the ASP engine (aspx files).

    Not sure if that helps.

    Wednesday, September 23, 2009 6:55 PM
  • User-627724879 posted

     Most likely you have not mapped .jpg to be processed by the ASP.NET engine in IIS. All requested are processed by the ASP.NET engine in WebDev (development server included with VS). But IIS only maps the standard .aspx, .ascx, .ashx, etc file extensions. All other file extensions must be mapped just like those in order for them to be processed by ASP.NET.

    Here is how to map all extensions through IIS 6. You should only do that if you really need to because you will take a performance hit. You should really just do the file extensions you really want. http://professionalaspnet.com/archive/2007/07/27/Configure-IIS-for-Wildcard-Extensions-in-ASP.NET.aspx

    Monday, September 28, 2009 8:18 AM