ASP calls components compiled by. net

Source: Internet
Author: User
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 !!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.