HttpHandler not getting called

  • Thread starter Thread starter Joe Reiss
  • Start date Start date
J

Joe Reiss

Hi All,

Using vs 2005, c#, ms sql 2005 asp.net web site.

Using httphandler to generate dynamic image from sql server database. Going
according to instructions from msn:

I'm using is Resuable and Process Request procedures. ProcessRequest has
logging code and calls System.Diagnostics.Debugger.launch() - never get gets
called.
I call the photo using image.Src = "abc.xyz=" + "x.y?keyid=9". I have
everything set up in Web.Config in <httpHandlers> to register the
httpHandler. This thing just refuses to work.

Please any ideas?

thnx,
Joe

I
 
Joe,

The Src attribute doesn't look correct. It appears like "page.extension" +
"page.extension?keyid=9". Is this correct?

When you view the source of the page, does the URL appear correct to what
you had set up in Web.Config?


Steve
 
Yes its correct.

Its a page + "?" + imageHandler.PublicVar + "=" + KeyID

something like.. page.aspx?keyid=10

When I view the source html output it's exactly right.
 
Joe,

Could you post the web.config section? Also, for this purpose I have often
used a generic handler (ashx file).

Just as ASPX files can be compiled on the fly (just-in-time), so can
handlers. Generic handlers have an extension of ASHX. They're equivalent to
custom handlers written in C Sharp or Visual Basic.NET in that they contain
classes that fully implement IHttpHandler. They're convenient in the same
way ASPX files are convenient. You simply surf to them and they're compiled
automatically.
(from
http://www.brainbell.com/tutorials/ASP/Generic_Handlers_(ASHX_Files).html)

You can also check out:
http://blogs.msdn.com/delay/archive...dler-interface-to-display-a-custom-image.aspx

Hope this helps,


Steve
 
Back
Top