Image

Anyone know where else I can find instructions for Launching OLE Servers from ISAPI Extensions. I followed these instructions, even went so far as to give a few other accounts permission, but my Python -- that's Python 2.2 -- script keeps given me the following error:

Traceback (most recent call last):
  File "D:\JAROD\programming\python\pycgitunes\pycgitunes.py", line 12, in ?
    iTunes = win32com.client.Dispatch("iTunes.Application")
  File "C:\Python22\Lib\site-packages\win32com\client\__init__.py", line 92, in Dispatch
    dispatch, userName = dynamic._GetGoodDispatchAndUserName(dispatch,userName,clsctx)
  File "C:\Python22\Lib\site-packages\win32com\client\dynamic.py", line 81, in _GetGoodDispatchAndUserName
    return (_GetGoodDispatch(IDispatch, clsctx), userName)
  File "C:\Python22\Lib\site-packages\win32com\client\dynamic.py", line 72, in _GetGoodDispatch
    IDispatch = pythoncom.CoCreateInstance(IDispatch, None, clsctx, pythoncom.IID_IDispatch)
pywintypes.com_error: (-2146959355, 'Server execution failed', None, None)


Here's the code I'm using, in case anyone's curious -- this is my first, REAL Python program, so maybe it's just a glitch. Hoever, this thread and the fact that it works from an Intercative shell makes me think that the ISAPI/COM security problem is the key. Anyway, code...

# Libraries
import cgi
import cgitb
import win32com.client

# COM stuff
iTunes = win32com.client.Dispatch("iTunes.Application")

# global variables
form = cgi.FieldStorage()

#####
# Subroutines

# main code
cgitb.enable()

print "Content-type: text/html\n\n"
print "Hello, world"


Any help would be appreciated -- any IIS/Python tips especially. Thanks!