Groups · Blog · Home
Psst! Did you know DevelopmentNow is a mobile web site design agency?

Contact us for help mobilizing your site, or to sign up for our beta Mobile Web SDK!

Reply to "adding a HTTPHandler ASP.NET 2.0" on asp.net:

Your Name  
Email Address
(optional)

NOTE: We will never share your email address with a third party, but your email address
may be displayed publicly on our site next to your post, allowing people see your email
address and contact you. If you do not want your email displayed publicly or seen by other
people, leave this field blank.
Subject  
Message  
Spam Protection
Enter the code into the field below. If you can't read the code, reload the page.

NOTE: DevelopmentNow is an open resource for all techies. Please make your posts relevant
and helpful. We monitor all posts.

Users who repeatedly submit profane or garbage posts may be blocked, banned, and/or
have their ISPs notified for abuse.


Original Thread:

adding a HTTPHandler ASP.NET 2.0 Alexandre
1/31/2006 5:15:36 PM
Hi,

I have created an HTTPHandler in ASP.NET 2.0

I now the way to add it in the web.config but my question will be
stupid...

when I compile my application in asp.net 2.0 from vs 2k5...
umm what is the name of the assembly that is produced? I cannot seem to
find it anywhere on my server, I ve tryed to publish, compile and still
I cannot see the dll that is being produced.

so my question is this, since my HTTPHandler is in my asp.net project
and that I cannot find the produce assembly,

what assembly name do I reference ?

Best regards,
Alexandre Brisebois
Re: adding a HTTPHandler ASP.NET 2.0 David Barkol
1/31/2006 5:44:01 PM
Alexandre,

The compilation model has changed in ASP.NET 2.0. By default, you do
not create assemblies for your projects. Here is a link that will
explain the changes:

http://msdn.microsoft.com/msdnmag/issues/06/01/ExtremeASPNET/

David Barkol
www.neudesic.com
Re: adding a HTTPHandler ASP.NET 2.0 Alexandre
1/31/2006 5:58:36 PM
David,

I found some informatino
registered my handler on a specific extention bu when ever I try to use
the handler its as it it never goes to it and I get a 404 error.

here is how I register my handler:
<httpHandlers>
<add verb="*" path="*.doc" type="CervoHandler"/>
</httpHandlers>

the code is in my App_Code/

this is my handler,

public class CervoHandler : IHttpHandler
{

public void ProcessRequest(HttpContext context)
{
string strCurrentPath = context.Request.Path.ToLower();
context.Response.ContentType = "text/plain";

context.Response.Write(Live.Cervo.Server.AbsoluteRedirect.FrameRedirect(strCurrentPath));
}

public bool IsReusable
{
get
{
return true;
}
}

}


now everything complies, web.config does not complain, I just get a
404.
then again I have the

<add verb="POST,GET" path="ajaxpro/*.ashx"
type="AjaxPro.AjaxHandlerFactory, AjaxPro.2"/>

and its working fine, so I'm kind of lost right now trying to figure
out why my new handler is not being used...

can you shed some light ?

Regards,
Alexandre Brisebois
DevelopmentNow Blog