Issue in Custom HttpHandler in IIS 7

Posted by Umaquiet under IIS on 12/8/2010 | Points: 10 | Views : 1986 | Status : [Member] | Replies : 1
I am working using custom IHttpHandler in my application. It is working fine in IIS 5. But now we are migrating to IIS 7 so we bought 2008 R2 server. Here it is not working. Kindly Help. you can reach me in Thanks in advance.

This is my web.config content:

<add key="ChartHttpHandler" value="Storage=memory;Timeout=180;Url=~/temp/;"/>
<add name="searchSettings" defaultValue="" type="System.String"/>
<sessionState timeout="2">
<compilation debug="true" targetFramework="4.0">
<add assembly="System.Windows.Forms, Version=, Culture=neutral, PublicKeyToken=B77A5C561934E089"/></assemblies></compilation>

<authentication mode="Windows"/>

<add verb="GET,POST" path="*.lst" type="App_Code.WebRequestHandler"/>
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/></system.web>
<validation validateIntegratedModeConfiguration="false"/>
<add name="WebRequests" verb="*" path="*.lst" modules="IsapiModule" scriptProcessor="%path%\aspnet_isapi.dll" type="App_Code.WebRequestHandler"/>

This is my Custom Handler Code :

public class WebRequestHandler : IHttpHandler, IRequiresSessionState
private void ProcessDataRequest(HttpContext context)
Controller controller = new Controller();

#region IHttpHandler Members

public bool IsReusable
get { return true; }

public void ProcessRequest(HttpContext context)
var segments = context.Request.Url.Segments;
var request = segments[segments.Length - 1];

context.Response.Expires = -1;

switch (request)
case "data.lst":



Posted by: Umaquiet on: 12/8/2010 [Member] Starter | Points: 25

And i am calling like this.

this.client = new WebClient();
this.client.DownloadProgressChanged += this.OnProgressChanged;
this.client.OpenReadCompleted += this.OnDataAvailable;
this.client.OpenReadAsync(new Uri("../data.lst?viewerID=viewer", UriKind.Relative), "GET");

But the ProcessRequest(HttpContext context) method is not called in IIS 7 .

Umaquiet, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response