How to access .Net dll in classic asp?

╄→尐↘猪︶ㄣ 提交于 2019-12-13 06:39:20

问题


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.

Before accesing in asp ,i did the following things,

1.Build the dll project.

2.In VS2005 cmd prompt i ran sn -k MarkItUp.snk.

3.Referenced the key file in assembly.cs as [assembly: AssemblyKeyFileAttribute(@"C:\Projects\Xxx.xx.Utilities\bin\Debug\MarkItUp.snk")]

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

everything was successful

5.Then i referenced the dll in the project

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")

Got the error as below

Server object error 'ASP 0177 : 800401f3'
Server.CreateObject Failed 

I didn't do the regsvr,bse it was giving me "Entry point to DLLRegisterServer not found" error

Any inputs will be help me...

Thanks,


回答1:


Make sure in the project properties that "Make assembly COM visible" is checked

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.



来源:https://stackoverflow.com/questions/7032541/how-to-access-net-dll-in-classic-asp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!