Take notes regarding to the Microsoft programming technologies that I used and learnt when working such as ASP.NET, SharePoint, WCF, WWF and etc. before I forgot. ^_^!

About Me

Tuesday 27 April 2010

Running 32-bit assemblies in an ASP.NET application on a 64-bit machine

Found it online, it must be useful one day...

If you are trying to run our 32 bit builds in an ASP.NET application on a 64-bit machine, you need to add this to your web.config

C# (.NET 2.0)

<system.codedom> 
<compilers>
<compiler
language="c#;cs;csharp" extension=".cs"
compilerOptions="/platform:x86"
type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</compilers>
</system.codedom>


VB.NET (.NET 2.0)


<system.codedom> 
<compilers>
<compiler
language="vb;vbs;visualbasic;vbscript" extension=".vb"
compilerOptions="/platform:x86"
type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</compilers>
</system.codedom>

The important part is: compilerOptions="/platform:x86"

Which you could also set with a page directive


<%@ Page Language="C#" ... CompilerOptions="/platform:x86" %>

And you may also have to set IIS into 32 bit mode.


Reference:


http://support.microsoft.com/kb/894435/en-us

http://www.atalasoft.com/kb/article.aspx?id=10181

No comments:

Post a Comment

Followers