Summarize one of the problems encountered today:
I used C # To write a component. Now there is an ASP Program The same function should also be used, that is, asp should call this. Net assembly
OK, start:
1. regasm converthelper. dll/TLB: converthelper. TLB
2. Use it in ASP program.
An error occurred while prompting Createobject in step 3,
However, after I set the project name, right-click "properties" and choose "Configure properties"> "generate"> change "register for com InterOP" to "true, after the component is re-compiled, everything is normal, and the ASP program call is correct. The difference between the two methods is that one is manually registered and the other is automatically registered, is it because the IDE of vs.net 2003 has made other settings, and there is no way, just turn to Google, search it once and find the following articleArticle:
Http://comcamp.myrice.com/techarticles/com/2013.htm
The Registry content after registration is mentioned in this Article. If I have lost something during manual registration, I will first export the registry settings to the reg file:
Regasm converthelper. dll/regfile: converthelper. Reg
Open the converthelper. reg check in notepad and find that the codebase settings are missing. The following describes how to query the codebase:
/Codebase: Create a codebase entry in the registry. The codebase item specifies the file path of the Assembly that is not installed in the Global Assembly Cache. This option should not be specified if you want to install an assembly that is being registered to the Global Assembly Cache. Use/CodebaseOptionAssemblyfileThe parameter must be .
Now, if the. Net assembly you want to register does not have a strong name, add/codebase when using regasm for registration.
Re-start the registration process:
1. regasm converthelper. dll/TLB: converthelper. TLB/codebase
2. ASP program to call
OK. Everything is normal. The problem is solved !!