Compiling PyISAPIe for 64 bit Servers

33 views
Skip to first unread message

geographika

unread,
Apr 16, 2010, 6:15:38 AM4/16/10
to PyISAPIe
Hi list,

I've detailed all my steps on compiling PyISAPIe for a 64-bit
processor at http://geographika.co.uk/compiling-a-64-bit-version-of-pyisapie
Unfortunately I haven't yet got it running on IIS7.
If anyone knows of any steps I've missed, or required changes in the
code, I'd appreciate the help.

Seth G.

--
You received this message because you are subscribed to the Google Groups "PyISAPIe" group.
To post to this group, send email to pyis...@googlegroups.com.
To unsubscribe from this group, send email to pyisapie+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/pyisapie?hl=en.

Phillip Sitbon

unread,
Apr 16, 2010, 1:11:30 PM4/16/10
to pyis...@googlegroups.com
Hiya Seth,

I'm returning to the project for it's not-so-scheduled bi-yearly
update (ha) and I've got 64-bit slated for the final 1.1.0 release. I
had to redo my dev environment and an doing so I installed VS2008 SP1,
a KB patch for it, and Windows 7 SDK which includes a newer version of
the compiler. From what I've seen so far, it's running on my windows 7
machine but I can't recall if I tried it on my IIS7 (Vista) machine at
work. I want to say it was working.

I'll let you know what progress I make and thanks for the article :)
I'll post my findings in your comments section.

- PHillip

geographika

unread,
Apr 16, 2010, 3:22:51 PM4/16/10
to PyISAPIe
Great to hear you're working on a 64 bit version, and for the very
useful bridge between Python and IIS. I find it strange Microsoft
don't have this as an add-in - maybe they'll give you a call soon ;-)
I didn't go into much debugging on the server as I can't debug
remotely, but the 32bit version works fine on the same set up.
Any pointers (pun intended) appreciated. As I wrote I'm new to C++ so
I've triedto avoid touching the code.


On Apr 16, 7:11 pm, Phillip Sitbon <phillip.sit...@gmail.com> wrote:
> Hiya Seth,
>
> I'm returning to the project for it's not-so-scheduled bi-yearly
> update (ha) and I've got 64-bit slated for the final 1.1.0 release. I
> had to redo my dev environment and an doing so I installed VS2008 SP1,
> a KB patch for it, and Windows 7 SDK which includes a newer version of
> the compiler. From what I've seen so far, it's running on my windows 7
> machine but I can't recall if I tried it on my IIS7 (Vista) machine at
> work. I want to say it was working.
>
> I'll let you know what progress I make and thanks for the article :)
> I'll post my findings in your comments section.
>
>  - PHillip
>
>
>
>
>
>
>
> On Fri, Apr 16, 2010 at 3:15 AM, geographika <geograph...@gmail.com> wrote:
> > Hi list,
>
> > I've detailed all my steps on compiling PyISAPIe for a 64-bit
> > processor athttp://geographika.co.uk/compiling-a-64-bit-version-of-pyisapie
> > Unfortunately I haven't yet got it running on IIS7.
> > If anyone knows of any steps I've missed, or required changes in the
> > code, I'd appreciate the help.
>
> > Seth G.
>
> > --
> > You received this message because you are subscribed to the Google Groups "PyISAPIe" group.
> > To post to this group, send email to pyis...@googlegroups.com.
> > To unsubscribe from this group, send email to pyisapie+u...@googlegroups.com.
> > For more options, visit this group athttp://groups.google.com/group/pyisapie?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups "PyISAPIe" group.
> To post to this group, send email to pyis...@googlegroups.com.
> To unsubscribe from this group, send email to pyisapie+u...@googlegroups.com.
> For more options, visit this group athttp://groups.google.com/group/pyisapie?hl=en.

Phillip Sitbon

unread,
Apr 17, 2010, 3:26:23 PM4/17/10
to pyis...@googlegroups.com
I posted some input on your blog, very nice directions by the way :)

I am currently still doing some testing and writing up a few things
before I package the final 1.1.0 release, but it's pretty close to
done as far as the DLL code goes. If you want to try compiling it,
just check it out from svn again and hopefully it'll work fine. I'm
probably going to stop packaging a source release and force people to
check out from subversion since the SubWCRev tool is required anyway.

The most important change for people compiling code is that you can
install a non-default Python (deselect "register extensions" during
setup) in the $(SolutionDir)\Python\arch folders (i386 for 32-bit, x64
for 64-bit) and the project should auto-magically find the libraries,
includes, and even the Python core DLLs for that specific version if
you debug on the same machine (works for 2.6 at least, not sure about
2.5). I know this won't be as simple for you because you're compiling
for 64-bit on a 32-bit system, but you can manually drop the folders
in the right places too.

My goal there was to make sure that it's somewhat easier to compile
the code right out of the box. This will work with the "Release"
configurations for x86 and x64, I can't guarantee that the Debug
configuration is anything useful at the moment however.

Now, to your issue with IIS7, which ironically may not be related to
compiling from source: did you check permissions (NETWORK SERVICE) and
the "allowed extensions" configuration? IIRC, not allowing the
PyISAPIe DLL to be executed will result in 404s. As far as the
permissions go, make sure your Python64 installation folder has the
same permissions as the 32-bit folder. Also, did you use the installer
for the 64-bit version on the server?

I know this is just basic troubleshooting stuff, but it's good to get
that out of the way before considering bigger problems :)

- Phillip

geographika

unread,
Apr 19, 2010, 6:04:37 AM4/19/10
to PyISAPIe
Thanks! I now have everything set up and working :-)

I recompiled with the latest SVN with some of your suggestions, and
got my test script running.

With IIS7 / Windows Server 2008 I didn't have to grant any special
permissions (NETWORK SERVICE etc.) to Python or the PyISAPIe.dll

I think the problem was that i reused the handler for my ap, by
switching out the 32 bit DLL with the 64 bit DLL. What isn't shown
through the GUI in IIS is that each handler has a
preCondition="bitness64" or preCondition="bitness32", as I was still
using the handler created for the 32 bit DLL I was getting 404.17
errors.

I'll update my post with the latest details and your suggestions.

Thanks for the help, and the software!
I'll try and do some JMeter tests to see if the 64 bit makes a
difference.
Reply all
Reply to author
Forward
0 new messages