首先,當我進行測試時,它在Visual Studio 2010中正常工作。在ASP.NET中使用32位Delphi dll?
但我試過4以下發布到IIS7在64位的Windows 7,但仍然沒有工作:
1.Visual Studio 2010的發佈 - >構建 - >常規 - >目標平臺:任何CPU
1-A:IIS7:ASP.Net V4.0,使32位應用=假
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,使32位應用=真
它沒有'噸甚至加載可言, 「Internet Explorer無法顯示該網頁」,並應用程序日誌中得到了應用程序錯誤....
- Visual Studio 2010的發佈 - >構建 - >常規 - >平臺目標:86
2-A:IIS7:ASP.Net V4.0,使32位應用=假
集加載跟蹤:下列信息有助於確定程序集 'WebApplicationTest' 不能加載。
=== Pre-bind state information ===
LOG: User = IIS APPPOOL\ASP.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:\inetpub\wwwroot\TestDll\bin
Calling assembly : (Unknown).
2-B:IIS7:ASP.Net V4.0,使32位應用=真
根本不會再次加載。
嗯..從我研究的唯一方法是強制IIS7在32位過程中運行ASP.NET ...但它似乎不工作,我不知道我做了什麼錯誤.. 。
在此先感謝...
其實這個DLL不是我編程的,但我被要求使用它。現在是罰款,我會用我的C#DLL,謝謝。 – King 2011-04-20 19:07:04