locked
Httphandler in separate assembly invisible for project on remote hosting RRS feed

  • Question

  • User1096675807 posted

    Hello,

    I have a reference to a UserControl in separate assembly (.dll). That UserControl contains an ASP Image control and Httphandler class that draws an image for this Image control.

    It works well in the lockal system but hosted solution does not see this image (the red cross only).

    This is a string in the web.config of the main application:

    <add verb="*" path="CaptchaImage.ashx" type="hlgrl.CaptchaImage, hlgrl"/>

    This is a statement in the UserControl:

    im1.ImageUrl = string.Format("CaptchaImage.ashx?width={0}&height={1}", ImageWidth, ImageHeight);

     Any idea please.

    Serge.

    Wednesday, January 13, 2010 7:45 AM

Answers

  • User560403387 posted

    So that's a 404 error you're getting.
    I doubt the problem you're having has anything to do with the assembly your httphandler class is in; if it couldn't find your class, you would simply get a Configuration Error when starting your application. 

    I see you're running IIS 7 on the remote server though. Are you also testing locally on IIS 7? Are you adding your http handler in your web.config both in the system.web section and the system.webServer (assuming you're running in integrated mode) ?

    Menno

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, January 14, 2010 8:43 AM

All replies

  • User560403387 posted

    Hi,

    Do you have a link for this? Did you check whether you're simply getting a 404 (your handler is somehow not registered correctly) or a 500 (there's a problem with the code in your ashx)? Both would show a red cross.

    Menno

    Thursday, January 14, 2010 7:53 AM
  • User1096675807 posted

     Yes, it is here: http://www.exviews.com/PageLibrary/Login/NewProfile.aspx?language=EN

    There are two images there: the first one underneath label "Select country of your residence please" - doesn't work - the image we are talking about. Near the button "Submit" the same image, but it is in the same assembly with the project. It works. In the lockal system all images work well.

     

    Thursday, January 14, 2010 8:21 AM
  • User560403387 posted

    So that's a 404 error you're getting.
    I doubt the problem you're having has anything to do with the assembly your httphandler class is in; if it couldn't find your class, you would simply get a Configuration Error when starting your application. 

    I see you're running IIS 7 on the remote server though. Are you also testing locally on IIS 7? Are you adding your http handler in your web.config both in the system.web section and the system.webServer (assuming you're running in integrated mode) ?

    Menno

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, January 14, 2010 8:43 AM
  • User1096675807 posted

    Mister Menno van den Heuvel, you are excellent. It works.

    Open me two secret please:

    1. How did you know I got a 404 error? I found it over the whole broser without success. I see the red cross only.

    2. How did you know I use IIS 7? This is a riddle for me.

    Thank you very much.

    Serge.

    Friday, January 15, 2010 5:23 AM
  • User560403387 posted

    Serge,

     

    Easy. By using Fiddler ( http://www.fiddler2.com/fiddler2/ ) to log my http requests. Use it and love it.

     

    Menno

    Friday, January 15, 2010 3:05 PM
  • User1096675807 posted

    Thank you very much Menno.

    Serge. 

    Saturday, January 16, 2010 2:24 AM