Using Generic HTTP Handler to pull image from DB

mic_y

Expert Member
Joined
Dec 23, 2004
Messages
1,646
Reaction score
10
Location
Slaapstad
Hey guys,

I seem to have run into a bit of a problem and due to n00bness I have no idea how to solve it.

Basically, what I am trying to do is pull an image from a DB and display it in a silverlight datagrid.

I am attempting to pull the image using a Generic HTTP handler. The code for the handler was adapted from: http://www.dotnetcurry.com/ShowArticle.aspx?ID=264&AspxAutoDetectCookieSupport=1

I originally tried to pull the image using a WCF service, but apparently that is not meant to work.

The trouble I am having now is when I try to run the project, the compiler returns an error of:
Could not create type 'FineOffenceImage.Web.GetImage' in the GetImage.ashx file which only contains 1 line as:

Code:
<%@ WebHandler Language="VB" CodeBehind="GetImage.ashx.vb" Class="FineOffenceImage.Web.GetImage" %>

I have coded the call to the database in the GetImage.ashx.vb file as per the example posted earlier (with necessary changes regarding the connection string and query).

Any ideas on what the issue is? I have never used HTTP handlers before, so I am quite lost with what is going on in the whole thing.

Any help would be greatly appreciated.

Regards,
Michael
 
ok, a bit of an update... I created a separate project, and placed the handler in there, and now, when in the dev environment, it works (i am able to run a query via the handler). As soon as I attempt to publish the handler to IIS it bombs out with the same "Could not create type" error as before :(

Any ideas on how I could make it now work in IIS?
 
Top
Sign up to the MyBroadband newsletter
X