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
-1
votes
1 answer

Add HttpHandler registration in web.config in runtime

I was trying to add some configuration in web.config file after the web page is started up. Such as: But when I deploy it to the IIS, there of course has an authority issue to modify the web.config file. So I need add everyone…
Howard
  • 3,638
  • 4
  • 32
  • 39
-1
votes
1 answer

HttpContext.Current is null when adding delegate handler

In one of my project I had added delegate handler to log incoming and outgoing requests. For Logging I am using Nlog. I was generating a unique Id, per request to relate logs with this specific Id. This worked fine for me. Now recently I modified…
Kamran Asim
  • 670
  • 4
  • 16
-1
votes
1 answer

ConfigureAwait(false) loses the context of an object

In my program, i'm making a request, and I log the request and the response. But using the ConfigureAwait(false), may loses the context of my "logger" object, which is logging the request in one file, and the response in another file. try { …
-1
votes
2 answers

Should I declare variables in package level but outside of http handler?

I'm using gin gonic as an HTTP framework and I need to group some paths with shared variable by like this: ur := r.Group("/") ur.Use(package.Prepare) { ur.GET("/", package.Home) } Inside the Prepare handler, I declare package variable…
TomSawyer
  • 3,711
  • 6
  • 44
  • 79
-1
votes
1 answer

public class ImageHandler : IHttpHandler

cmd.Parameters.AddWithValue("@id", new system.Guid (imageid)); What using System reference would this require? Here is the handler: using System; using System.Collections.Specialized; using System.Web; using System.Web.Configuration; using…
Ken
  • 1
-1
votes
2 answers

In GoLang How do I get the HandleFunc() function to parse a json into variables accesible outside of the function

I am trying to create a service using golang that will listen on a port for a post request containing json and would like to parse out the username and password fields of the json and save those as variables to be used outside of the function to…
antman1p
  • 514
  • 2
  • 11
  • 25
-1
votes
1 answer

Determine if Request is Legit in HttpHandler

I recently set up an httpHandler to protect my HTML files from being pulled directly by nefarious users. I had never done anything like this before, and after doing a lot of research, using an httpHandler seemed to be the best result. All the…
Nat Webb
  • 669
  • 1
  • 7
  • 18
-1
votes
2 answers

difference between httphander and httpmodule

I am trying to figure out the difference between httphandler and httpmodule. In the article mentioned below it says CodeProject our application needed URL rewriting and HTTPHandlers are a bad solution for that and should never be used for that.…
Tom Cruise
  • 1,395
  • 11
  • 30
  • 58
-1
votes
2 answers

How to know a file has been ftp'd in IIS?

We are using IIS for our ftp server and I would like to write either a c# windows service or a HTTP handler/module that would know that that a file has been ftp'd to a folder so that I can then them move it to another folder as well as updating a…
JD.
  • 15,171
  • 21
  • 86
  • 159
-1
votes
1 answer

How can i add image when i want to respone page in asp.net?

I want write simple web application to wirite any data with asp.net respone and show that line a simple image,i create image dynamically with this code: Image myImage = new Image(); myImage.Width = 50; myImage.Height = 50; myImage.ImageUrl =…
behzad razzaqi
  • 1,503
  • 2
  • 18
  • 33
-1
votes
1 answer

Web requests routing based on Geography

When we try to hit google.com from India, it routes to google.co.in Similary, In my Asp.Net web application, I would like to redirect the websites based on client's geography. Where should this be handled? Can this be handled in Web.config or…
-1
votes
1 answer

How to get values from `Login.aspx` on the client side?

How to get values from Login.aspx and Auth.aspx on the client side using JavaScript and jQuery?
vasanth
  • 1
  • 1
  • 3
-1
votes
2 answers

get the session from aspx page in a customer httphander class

i have a aspx page and custom httphandler in same domain. In the aspx page (test.aspx), i use <%@ Page Language="C#" %> <% HttpContext.Current.Session["UserID"] = "ABC"; %> to create a session variable, but when i want to call the variable…
hkguile
  • 4,235
  • 17
  • 68
  • 139
-1
votes
1 answer

Remove file extension on download using an ASP.NET HttpHandler?

I have stored file in my server, clients can download files via my page Home.aspx by clicking on an anchor, but i want to edit the original filename before launching download. How can i do it using an ASP.NET HttpHandler. Thanks in advance. This is…
Vervatovskis
  • 2,277
  • 5
  • 29
  • 46
-2
votes
1 answer

session in httphandler

I am using session in 2 http handler and also added IRequiresSessionState , IReadOnlySessionState Imports System.Web.SessionState Public Class Handler : Implements IHttpHandler , IRequiresSessionState , IReadOnlySessionState In http handler 1…
Hossein Rahmati
  • 205
  • 1
  • 2
  • 11
1 2 3
83
84