Greetings. We're migrating a 32 bit web application from a Windows 2003 32bits server to Windows 2008 R2 64bits.
We rebuilt the web application as x64 and redeployed it.
Our application calls some java from a command prompt. If we run the application in 32 bits mode, it works fine, open a 32bit cmd window and we see the java output.
When we compile the application and take out the "Allow32BitsApplication" setting in the application pool, the command prompt isn't called anymore...
What puzzle us is that if we run the website straight from IIS, on the 64bits machine, we clearly see the application is in 64bits and not *32. As soon as it hits the line above it opens a 32 bits cmd ............. and complains as it can't run our 64bits
compile java.
Does anyone know if there's a setting somewhere to fix that problem or help troubleshoot it ?
patrickatmon...
Member
3 Points
15 Posts
64bits web application keeps calling 32bits command prompt
Nov 15, 2012 06:27 PM|LINK
Greetings. We're migrating a 32 bit web application from a Windows 2003 32bits server to Windows 2008 R2 64bits.
We rebuilt the web application as x64 and redeployed it.
Our application calls some java from a command prompt. If we run the application in 32 bits mode, it works fine, open a 32bit cmd window and we see the java output.
When we compile the application and take out the "Allow32BitsApplication" setting in the application pool, the command prompt isn't called anymore...
We call a basic :
ProcessInfo =new ProcessStartInfo(@"C:\Windows\System32\cmd.exe" ......... )
What puzzle us is that if we run the website straight from IIS, on the 64bits machine, we clearly see the application is in 64bits and not *32. As soon as it hits the line above it opens a 32 bits cmd ............. and complains as it can't run our 64bits compile java.
Does anyone know if there's a setting somewhere to fix that problem or help troubleshoot it ?
Thank you very much.
PashBash
Member
371 Points
81 Posts
Re: 64bits web application keeps calling 32bits command prompt
Nov 22, 2012 02:51 PM|LINK
see if this helps..
http://stackoverflow.com/questions/8453277/how-can-32-bit-cmd-exe-launch-64-bit-cmd-exe-in-windows-2003-x64
css-chlukito
Member
376 Points
48 Posts
Re: 64bits web application keeps calling 32bits command prompt
Nov 23, 2012 02:15 AM|LINK
Hi,
Please take a look at below forum, it show you code that provide correct path for accesing 64 bit command prompt.
http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/a17b0620-1ea7-4b41-abb8-0270298974ce/
private string Determine_System_Folder() { if (File.Exists(Environment.GetFolderPath(Environment.SpecialFolder.System) + @"\cmd.exe")) { return Environment.GetFolderPath(Environment.SpecialFolder.System) + "\\"; } else if (File.Exists(Environment.ExpandEnvironmentVariables("%systemroot%\\sysnative") + @"\cmd.exe")) { return Environment.ExpandEnvironmentVariables("%systemroot%\\sysnative") + "\\"; } return ""; }Hope this can help you.
Please 'Mark as Answer' if this post helps you.