473,386 Members | 1,706 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

ASHX - What's the secret??!

Tim
Guys

I am trying to create an ashx IHttpHandler that will provide images for
me.

This is what I have done so far.

' Start test.ashx

<%@ WebHandler Language="VB" Class="testashx" %>

' End test.ashx
' Start test.ashx.vb

Public Class testashx
Implements IHttpHandler

Public ReadOnly Property IsReusable() As Boolean Implements
System.Web.IHttpHandler.IsReusable
Get

End Get
End Property

Public Sub ProcessRequest(ByVal context As System.Web.HttpContext)
Implements System.Web.IHttpHandler.ProcessRequest

End Sub
End Class

' End test.ashx.vb

and within Webform1.aspx.vb I have
....
Image1.ImageUrl = "test.ashx"
....
Is this all i need to do? - I don't think so because the call to
test.ashx does not appear to hit the code in test.ashx.vb. (I have
tried adding codebehind=blahblah to the ashx file but no difference -
and the example I am looking at does not use this, so i shouldn't need
it.)

There is nothing else in this solution only what is shown here.
The example soultion that i am looking at on
http://www.codeproject.com/aspnet/NetPix.asp
works on my PC but I can't get my simple test solution to work. Is
there something I need to do inorder to register the HttpHandler with
the pipeline?
Or Are there some project settings I am missing?
IIS doesn't seem to need settings neither does web.config - as, again,
the example does not have anything here!
I am lost and desperate to get this going - spent far too much time on
it already!

Thanks - any suggestions very welcome :o)

Tim

Jul 26 '06 #1
3 4065
Tim
Oh

And I am running .Net 1.1 and VS2003.

Cheers
Tim

Jul 26 '06 #2
Tim,
Your ProcessRequest method doesn't "do" anything - it's just a method
signature with no code or logic in the body. Go back and re-read the article
you mention, or find a similar one.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Tim" wrote:
Guys

I am trying to create an ashx IHttpHandler that will provide images for
me.

This is what I have done so far.

' Start test.ashx

<%@ WebHandler Language="VB" Class="testashx" %>

' End test.ashx
' Start test.ashx.vb

Public Class testashx
Implements IHttpHandler

Public ReadOnly Property IsReusable() As Boolean Implements
System.Web.IHttpHandler.IsReusable
Get

End Get
End Property

Public Sub ProcessRequest(ByVal context As System.Web.HttpContext)
Implements System.Web.IHttpHandler.ProcessRequest

End Sub
End Class

' End test.ashx.vb

and within Webform1.aspx.vb I have
....
Image1.ImageUrl = "test.ashx"
....
Is this all i need to do? - I don't think so because the call to
test.ashx does not appear to hit the code in test.ashx.vb. (I have
tried adding codebehind=blahblah to the ashx file but no difference -
and the example I am looking at does not use this, so i shouldn't need
it.)

There is nothing else in this solution only what is shown here.
The example soultion that i am looking at on
http://www.codeproject.com/aspnet/NetPix.asp
works on my PC but I can't get my simple test solution to work. Is
there something I need to do inorder to register the HttpHandler with
the pipeline?
Or Are there some project settings I am missing?
IIS doesn't seem to need settings neither does web.config - as, again,
the example does not have anything here!
I am lost and desperate to get this going - spent far too much time on
it already!

Thanks - any suggestions very welcome :o)

Tim

Jul 26 '06 #3
Tim
Hi Peter

I am aware that my method doesn;t do anything, but I should be able to
hit a breakpoint on the method header. - I can on the example i have
got.

Tim

Jul 26 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Bart Adriaanse | last post by:
As VS.NET is not being very supportive in creating a ASHX http handler, i would like to use a codebehind VB file as to get intellisense features etc on it's code. I just cannot get ashx to work...
0
by: JJ | last post by:
I am trying to use .ashx files to handle dynamic image requests. The aspx page needs to pass the data to the ashx file. It was decided to not use the query string. Instead we hoped we could use the...
5
by: Roshawn Dawson | last post by:
Hi, Has anybody created an entire asp.net app using only ashx files? I know that they are simply handlers used by the asp.net worker process. I hear that they are in some respects better than...
6
by: Philipp Schmid [MSFT] | last post by:
I am trying to add a Generic Handler (ASHX) to my web site solution. In order to do that I have to specifiy an assembly name in the web.config file. But since 2.0 web sites are no longer...
0
by: Jason Chan | last post by:
I wanna to create ashx file to generate image on the fly. In VS Add New Item dialog, I cannot find the ashx template. So what I do is create a text file and rename it to .ashx However I cannot...
2
by: Max2006 | last post by:
Hi, After I right-click on my web application project file and choose "Publish ." and do the publishing, the result publishable files does not include the *.ashx files. Is it by design? How...
0
by: =?Utf-8?B?UGhpbCBKb2huc29u?= | last post by:
Hi, We have an asp.net web application with an .ashx handler that is called from javascript from the same web app. We used to run the web app on one server and the ashx calls from the...
7
by: =?Utf-8?B?QU9UWCBTYW4gQW50b25pbw==?= | last post by:
Hi, I have been using the code (some of it has been removed for simplicity) below to allow authenticated (using ASP.NET membership database) users to get a file from their archive area. It...
3
by: George | last post by:
I am doing an AJAX call using JQuery on my page to which returns JSON objects and everything works fine. Now I decided to use ashx handler instead of and simply write JSON out. Then my problems...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.