我在64位模式下在Windows 2008 Server x64上运行经典ASP。ADODB在64位版本上运行良好,采用了经典的ASP。我的.NET COM DLL有问题。 我已经创建了一个.NET COM DLL具有这种码作为示例:64位模式下的经典ASP和.NET COM DLL注册问题
using System.Runtime.InteropServices;
namespace TestNamespace
{
[Guid("C446E97E-B415-4677-B99E-9644657FC98"),
ProgId("TestNamespace.TestClass"),
ComVisible(true)]
public class TestClass
{
[ComVisible(true)]
public void TestMethod(string s)
{
//some code that uses System.Messaging to send a message
}
}
}
该DLL被编译所有CPU。在ASP中创建对象并执行方法:
Set test = Server.CreateObject("TestNamespace.TestClass")
test.TestMethod("test string")
Set test = Nothing
我使用RegAsm注册DLL:
%windir%\Microsoft.NET\Framework\v2.0.50727\RegAsm.exe /tlb /codebase TestNamespace.dll
在x86平台的ASP和DLL正在运行良好。
在Windows 2008服务器我已经试过:
- 编译DLL的x64和使用... \ Framework64 \ V2.0.50727 \ RegAsm.exe
- 编译为不同的平台和不同放置注册地点,包括GAC
- 更多
的错误(不同的情况):
- Microsoft VBScript运行时错误 '800a01ad' Server.CreateObject失败
- 服务器对象错误ASP 0177:80070002 Server.CreateObject失败
- 服务器对象错误ASP 0177:800401f3 Server.CreateObject失败
- 服务器对象错误'ASP 0177:80131040'Server.CreateObject失败
当ASP应用程序池切换到32位模式时,它在Windows 2008 Server x64上工作的唯一方法。但我需要它在64位工作! 我认为问题不在于权限,因为32位工作。
任何人都有经验的ASP和.NET COM都在64位运行的经验?
发现,一切正常,直到System.Messaging用于该方法。为x64平台创建并安装的使用消息的Windows服务在System.Messaging中正常工作。 可能是64位asp.dll进程出现问题。 – 2009-08-18 09:50:58