Questions tagged [httphandler]

HttpHandlers are classes that implement the IHttpHandler and IHttpAsyncHandler interfaces. This section describes how to create and register HttpHandlers and provides examples of a synchronous handler, an asynchronous handler, and a handler factory.

ASP.NET Request Processing

Introduces ASP.NET handling of HTTP requests.

Creating HttpHandlers

Discusses the creation of synchronous and asynchronous HttpHandlers.

Registering HttpHandlers

Describes how ASP.NET is configured to call an HttpHandler.

HttpHandler Factory

Describes how to generate a new handler instance for each HTTP request.

Related Sections

HTTP Runtime Support

Provides an overview of how to use IHttpModule and IHttpHandler interfaces. 

HttpModules

Provides an overview of HttpModules. 
1249 questions
9
votes
3 answers

TypeError: _this.handler.handle is not a function error

I am getting this error that this.handler.handle is not a function in my unit testing in Angular 6 using karma/jasmine. This error comes up in my command line when I type the 'ng test' command in my project folder. Chrome 67.0.3396 (Windows 10.0.0)…
Amanda Conlin
  • 91
  • 1
  • 1
  • 3
9
votes
8 answers

 characters appended to the beginning of each file

I've downloaded an HttpHandler class that concatenates JS files into one file and it keeps appending the  characters at the start of each file it concatenates. Any ideas on what is causing this? Could it be that onces the files processed they are…
IEnumerator
  • 2,960
  • 5
  • 31
  • 33
9
votes
1 answer

When to use HttpHandlers and HttpModules?

When exactly to use HttpHandlers and HttpModules? Can't I write that code in ASPX pages' code behind?
Manish
  • 6,106
  • 19
  • 64
  • 90
9
votes
1 answer

Why does ASP.NET Routing take precendence over web.config Http Handlers section?

Our shop is integrating ASP.NET MVC into a large web application that utilizes custom & 3rd party HTTP Handlers defined in web.config under system.webServer\handlers. Leveraging HTTP Handlers in this way has been great for us because we don't need…
9
votes
3 answers

Handler to add HTTP headers to HTTP request not invoked when using Axis Client API

I am using the Axis API to access Axis HTTP server. The documentation of the API can be found here. I am using the following code to add handlers to the server. service is of type java.xml.rpc.Service HandlerRegistry registry =…
Rohit Banga
  • 18,458
  • 31
  • 113
  • 191
9
votes
3 answers

Can an ASP.NET HttpHandler handle an http 400 - Bad Request?

We have an HttpHandler that deals directly with binary posts over HTTP from custom client software. The client software occasionally sends data which results in IIS 7 responding with a 400 - Bad Request. Since the "400 Bad Request" is special in…
John Lemp
  • 5,029
  • 3
  • 28
  • 36
8
votes
2 answers

Why is the ConfigurationManager.GetSection "system.webServer/handlers" not available?

I'm trying to read some configuration in my global.aspx Application_Start method. When I read ConfigurationManager.GetSection("system.web/httpHandlers") everything is fine: ConfigurationManager.GetSection("system.web/httpHandlers") …
Kees C. Bakker
  • 32,294
  • 27
  • 115
  • 203
8
votes
3 answers

Mapping specific folder to HttpHandler in web.config

Is it possible to map all file extensions in a folder to a specific HttpHandler (assuming that their file extensions are mapped to aspnet_isapi.dll in IIS) ? I've got the FLV extension mapped to ASP.NET in IIS, and have a folder named Static in my…
Mun
  • 14,098
  • 11
  • 59
  • 83
8
votes
2 answers

Modifying a Cookie's Value in a HttpHandler

I've got a cookie that I'm using to persist a user's userid but I'm having a hard time replacing it with a new value. According to MSDN, I should be able to simply overwrite the value, but it hasn't been working. I'm doing the login logic in a…
Kyle Sletten
  • 5,365
  • 2
  • 26
  • 39
8
votes
0 answers

What is the difference of RequestContext and HttpContext parameters when implementing an IHttpHandler?

I am trying to implement an IRouteHandler which returns with a fully implemented IHttpHandler. So when I implement IRouteHandler's only one method I got a RequestContext parameter. internal class MyRouteHandler : IRouteHandler,…
g.pickardou
  • 32,346
  • 36
  • 123
  • 268
8
votes
1 answer

How to prioritize Web Api Controllers over IHttpHandler?

I have a legacy project that has a single IHttpHandler implementing class that routes all the requests using a huge switch statement etc.. I am trying to introduce Attribute Routing with ApiControllers but the first one always has the priority. Is…
Michail Michailidis
  • 11,792
  • 6
  • 63
  • 106
8
votes
5 answers

asp.net file downloading - track downloaded size

I am trying to design a system for something like this with ASP.net/C#. The users pay for downloading some content (files- mp3s/PDFs,doc etc).I should be able to track the number of bytes downloaded by the user. If the number of bytes downloaded…
ram
  • 11,468
  • 16
  • 63
  • 89
8
votes
3 answers

Does ASP.NET continue reliably processing a request even after a user is navigated away via javascript?

Environment: Windows Server 2003 - IIS 6.x ASP.NET 3.5 (C#) IE 7,8,9 FF (whatever the latest 10 versions are) User Scenario: User enters search criteria against large data-set. After initiating the request, they are navigated to a results page,…
8
votes
3 answers

HTTPModules and Global.asax -- ASP.NET Page Life cycle

I have read the beautiful article about Asp.Net Page life Cycle http://www.codeproject.com/Articles/73728/ASP-NET-Application-and-Page-Life-Cycle. My understanding is the request passes through MODULE(BeginRequest,authentica,author,prehandler...)…
Peru
  • 2,871
  • 5
  • 37
  • 66
8
votes
2 answers

How to call HttpHandler from .cs file asp.net

I have created a http handler fro my Jquery ajax call. which is working fine the jquery call is mentioned below $.ajax({ url: "Services/name.ashx", contentType: "text/plain", data: { CustMobile: a, CustName: b, …
शेखर
  • 17,412
  • 13
  • 61
  • 117