Tuesday, March 29, 2011

How to run 32-bit ASP.NET Applications on 64-bit Windows server

In my workstation I have used 32bit PC. There is no problem every this is working nice. But an unexpected situation arise recently when I try to deploy my application in to a 64 bit windows server. I never face this problem before.

Don't worry Technet library(Microsoft) is there. Just one line need to execute to solve my problem.

Actually I need to configure IIS to run 32-bit ASP.NET Applications on 64-bit Windows server.For this, we must configure IIS to create 32-bit worker processes. For more information about running 32-bit applications on 64-bit Windows.

IIS cannot run 32-bit and 64-bit applications concurrently on the same server.To enable IIS 6.0 to run 32-bit ASP.NET applications on 64-bit Windows.

Follow this steps:


1.Open a command prompt and navigate to the %systemdrive%\Inetpub\AdminScripts directory.

2.Type the following command:
cscript.exe adsutil.vbs set W3SVC/AppPools/Enable32BitAppOnWin64 true

3.Press ENTER.

Now your 64 bit server is ready for run 32 bit application.

Some Important information

Before you configure IIS to run 32-bit applications on 64-bit Windows, note the following:

1.IIS only supports 32-bit worker processes in Worker Process Isolation mode on 64-bit Windows.

2.On 64-bit Windows, the World Wide Web Publishing service can run 32-bit and 64-bit worker processes. Other IIS services like the IIS Admin service, the SMTP service, the NNTP service, and the FTP service run 64-bit processes only.

3.On 64-bit Windows, the World Wide Web Publishing service does not support running 32-bit and 64-bit worker processes concurrently on the same server.

After configure problem may occurs

After you configure IIS 6.0 to run 32-bit Web applications, IIS stores 32-bit DLLs and ISAPIs in the %windir%\syswow64\inetsrv directory. All other IIS files, including the MetaBase.xml file, are stored in the %windir%\system32\inetsrv directory.

File access to the System32 and sub directories are transparently redirected based on the bitness of the process making that file access (64-bit processes have full access, while 32-bit processes have access to System32 redirected to Syswow64).

If your legacy applications have specific 32-bit file access needs and you notice application failures, see if the application needs to reference the new %windir%\syswow64\inetsrv to resolve the problem.

For more information visits here.

2 comments:

Anonymous said...

Hi,Ahsan we have asp.net 3.5 website setup its build on 32 bit system,once we use 64 bit win7 then it's not installing.pls.. help me.

Anonymous said...

Hi,Ahsan we have asp.net 3.5 website setup its build on 32 bit system,once we use 64 bit win7 then it's not installing.pls.. help me.

Method 'StartWorkflowOnListItem' in type 'Microsoft.SharePoint.WorkflowServices.FabricWorkflowInstanceProvider'

Exception: Method 'StartWorkflowOnListItem' in type 'Microsoft.SharePoint.WorkflowServices.FabricWorkflowInstanceProvider'...