如何访问.NET动态库在传统的ASP? [英] How to access .Net dll in classic asp?
问题描述
我知道这是一个重复的问题,但没有解决办法为我工作。我有一个自定义.NET的DLL。我有两个ASPX和ASP页使用此。
I know this is a repeated question ,but no solution worked for me . I am having a custom .Net dll . I have to use this in both aspx and asp pages.
在ASP中accesing,我做了以下的事情,
Before accesing in asp ,i did the following things,
1.Build DLL项目。
1.Build the dll project.
2.In VS2005的命令提示符我跑SN -k MarkItUp.snk。
2.In VS2005 cmd prompt i ran sn -k MarkItUp.snk.
3.Referenced密钥文件中assembly.cs为[assembly:AssemblyKeyFileAttribute(@C:\\项目\\ Xxx.xx.Utilities \\ BIN \\调试\\ MarkItUp.snk)]
3.Referenced the key file in assembly.cs as [assembly: AssemblyKeyFileAttribute(@"C:\Projects\Xxx.xx.Utilities\bin\Debug\MarkItUp.snk")]
4.然后在VS2005的命令提示符
4.Then in VS2005 cmd prompt
1.tlbexp Xxx.xx.Utilities.dll /out:Xxx.xx.Utilities.tlb
2.regasm /tlb:Xxx.xx.Utilities.tlb Xxx.xx.Utilities.dll
3.gacutil /i Xxx.xx.Utilities.dll
一切都已成功
5.Then我引用的DLL项目
5.Then i referenced the dll in the project
6.In通过VBScript中我的ASP页我发起的DLL作为
6.In my ASP page through VBScript i initiated the dll as
Dim strLogger
response.Write("Testing asp")
set strLogger=Server.CreateObject("Xxx.xx.Utilities")
得到了如下错误
Server object error 'ASP 0177 : 800401f3'
Server.CreateObject Failed
我没有做regsvr,BSE这是给我中的DllRegisterServer找不到入口点错误
任何输入会帮我...
Any inputs will be help me...
谢谢,
推荐答案
确保在项目属性的使装配COM可见被选中
试验和错误似乎是一天的顺序。 COM和ASP有很多困难,当微软设置访问权限是在默认情况下严格。
Trial and error seems to be the order of the day. COM and ASP got a lot harder when Microsoft set access permissions to be strict by default.
这篇关于如何访问.NET动态库在传统的ASP?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!