Accessing a .NET Assembly from classic ASP(从经典 ASP 访问 .NET 程序集)
问题描述
我一直在尝试访问我在经典 ASP 中使用创建的 .NET 程序集
I have been trying to access a .NET Assembly that I have created in classic ASP using
dim foo
set foo = Server.CreateObject("TestAssembly.MyClass")
问题是我遇到了一个错误:
The problem is I'm getting an error:
Server object error 'ASP 0177 : 800401f3'
Server.CreateObject Failed
/test.asp, line 4
Invalid class string
我已经按照文章中的说明使用 gacutil 和 regasm 注册了程序集 (TestAssembly.dll):用我从 from-asp-classic-to-asp-net/104187#104187">另一个问题.它提供了两种安装程序集的方法,我都尝试过,但都无济于事.
I have registered the assembly (TestAssembly.dll) using gacutil and regasm as instructed in the article: Replacing Old Classic ASP COM Components with .NET Assemblies which I referenced from another question. It supplies two methods in which to install the assembly and I have tried both, but to no avail.
让这个工作很好,因为它可以让我逐渐将一个经典的 ASP 网站迁移到 .NET
Getting this working would be great because it would allow me to gradually migrate a classic ASP site to .NET
推荐答案
要检查的另一件事:确保您的 .Net 程序集设置为 COM Visible.
Another thing to check: make sure your .Net assembly is set to be COM Visible.
这篇关于从经典 ASP 访问 .NET 程序集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:从经典 ASP 访问 .NET 程序集
- 在哪里可以找到使用中的C#/XML文档注释的好例子? 2022-01-01
- MoreLinq maxBy vs LINQ max + where 2022-01-01
- 良好实践:如何重用 .csproj 和 .sln 文件来为 CI 创建 2022-01-01
- 带有服务/守护程序应用程序的 Microsoft Graph CSharp SDK 和 OneDrive for Business - 配额方面返回 null 2022-01-01
- 如何用自己压缩一个 IEnumerable 2022-01-01
- Web Api 中的 Swagger .netcore 3.1,使用 swagger UI 设置日期时间格式 2022-01-01
- 输入按键事件处理程序 2022-01-01
- C#MongoDB使用Builders查找派生对象 2022-09-04
- C# 中多线程网络服务器的模式 2022-01-01
- WebMatrix WebSecurity PasswordSalt 2022-01-01
