简体   繁体   中英

Register .NET DLL for COM Interop in Visual Studio Setup and Deployment project

I'm trying to register a dll for COM Interop and have the usual issue of it working on my dev machine but not our test server. I'm attempting to do this in VS2008 using a Setup & Deployment project. I'm then trying to consume the library from classic ASP. The target machine is windows 2003 with SP2, IIS6.

Specifically I'm trying the method suggested by Hans here:

Use Visual Studio Setup Project to automatically register and GAC a COM Interop DLL

Where he says "Set the Register property of the project output reference to vsdrpCOM."

As well as having this set I have the [assembly: ComVisible(true)] in the assemblyInfo of the project in question and the "Register for COM Interop" checkbox ticked.

Finally I have also strongly signed it and added to the GAC in the Setup and Deployment project.

The error I get in ASP is

Server object error 'ASP 0177 : 800401f3'

Server.CreateObject Failed 

Oddly enough I can reference the registered library in Excel on the server in question and it works fine. So it seems to be registered correctly.

Anybody have suggestions on other things I may have missed?

EDIT: Sorry more details added.

I found the issue - the deployment project automatically has the "Just Me" option checked when doing the installation. Uninstalling and reinstalling with "Everyone" seems to have worked. Silly mistake.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM