Mino – The UC Guy

Microsoft Unified Communications Blog

x64 Bit and OCS

Posted by Mino on October 1, 2008

I faced problem in implementation Client Web Access server on windows 2003 R2 SP2.

The problem prevent client web access…first I thought it is configuration problem but when I checked the event viewer I saw that Error

ErrorID : 2274

Source : W3SVC-WP

This error on CWA server related to cwsauth.dll file that can’t be loaded.

I contact Microsoft for the error and got the following replay:

    Support for 64-bit Operating Systems

    Office Communications Server 2007 supports the following tested 64-bit configurations:

  • The 64-bit edition of SQL Server™ 2005 SP2 on the Back-End Database of an Enterprise pool or the Archiving and CDR database.
  • Running the 32-bit version of the Access Edge Server on 64-bit hardware with WOW (Windows on Windows) 64 mode on the 64-bit edition of Windows Server 2003 SP1 and later.
  • Running the 64-bit kernel driver component of the A/V Edge Server natively on 64-bit hardware plus the A/V Edge Server service component with WOW64 mode on the 64-bit edition of Windows Server 2003 SP1 and later.
  • Running the 32-bit version of Standard Edition server on 64-bit hardware with WOW64 mode on the 64-bit edition of Windows Server 2003 SP1 and later.

Like you see it does not give any answer for my problem.. Actually deploying OCS in X64 bit system is not the best practice since the setup for OCS and the console run under the WOW64 subsystem since they are 32bit programs.

I searched the internet and find more problems related to this problem

Comment : Deploy your OCS server in win X86 mode..It is better.

Aside:Actually, I think your situation has a better solution that solve X64 problem. I think it is known issue with application running in IIS in WOW64 mode.

If you check your Event Log entries, you will likely find several of the following entry, followed by another entry declaring that the Application Pool is being disabled.

Event Type: Error
Event Source: W3SVC-WP
Event Category: None
Event ID: 2274 

Could not load all ISAPI filters for site/service.

I think 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 ( the problem of the cwsauth.dll file ).
  • By default, IIS6 on 64bit Windows runs with 64bit W3WP.EXE worker processes
  • .NET Framework 2 has ASP.Net implemented through 32bit ISAPI DLLs.

What is happening when OCS wizard install .NET Framework 2 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 .

One way to fix this issue is to:

  1. Change IIS6 run W3WP.EXE as 32bit
  2. *** IMPORTANT *** Then restart the CWA Application Pool that returns the error since it is stopped. You cannot fix any error without restarting the Application Pool.

Changing IIS6 to run W3WP.EXE as 32bit allows the 32bit ISAPI DLLs installed by .NET Framework 2 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 command switches IIS6 into running WOW64 (i.e. 32bit compatibility) mode on 64bit Windows on-the-fly so that IIS6 can immediately run 32bit ISAPI DLLs… unless that Application Pool is ALREADY returning 503 errors, in which case you MUST restart the Application Pool to have the bitness switch take effect. It makes sense because a 503 error means the Application Pool is offline and not running, so you must restart it to have setting changes take effect.

You can do this by either:

  • Restarting the Application Pool in question
  • Restarting IIS
  • Reboot the server
    SHUTDOWN -r -t 0

Now, I cannot guarantee that this works for you because you may have other applications that must run as 64bit, in which case you have a conflicting need to simultaneously run 32bit and 64bit code in IIS6, which is not allowed.

See KB 895976 for more details.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: