473,811 Members | 2,714 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How can i make my http handler

Hi
i want to make my own http handler
can ne one help me or Guide how to do??

Apr 18 '06 #1
1 1122
It's pretty simple.

You create a class that implements the IHttpHandler interface.

You then implement the 2 methods of the interface:

public void ProcessRequest( HttpContext context);
public bool IsReusable{get; }

Here's a simple example:

namespace Test
{
public class SampleHandler : IHttpHandler, IRequiresSessio nState
{
public void ProcessRequest( HttpContext context)
{
context.Respons e.Buffer = true;
context.Respons e.ContentType = "text/xml";
context.Respons e.Write("<root> <node>Hello</node></root>");
context.Respons e.Flush();
context.Respons e.End();
}

public bool IsReusable
{
get { return true; }
}
}
}

compile the class, drop it in your bin and add the handler to your
web.config.

If you want, you can download my AMF.NET handler - it let's flash movies
call .NET code. The amf implementation won't be of any interest to you, but
the web documentation explains the web.config in more detail and you can
look at the GatewayHandler. cs class:
http://amfnet.openmymind.net/

Karl
--
http://www.openmymind.net/

"Chintan" <ch************ **@gmail.com> wrote in message
news:11******** **************@ i40g2000cwc.goo glegroups.com.. .
Hi
i want to make my own http handler
can ne one help me or Guide how to do??

Apr 18 '06 #2

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

Similar topics

7
9293
by: Michael Foord | last post by:
#!/usr/bin/python -u # 15-09-04 # v1.0.0 # auth_example.py # A simple script manually demonstrating basic authentication. # Copyright Michael Foord # Free to use, modify and relicense. # No warranty express or implied for the accuracy, fitness to purpose
5
2008
by: Chris Hughes | last post by:
I have an environment with many thousands of client machines uploading data files several times each day to a web server via HTTP PUT. To avoid disk I/O (for performance), I am implementing a HTTP handler to intercept and process incoming data without touching the disk. I cannot detect PUT requests with my handler (don't know if this is even supported), so I'm redirecting all requests to the handler as POST using an ISAPI filter. I...
0
1900
by: Anonieko Ramos | last post by:
Answer. Use IHttpHandler. thanks Ro ry for coming up with this code. It processes css file to add variables. neat idea using System; using System.IO; using System.Text; using System.Text.RegularExpressions; using System.Web; using System.Web.Caching;
0
870
by: Jorge Ribeiro | last post by:
Hello I've an ASP.Net app that consumes a web service. In my first page I have a login that when submited sends the username and password to the web service for validation... so far so good. My problem appears when I was trying to make a http handler to process incoming requests to another part of my app. After writing the handler i made the proper reference in my web.config file... something
7
2763
by: mortb | last post by:
I have written a custom http handler and added it to the web.config file <httpHandlers> <add verb="GET" path="ITImageService.axd" type="ITImageService.ITImageGetter,ITImageService" /> </httpHandlers> The code for the handler looks like: public bool IsReusable { get { return true; } }
3
1159
by: Mark Olbert | last post by:
I have a custom http handler set for an ASP.NET site which handles requests for ".scef" pages. It works fine once IIS is properly configured. I've noticed something about the handler, though, that I want to confirm. Let's say my site has a "virtual" page that the handler should generate called www.scef.us/test2.scef. If I enter that address in the address bar of a browser -- and the site's ASP.NET process isn't running (it's not a...
2
1815
by: wwwmike | last post by:
Hello everybody. I developed a simple HTTP Handler on my local machine WIN XP and the Handler get called. Everyting worked fine However, when I moved sources to my hosting provider the HTTP Handler did not work anymore. This time I just got an error message. "HTTP 404 - File not found" URL Example:http://www.mypage.com/images/picture_123.gif
3
1605
by: shapper | last post by:
Hello, I have been using Http handlers and I have two questions: 1. What does Property IsReusable really does and when should I use it? 2. And why should I add an httpHandler to my Web.Config? <configuration> <system.web>
6
2841
by: =?Utf-8?B?cHJhZGVlcF9UUA==?= | last post by:
I am trying to create a simple HTTP handler in ASP.net 2.0. I am using VS 2005. I am trying to handle a custom extension file givein in the URL. I have also created the following entry in the web.config file <httpHandlers> <add verb="*" path="*.imgw" type="Customhandler.Handler,Handler" /> </httpHandlers> following is the code in Handler.ashx file
0
1067
by: swigerb | last post by:
I have created an HTTP Module and an HTTP Handler. The HTTP Module is responsible for encrypting and decrypting all querystring parameters, which works fine. The HTTP Handler is to act as a proxy for calls to a specified CGI executable. Issue: As soon as I configure the Handler within the Web.Config file to run and begin debugging the Handler and Module...then access a "test.htm" page with an anchor tag containing a url with a...
0
10647
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10386
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10398
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9204
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7669
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6889
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5554
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4339
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3017
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.