简体   繁体   中英

Register C# COM to use in ASP Classic

I built an COM Object in c# to use in an ASP Classic application, when I register using /codebase it works, if I don't use it doesn`t, my questions is why I need to use this parameter? Can it cause me any problem in the future?

I have already tried using gacutil and then without the /codebase, it seems fine, but when I run in ASP it crashes.

Is there a good way to unregister? I used /u but after registering using /codebase, it works forever even if I "unregister".

Without /codebase argument, the location of the dll will not be written to registry, and loader will not be able to find the dll.

COM servers are looked up by id (class ID or indirectly by ProgID which maps to the class ID) in the registry - loader needs to find the dll which hosts the factory function for the class, and this is done by searching the registry for given CLSID and retrieving the server info.

When you install the assembly in GAC, you don't need /codebase . However, registering in the GAC requires the assembly to be strong-named so it is less convenient, especially during development.

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