You are not logged in Log in Join
You are here: Home » Members » djflux's Home » Zope, IIS6 and ASP404

Log in
Name

Password

 

Zope, IIS6 and ASP404

 

Created by djflux . Last modified 2006-10-31 12:04:41.

How to get ASP404 working with IIS6 on Windows Server 2003

I have used the ASP404 method of serving up Zope from IIS on Windows 2000 for about 3.5 years.

Recently I have found the need to upgrade my server to Windows 2003. IIS6 changes the way Child URL Execution and Server Side Includes work which broke POST methods used in the forms inside Zope/Plone.

I've just started testing this code, but I think it works and I want to get some people out there testing it to verify that this kludge works :)

Add the following code below the zopeServer.Option(WinHttpRequestOption_EnableRedirects) = False line:

  Dim formData, realRequestMethod
  formData = Request.Form
  If formData <> "" Then
        realRequestMethod = "POST"
  Else
        realRequestMethod = Request.ServerVariables("REQUEST_METHOD")
  End If

After adding that code change the follow line:

  zopeServer.Open Request.ServerVariables("REQUEST_METHOD"), zopeRequest, False

to:

  zopeServer.Open realRequestMethod, zopeRequest, False

Then comment out the binaryData = Request.binaryRead(Request.totalBytes) line and change:

  zopeServer.send(binaryData) 

to:

  zopeServer.send(Request.Form)

That should be it.

I believe that this change works because the Request.Form collection will only contain data if the real request method is a POST. In all of the testing I've performed so far Zope/Plone appears to work as expected.

You can grab a unified diff patch between a stock ASP404-1.0beta2 script and my modifications here: asp404iis6.patch Not sure what good that'll do for most Windows admins, but it's there :)

I'm using some ancient code, but here's what I've tested these changes against

  • Windows Server 2003 SP1 fully updated as of 2006-10-31
  • Zope-2.7.0-b3 installed via Win32 exe
  • CMF-1.3.1
  • Plone 1.0.5
  • Archetypes 1.0.1
  • exUserFolder 0.10.0
  • ADSAuthSource
  • ADSGroupsToZopeRoles

Please test for yourself and post comments here.

Enjoy, Flux.

Comment

Discussion icon IIS 6 still problems?

Posted by: izabel at 2007-01-09

I tried your solution, but it seems there is a problem with (enctype="multipart/form-data") on form with POST method. So, it is not possible to edit folders etc... I can only log-in (because "login form" is not multpart form). Is it possible to solve this issue ?