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.
Sharing real-world experiences about C#, Dynamics CRM, Dynamics 365, Dynamics NAV/Business Central, SharePoint,PowerBI,ASP.net and more...
Showing posts with label 64 bit. Show all posts
Showing posts with label 64 bit. Show all posts
Tuesday, March 29, 2011
Sunday, June 13, 2010
How to compile C# Application for both 32 bit and 64 bit system?
I have faced this problem when one of my client try to run SMS Suit software in Windows 7 64 bit. Previously it is working perfectly in vista and windows xp 32 bit . After searching online I have found lots of solutions on it now I want to share these with you...
Solution :1
You can edit your visual studio c# project file (.csproj) and put this snippet:
1.<PlatformTarget> x86 </PlatformTarget>
inside
2.<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
Solution :2(Command-line form)
Using CorFlags to set the 32BIT flag on the executable. E.g:
corflags.exe myapp.exe /32BIT+
This will modify your exe, so you might wanna keep a backup just in case. You can also revert the flag using /32BIT- instead of /32BIT+.
Solution :3(Simplest way)
1.Right click your Project, and select Properties.
2.In properties, select the Build tab. Under Platform target, select x86.
3.Hit Ctrl+Shift+S to save all files, right click the Solution and select "Clean" to get rid of old binaries. Any builds after that should be 32 bit .
Now it is ready for both 32 bit and 64 bit OS.
This should solve the problem ! Please inform me if there is another better way.
Solution :1
You can edit your visual studio c# project file (.csproj) and put this snippet:
1.<PlatformTarget> x86 </PlatformTarget>
inside
2.<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
Solution :2(Command-line form)
Using CorFlags to set the 32BIT flag on the executable. E.g:
corflags.exe myapp.exe /32BIT+
This will modify your exe, so you might wanna keep a backup just in case. You can also revert the flag using /32BIT- instead of /32BIT+.
Solution :3(Simplest way)
1.Right click your Project, and select Properties.
2.In properties, select the Build tab. Under Platform target, select x86.
3.Hit Ctrl+Shift+S to save all files, right click the Solution and select "Clean" to get rid of old binaries. Any builds after that should be 32 bit .
Now it is ready for both 32 bit and 64 bit OS.
This should solve the problem ! Please inform me if there is another better way.
Subscribe to:
Posts (Atom)
Method 'StartWorkflowOnListItem' in type 'Microsoft.SharePoint.WorkflowServices.FabricWorkflowInstanceProvider'
Exception: Method 'StartWorkflowOnListItem' in type 'Microsoft.SharePoint.WorkflowServices.FabricWorkflowInstanceProvider'...
-
It is very common questions for new web developer how to get the client's country location to track the user.In various forum I have f...
-
There are various ways to use Single Sign on(SSO) in asp.net web application. We can use cookies, session (state server), SAML and web serv...
-
Today I have added Google Map my asp.net application successfully !! Don't worry it's not a big deal. Very easy and you will find a ...