473,398 Members | 2,212 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,398 software developers and data experts.

HttpHandler configuration in ASP.NET 2.0

Let's say I have a class named GenericImageHandler in namespace BillRyan and
I'm storing it in the App_Code folder in a 2.0 application. What does the
web config setting look like? Here's what I'm using but each time the
application starts, I get a configuration error telling me that i'm not
specifying the type correctly. What am I doing wrong? - I'm having this
problem with both the Beta 2 and the Sept CTP. Also, I've double and tripled
checked spelling and namespaces, [the class is definitely in App_Code], have
added a space after the comma and removed it as it is below, and verified
that I don't have any spaced after the App_Code. This happens btw with all
file types

<httpHandlers>

<add verb="*" path="*.gif"

type="BillRyan.GenericImageHandler,App_Code" />

</httpHandlers>

Nov 19 '05 #1
4 3413
You shouldn't be specifying the place where the code is located.

See the example for MyHandler assembly at :

http://msdn2.microsoft.com/en-us/lib...us,VS.80).aspx


Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Español : http://asp.net.do/foros/
======================================
"W.G. Ryan [eMVP]" <WG********@discussions.microsoft.com> wrote in message
news:19**********************************@microsof t.com...
Let's say I have a class named GenericImageHandler in namespace BillRyan and
I'm storing it in the App_Code folder in a 2.0 application. What does the
web config setting look like? Here's what I'm using but each time the
application starts, I get a configuration error telling me that i'm not
specifying the type correctly. What am I doing wrong? - I'm having this
problem with both the Beta 2 and the Sept CTP. Also, I've double and tripled
checked spelling and namespaces, [the class is definitely in App_Code], have
added a space after the comma and removed it as it is below, and verified
that I don't have any spaced after the App_Code. This happens btw with all
file types

<httpHandlers>

<add verb="*" path="*.gif"

type="BillRyan.GenericImageHandler,App_Code" />

</httpHandlers>

Nov 19 '05 #2
Thanks Buddy - that fixed it.

"Juan T. Llibre" wrote:
You shouldn't be specifying the place where the code is located.

See the example for MyHandler assembly at :

http://msdn2.microsoft.com/en-us/lib...us,VS.80).aspx


Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Español : http://asp.net.do/foros/
======================================
"W.G. Ryan [eMVP]" <WG********@discussions.microsoft.com> wrote in message
news:19**********************************@microsof t.com...
Let's say I have a class named GenericImageHandler in namespace BillRyan and
I'm storing it in the App_Code folder in a 2.0 application. What does the
web config setting look like? Here's what I'm using but each time the
application starts, I get a configuration error telling me that i'm not
specifying the type correctly. What am I doing wrong? - I'm having this
problem with both the Beta 2 and the Sept CTP. Also, I've double and tripled
checked spelling and namespaces, [the class is definitely in App_Code], have
added a space after the comma and removed it as it is below, and verified
that I don't have any spaced after the App_Code. This happens btw with all
file types

<httpHandlers>

<add verb="*" path="*.gif"

type="BillRyan.GenericImageHandler,App_Code" />

</httpHandlers>


Nov 19 '05 #3
Juan - that fixed the problem but I have a dumb question. At the bottom of
the page you sent me, this code snippet is there:

<configuration>
<system.web>
<httpHandlers>
<add verb="*"
path="*.New"
type="MyHandler.New,MyHandler"/>
<add verb="GET,HEAD"
path="*.MyNewFileExtension"
type="MyHandler.MNFEHandler,MyHandler.dll"/>
</httpHandlers>
<system.web>
</configuration>

Is there a rule as to when you are supposed to use the Assembly name as
well. I noticed the obvious difference of the GET, HEAD in the verb
section, but I was wondering if there was a rule as to when you used the
assembly and/or when you leave it out?

thanks again man,

"Juan T. Llibre" wrote:
You shouldn't be specifying the place where the code is located.

See the example for MyHandler assembly at :

http://msdn2.microsoft.com/en-us/lib...us,VS.80).aspx


Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Español : http://asp.net.do/foros/
======================================
"W.G. Ryan [eMVP]" <WG********@discussions.microsoft.com> wrote in message
news:19**********************************@microsof t.com...
Let's say I have a class named GenericImageHandler in namespace BillRyan and
I'm storing it in the App_Code folder in a 2.0 application. What does the
web config setting look like? Here's what I'm using but each time the
application starts, I get a configuration error telling me that i'm not
specifying the type correctly. What am I doing wrong? - I'm having this
problem with both the Beta 2 and the Sept CTP. Also, I've double and tripled
checked spelling and namespaces, [the class is definitely in App_Code], have
added a space after the comma and removed it as it is below, and verified
that I don't have any spaced after the App_Code. This happens btw with all
file types

<httpHandlers>

<add verb="*" path="*.gif"

type="BillRyan.GenericImageHandler,App_Code" />

</httpHandlers>


Nov 19 '05 #4
re:
Juan - that fixed the problem
Great!

re: I was wondering if there was a rule as to when you used the
assembly and/or when you leave it out?
See : http://msdn2.microsoft.com/en-us/library/46c5ddfy

If the handler code is in the App_Code directory,
you do not need to specify an assembly.

The assembly doesn't exist, yet... ;-)

best,

Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Español : http://asp.net.do/foros/
======================================
"W.G. Ryan [eMVP]" <WG********@discussions.microsoft.com> wrote in message
news:7A**********************************@microsof t.com... Juan - that fixed the problem but I have a dumb question. At the bottom of
the page you sent me, this code snippet is there:

<configuration>
<system.web>
<httpHandlers>
<add verb="*"
path="*.New"
type="MyHandler.New,MyHandler"/>
<add verb="GET,HEAD"
path="*.MyNewFileExtension"
type="MyHandler.MNFEHandler,MyHandler.dll"/>
</httpHandlers>
<system.web>
</configuration>
Is there a rule as to when you are supposed to use the Assembly name as
well. I noticed the obvious difference of the GET, HEAD in the verb
section, but I was wondering if there was a rule as to when you used the
assembly and/or when you leave it out?
thanks again man,
"Juan T. Llibre" wrote:
You shouldn't be specifying the place where the code is located.

See the example for MyHandler assembly at :

http://msdn2.microsoft.com/en-us/lib...us,VS.80).aspx


Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Español : http://asp.net.do/foros/
======================================
"W.G. Ryan [eMVP]" <WG********@discussions.microsoft.com> wrote in message
news:19**********************************@microsof t.com...
> Let's say I have a class named GenericImageHandler in namespace BillRyan and
> I'm storing it in the App_Code folder in a 2.0 application. What does the
> web config setting look like? Here's what I'm using but each time the
> application starts, I get a configuration error telling me that i'm not
> specifying the type correctly. What am I doing wrong? - I'm having this
> problem with both the Beta 2 and the Sept CTP. Also, I've double and tripled
> checked spelling and namespaces, [the class is definitely in App_Code], have
> added a space after the comma and removed it as it is below, and verified
> that I don't have any spaced after the App_Code. This happens btw with all
> file types
>
> <httpHandlers>
>
> <add verb="*" path="*.gif"
>
> type="BillRyan.GenericImageHandler,App_Code" />
>
> </httpHandlers>
>


Nov 19 '05 #5

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

Similar topics

2
by: Hanse Davion | last post by:
Can anyone provide some insight on what this problem could be? I have searched the web, read forums, and all the installation documentation for the dotnetnuke feeware portal from asp.net. I am...
0
by: Bruce B | last post by:
Hi group, I'm experiencing some extreme weirdness over the last week with IIS related to it's Mappings and how .NET is behaving. I can't explain the behavior as it seems very random. Our...
4
by: Jeremy Lew | last post by:
When my HttpHandler is processing a request when installed on a particular 2003 Server machine, the Context.Session object is null. Any idea why this might be? My handler implements...
14
by: qwerty | last post by:
Hi, I am using a third party win 2003 iis 6.0 to serve my website. The web site has a httphandler which does some custom jobs. When I try to invoke the httphandler from some url call, it won't...
0
by: Chris Carter | last post by:
Hi, I created this HttpHandler, very simple: using System; using System.Web; namespace HttpHandlerTest { public class HelloWorldHandler : IHttpHandler
7
by: Adam | last post by:
Im trying to add an httphandler for all *.sgf file extensions. I have developed the handler, 1. installed it into the gac 2. added it to the machine.config: <httpHandlers> <add verb="*"...
3
by: Michael Schwarz | last post by:
Hi, I have a own HttpHandler running and configured like this in my web.config: <add verb="*" path="subfolder/*.ashx" type="Class,Assembly"/> Now, when turning cookieless Sessions on my...
0
by: pamelafluente | last post by:
I have implemented an example of HttpHandler to talk with my Windows application running on the server. I want to send some command (to do something) from IE (client) to my program running on...
4
by: Anbu | last post by:
Hi All, I'm implementing a soapreceiver class in a web site. The required httpHandler tag was also added in the web.config as below. <httpHandlers> <add verb="*" path="Receiver.ashx"...
5
by: Author | last post by:
I followed the example at http://support.microsoft.com/kb/308001/EN-US/ and created my own HttpHandler. Here is the code: using System.Web; namespace MyNameSpace { public class...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.