Question

I've created a handler to capture requests for classic asp files:

<system.webServer>
   <handlers>
       <add name="LegacyAspHandler" verb="*" path="*.asp"
   type="MyNamespace.LegacyAspHandler, MyAssembly" preCondition="managedHandler"/>
   </handlers>
<system.webServer>

The handler is never called. If I request an asp file that exists, IIS serves the page, and if it doesn't exist, serves a 404. So I think something in IIS must be handling classic asp files before HttpHandlers get invoked, but I can't figure out what it is.

The handler code is just boilerplate:

Imports System.Web
Public Class GameModuleHandler
    Implements IHttpHandler

    ''' <summary>
    '''  You will need to configure this handler in the Web.config file of your 
    '''  web and register it with IIS before being able to use it. For more information
    '''  see the following link: http://go.microsoft.com/?linkid=8101007
    ''' </summary>

    #Region "IHttpHandler Members"

    Public ReadOnly Property IsReusable() As Boolean Implements IHttpHandler.IsReusable
        Get
            ' Return false in case your Managed Handler cannot be reused for another request.
            ' Usually this would be false in case you have some state information preserved per request.
            Return True
        End Get
    End Property

    Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest
        'we never get here
    End Sub

    #End Region
End Class

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top