I hope the title of this post isn’t too confusing; this is not about
developing for 64 bit ASP.NET, it’s about how to develop ASP.NET apps
when running under 64 Bit windows. I’ve recently been tasked to
do a bunch of 3D studio animation and to support this project, I was
ordered a new workstation. Yeah, I’m not really bragging, but it’s a
dual zeon, blah blah whatever, I’m not a hardware guy. Poor me,
right?
Anyway, I went ahead and had it equipped with XP Pro 64 Bit,
assuming this would be the best for graphics-intensive apps. Now,
I’m not so sure this was the greatest idea, since as
Audodesk/Descreet doesn’t appear to have a 64 bit version of 3D Studio, but I’ve got it installed so I’m sticking with it.
Today, I ran into my fist big hangup with 64 bitland. I had a
really hard time opening a Visual Studio ASP.NET project from source
safe. Specifically, opening the web project. Just wouldn’t
open. Now since this can be a problem on a new system, I set the
project type to “Local” to just get the dang thing to open up, and
did manage to squeeze out a build.
When I went to the server to test, I got
Service
Unavailable
...on my local web server (running on my workstation). You know, that brilliant IIS error in
the big bold <H1> in your web browser. So, I re-booted the
server, and I still got this error! After much looking around, I finally found some great
information over on David Wang’s blog, that told me just what to do,
here’s an excerpt from his post, HOWTO: Diagnose one cause of 503 Service Unavailable on IIS6:
The reason why you are getting this event is straight forward:
*
On 64bit Windows, the "bitness" (i.e. 32bit or 64bit) of a process must
match the bitness of the DLLs loaded by that process. In other words, a
64bit EXE can only load 64bit DLLs, and 32bit EXE can only load 32bit
DLLs.
* By default, IIS6 on 64bit Windows runs with 64bit W3WP.EXE worker processes
* .NET Framework 1.1 has ASP.Net implemented through 32bit ISAPI DLLs.
What
is happening when you install .NET Framework 1.1 on IIS6 on 64bit
Windows is that while IIS6 runs W3WP.EXE as 64bit, you are configuring
it to load some 32bit ISAPI DLLs. This does not work and leads to the
event log entry. Since the ISAPI DLLs are loaded for every request,
this failure immediately happens again and again, thus triggering the
"Rapid Fail Protection" health monitoring check of IIS6. This leads to
this Application Pool being taken offline and a 503 Service Unavailable
response being sent.
One way to fix this issue is to make IIS6
run W3WP.EXE as 32bit, which allows the 32bit ISAPI DLLs installed by
.NET Framework 1.1 for ASP.NET to load and run inside of it. This is
done by running the following commandline:
CSCRIPT %SYSTEMDRIVE%\Inetpub\AdminScripts\adsutil.vbs SET W3SVC/AppPools/Enable32bitAppOnWin64 1
This fix worked great. I also love his use of
the word “Bitness!” I think this will become common vernacular as more
of us get on 64 bits.. Anyhow, just wanted to relay the fix, and the
warning, and I hope you can read this … see these fonts, they were
typed in 64 bit.
-Brendan