First, it working fine in Visual Studio 2010 when I do the testing.
But I tried 4 of the following to publish into IIS7 on 64bit windows 7, but is still not working:
1.Visual Studio 2010 Publish -> Build -> General -> Platform Target: Any CPU
1-A: IIS7: ASP.Net v4.0, Enable 32-Bit Application = False
Error:
Server Error in '/TestDll' Application.
--------------------------------------------------------------------------------
An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)
1-B: IIS7: ASP.Net v4.0, Enable 32-Bit Application = True
It doesn't even load at all, "Internet Explorer cannot display the webpage" and Application log got Application Error....
- Visual Studio 2010 Publish -> Build -> General -> Platform Target: x86
2-A: IIS7: ASP.Net v4.0, Enable 32-Bit Application = False
Could not load file or assembly 'WebApplicationTest' or one of its dependencies. An attempt was made to load a program with an incorrect format.
Assembly Load Trace: The following information can be helpful to determine why the assembly 'WebApplicationTest' could not be loaded.
=== Pre-bind state information ===
LOG: User = IIS APPPOOLASP.NET v4.0
LOG: DisplayName = WebApplicationTest
(Partial)
WRN: Partial binding information was supplied for an assembly:
WRN: Assembly Name: WebApplicationTest | Domain ID: 7
WRN: A partial bind occurs when only part of the assembly display name is provided.
WRN: This might result in the binder loading an incorrect assembly.
WRN: It is recommended to provide a fully specified textual identity for the assembly,
WRN: that consists of the simple name, version, culture, and public key token.
WRN: See whitepaper http://go.microsoft.com/fwlink/?LinkId=109270 for more information and common solutions to this issue.
LOG: Appbase = file:///C:/inetpub/wwwroot/TestDll/
LOG: Initial PrivatePath = C:inetpubwwwrootTestDllin
Calling assembly : (Unknown).
2-B: IIS7: ASP.Net v4.0, Enable 32-Bit Application = True
Doesn't load at all again.
hmm.. from what I research is that the only way is to force IIS7 to run the ASP.NET in 32 bit process...but it doesn't seems working, I wonder what did I done wrong...
Thanks in advance...
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…