By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,853 Members | 974 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,853 IT Pros & Developers. It's quick & easy.

ISAPI filter

P: n/a
Hi all,

I'm trying to write an ISAPI filter in Python, using the examples that
come in the "isapi" directory of the win32com package. The
installation program itself runs fine, but when I examine the
properties of my web server, my filter has a big red down arrow next to
it. But I can't seem to figure out where I should be looking to find
the trouble. If anyone can point me to the right place (or see an
obvious error in the code below), I'd appreciate it.

-Chris

from isapi import isapicon, threaded_extension
from isapi.simple import SimpleFilter
import sys
import traceback
import urllib

################################################## ########################
class ImageProtectFilter(SimpleFilter):
"Image Protection Filter"
filter_flags = isapicon.SF_NOTIFY_AUTHENTICATION

def HttpFilterProc(self, fc):
return isapicon.SF_STATUS_REQ_HANDLED_NOTIFICATION

################################################## #######################
# The entry points for the ISAPI filter.
def __FilterFactory__():
return ImageProtectFilter()

if __name__=='__main__':
# If run from the command-line, install ourselves.
from isapi.install import *
params = ISAPIParameters()
# Setup all filters - these are global to the site.
params.Filters = [
FilterParameters(Name="ImageProtectFilter",
Description=ImageProtectFilter.__doc__),
]
HandleCommandLine(params)

Dec 4 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.