httphandler

Implementing Singleton across requests to HttpHandler

I am attempting to create a singleton service that is used to process incoming requests to an HttpHandler. At the moment the service is being instantiated on every request. I make a call to the static class that holds an instance of the service, implemented as a singleton as below: public static class ServerApplication { static Servi...

Asp.net MVC deployment application issues

Hi, I continually run into all sorts of issues where the application functions fine but when pushed to my shared hosting services it fails and throws various issues. Is the notion that once the "Integrated Pipeline" is setup for the Virtual Directory that a FTP push from a "Publish" action in the project should "just work"? It seems lik...

Win7/IIS7 - why does a new Handler Mapping diasappear?

I add a handler mapping to IIS7 (on Win7). It runs just fine until I publish a new build to http://localhost. Once I publish a new build, all the mappings I added are magically gone!! [EDIT] I am also losing all of my virtual directories during a publish. [/EDIT] Any tips/tricks for this? ...

Streaming Databased Images Using HttpHandler

For a long time now I have noticed something annoying when working on Web Application projects involving databased images on my local machine. By local I mean that it's a typical environment with VS 2008 and SQL Server 2005 on my workstation. Whenever I use an HttpHandler to display the images on my local, only a portion of the images re...

Help me understand web methods?

I have a method on a page marked with the webmethod and scriptmethod tags.. The method returns a collection of objects to a jquery function as JSON data with no hassles and without me having to manually serialize it. I am now trying to recreate that same method using a HTTPHandler and was wondering why i have to now manually serialize ...

Response.Flush() throws System.Web.HttpException

...

Generic Handler Registration in Web.Config

Hi, I've added a generic handler (ashx) in my project but I can't see it's registration in web.config and it works. How come ? I mean shouldn't visual studio add it as a http handler in web.config ? Or it is because I doesn't override any pre-defined handlers instead I am calling it specifically . Thanks in advance ? ...

Submitting Form to Handler is not working

Hi, I am trying to submit a form to a handler page but nothing is working now, it doesn't even hit the handler... Here is my code : <form action="Unsubscription.ashx?actionmethod=subscribe" method="get" > <div class="h1"> <input type="text" class="input" value="enter your e-mail" name="ekey" /> <input type="submit" value="Submit" /> ...

IIS 5.1, HttpHandler based on path, NOT Working. Is it possible to fix with IIRF?

I have a reverse proxy written in C#/ASP.NET. After adding a Wildcard Mapping in IIS6 it works just fine. My problem is that I have to make this application compatible with Windows XP and IIS 5.1. At first attempt adding a wildcard file type mapped to aspnet_isapi.dll didn't work. I also tried using a file extention to no avail. My ...

C# Session not saved from HTTPHandler

Hello! I have a HTTPHandler that produces a Captcha image to the user whenever the captcha.ashx page is requested. The code for it is simple: CaptchaHandler handler = new CaptchaHandler(); Random random = new Random(); string[] fonts = new string[4] { "Arial", "Verdana", "Georgia", "Century Schoolbook" }; ...

Making this httpHandler more robust?

I have the following HttpHandler; I'm using it to push updates to the browser (where jQuery and GrowlUI are implemented) without the need for the browser to poll. I think all I've accomplished is moving the polling loop to the server. Can anyone tell me how I can make this class more robust and scalable? Here is the code. public class...

In ASP.NET, can an HTTPHandler skip the Global.asax.cs Application_BeginRequest Handler?

I'm running under IIS 6. I've got an HttpHandler that handles requests for a particular file extension (let's call the extension .foo). My Application_BeginRequest handler in Global.asax.cs performs an operation that I don't want to happen in response to .foo requests. I know that within the Application_BeginRequest handler I could co...

httphandler filetype mapping requires virtual directory (or does it?)

I am using an httpHandler to pass all requests for *.gif files to an ashx handler. i only want to do this for requests to a sub-folder within the website. The website root is called 'demo' and the subfolder is called et. So, I add a web.config file to the et folder with an entry as follows: This is not enough to pass all *.gif reque...

Calling an httpHandler from Flash with basic/Windows authentication

A project I'm working on uses a Flash component to upload files (the Flash allows for multiple file uploads at the same time and gives a nice upload progress bar). Once the upload is done, the httpContext (including the files) is being sent to: uploadhandler.axd. This works great, the uploadhandler is registered in my web.config like t...

Trouble using XmlTextWriter with MemoryStreams

I'm having trouble getting a memory stream and a XML text writer class to work together properly. Context.Reponse.BufferOutput=true; Context.Response.ContentType = "application/xml"; stmOutput = new MemoryStream(); Output = new XmlTextWriter(stmOutput, Encoding.ASCII); Output.WriteStartDocument(); Output.WriteStartElement("MyTag"); Outp...

Playing Quicktime video on iPhone using HttpHandler and IIS 5.1

I'm trying to stream QuickTime video to an iPhone from an ASP.NET web application using an HttpHandler. When hosting the web application from IIS 5.1 (Windows XP), the video player opens and then displays the error 'The server is not correctly configured'. However, when using IIS 7.5 (Windows 7), the video plays fine. The production e...

asp.net page handlers

i want to add some httphandlers for aspx pages by code via a http module. is that possible? if it is, how? thanks your advance.. ...

httphandler shared hosting deployment

I have the httphandler on shared webhosting. It works. The httphandler webapp (virtual) dir of this httphandler does not have web.config and the whole shared user's website has web.config with only one uncommented statement: <compilation defaultLanguage="c#" debug="false"/> Now, I change it to: <system.web> <urlMappings ena...

Custom asp.net handler not being hit

We have a .net 3.5 Web Application Project. It has a custom http handler defined inside a .cs class. There is also a corresponding web.config entry for the handler and the corresponding module. However, when the application is published, the handler is not being hit - I verified it through attaching VS debugger to the w3wp.exe process, a...

Caching http handler .ashx output

Im creating an image which has some text in it, for every customer, the image contains their name and I use the Graphics.DrawString function to create this on the fly, however I should not need to create this image more than once, simply because the name of the customer should hardly change, but I do not want to store it on disk. Now I ...