Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

asp.net 32 bit 64 bit question

Posted on 2014-04-23
13
Medium Priority
?
443 Views
Last Modified: 2014-04-24
I am running what is supposed to be a 64 bit .net web application. When I run this command:

aspnet_regiis.exe –i

I get this response:

The error indicates that IIS is in 64 bit mode, while this application is a 32 bit application and thus not compatible.

Any Ideas on how to fix the problem or determine if the application is really 64 or 32 bit?
0
Comment
Question by:jimmylew52
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 8
  • 5
13 Comments
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 40018075
Keep in mind that what is deployed on your server isn't actually machine code--it's IL code. IL code gets compiled on-the-fly to the host machine's architecture. Now, if you are running a 64-bit machine, but you need to run as 32-bit--usually for libraries that were coded as 32-bit (like Oracle libraries)--then you can tell .NET to prefer to run the library as 32-bit code rather than 64-bit. You do this by specifying a configuration of x86 (or x64, depending) in your project's properties.

e.g.

Screenshot
0
 
LVL 1

Author Comment

by:jimmylew52
ID: 40018106
How would I tell if the libraries on the server were compiled for 32 bot or 64 bit? Is there any way to tell?
0
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 40018370
They're not compiled to either--they're compiled to IL code. If you want to see what architecture the executable (should) will be compiled to, you can use the CorFlags utility that comes with the .NET Framework. Pass the utility the path to the assembly with no other aruments:

e.g.

C:\>corflags.exe C:\path\to\assembly.dll
C:\>corflags.exe C:\path\to\assembly.exe

Open in new window


You will get output along the lines of:

Screenshot
In the screenshot, I have compiled a DLL as "Any CPU", "x86", and "x64", respectively. You will note that there is a difference in the "PE" and "CorFlags" fields. Both AnyCPU and x86 show a PE value of "PE32"; the x64 shows "PE32+". "PE32+" always indicates 64-bit. For the other two values you have to look at the value of the CorFlags. If its value is 0x1, then you have an assembly that can run on either x86 or x64--the runtime compiler on the host machine will make that determination. If its value is 0x3, then the assembly will be compiled as x86. The "32BITREQ" field also reinforces this.
0
Understanding Web Applications

Without even knowing it, most of us are using web applications on a daily basis. Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We often confuse these web applications tools for websites.  So, what is the difference?

 
LVL 1

Author Comment

by:jimmylew52
ID: 40018436
I get this error:

corflags.exe is not recognized as an internal or external command.

Dotnet 4.0 is installed but a search of the system doesnot find corflags
0
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 40018449
My fault:  I misread the documentation. You can acquire that utility by installing the Windows SDK.
0
 
LVL 1

Author Comment

by:jimmylew52
ID: 40018622
So if this is the result of the command for the .dll files:

Version   : v4.0.30319
CLR Header: 2.5
PE        : PE32
CorFlags  : 1
ILONLY    : 1
32BIT     : 0
Signed    : 0

The web app is compiled for 32 bit and not 64 bit?
0
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 2000 total points
ID: 40018630
That means it can run on either architecture--the runtime compiler will decide how to compile the IL code into machine code.
0
 
LVL 1

Author Comment

by:jimmylew52
ID: 40018639
That being the case, why am I getting this error?

The error indicates that IIS is in 64 bit mode, while this application is a 32 bit application and thus not compatible.
0
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 40018677
What is the exact error message?
0
 
LVL 1

Author Comment

by:jimmylew52
ID: 40018702
exact command and error

C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319>aspnet_regiis -i -enable
The error indicates that IIS is in 64 bit mode, while this application is a 32 b
it application and thus not compatible.
0
 
LVL 1

Author Comment

by:jimmylew52
ID: 40019940
The service is compiled as a 32 bit or 64 bit service. It is currently installed in

Program Files (x86)      and is running as a 32 bit service.  If I uninstall and install in

Program Files       will it run as a 64 bit service?
0
 
LVL 1

Author Comment

by:jimmylew52
ID: 40020326
No, that will not make a difference.

C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319>aspnet_regiis -i -enable

should be run from

C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319>aspnet_regiis -i -enable
0
 
LVL 1

Author Closing Comment

by:jimmylew52
ID: 40020328
Thanks for your assistance
0

Featured Post

Cyber Threats to Small Businesses (Part 2)

The evolving cybersecurity landscape presents SMBs with a host of new threats to their clients, their data, and their bottom line. In part 2 of this blog series, learn three quick processes Webroot’s CISO, Gary Hayslip, recommends to help small businesses beat modern threats.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s a strangely common occurrence that when you send someone their login details for a system, they can’t get in. This article will help you understand why it happens, and what you can do about it.
While opting for any web-to-print solution, you need to discuss with your team and some of your end users and know their opinions about your decisions. In this article we list down some questions you need to ask yourself.
This video teaches viewers how to create their own website using cPanel and Wordpress. Tutorial walks users through how to set up their own domain name from tools like Domain Registrar, Hosting Account, and Wordpress. More specifically, the order in…
Learn how to set-up PayPal payment integration in your Wufoo form. Allow your users to remit payment through PayPal upon completion of your online form. This is helpful for collecting membership payments, customer payments, donations, and more.

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question