且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

从ASP脚本使用dll的***方式

更新时间:2023-12-04 23:33:40

您需要注册DLL AFAIK,或者使用一个安装程序,或者使用regsvr32 (或类似)


I'm writing some ASP code to service requests from a simple HTML form on my company's intranet. The code needs to call methods from a (COM) dll. I'm using the code:

myObject = Server.CreateObject("myDLL.myClass")

but it's giving an error at this line. I'm not sure if the dll is registered on the server, but I suspect it may not be. I'm not sure how to find this out.

If it's not registered, is it possible/best practice to:

  1. Use the dll without registering it on the server (I have the .dll file);
  2. Remotely register the dll safely using ASP code; or
  3. Do I need to contact the IT dept to get it registered?

I'm worried that option 2 might freak the IT department out and also possibly break something - but I have a deadline and it's unlikely that they will get around to registering anything before then.

Is there any way I can use the dll without involving them, purely with ASP?

I've also got this question open regarding running the dll on the client's computers by embedding in the intranet form, which is my preferred method if it's possible. It's the same dll, and it's already registered on all clients' machines but so far I've been unable to get it passed the IE intranet security settings.

ANY help/comments/suggestions on this or my other thread would be greatly appreciated.

Thanks for reading.

you need to register the DLL AFAIK, either with a setup program that does it, or manually with regsvr32 (or similar)