1. Create a Assembly file using following:
File >> New >> Project >> Class Library >> Name = MyLibCSharp
2. Add a function HelloWorld. Code will look as follows:
using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
namespace MyLibCsharp
{
[Guid(“FE1EB79E-3513-487e-ADFF-2B61C6CB4730”)]
[ComVisible(true)]
public class Class1
{
public String HelloWorld(String name)
{
return (“Hellow World; Welcome “ + name);
}
}
}
3. Sign the Assembly (To enable it to be used by multiple Applications):
Go to Project >> MyLibCSharp Properties >> Signing >> Sign the Assembly >> New >> Key.snk
4. Enable for COM Interop:
Go to Project >> MyLibCSharp Properties >> Build >> Output >> Check the “Register for COM interop.
5. Build the Assembly.
6. Add to GAC using “Visual Studio Command Prompt” the assembly is located in DEBUG/RELEASE folder.
gacutil -I MyLibCSharp.dll
7. Execute the following:
Regasm /tlb /codebase MyLibCSharp.dll
8. ASP code:
<%
Dim foo
set foo = Server.CreateObject(“MyLibCSharp.Class1”)
Response.Write (foo.HelloWorld(“test”))
%>
9. To unregister the assembly
Regasm /unregister MyLibCSharp.dll
10. And to remove the same from GAC (Global assembly cache)
Go to
C:\WINDOWS\assembly
find the assembly you want to remove
select it , right click it and select uninstall
Bye
Discover more from Nishant Rana's Weblog
Subscribe to get the latest posts sent to your email.

Can you help me please?
I am getting the following error:
erver object, ASP 0177 (0x800401F3)
Invalid class string
/com/index.asp, line 10
Marcos de Sousa
LikeLike
Are you able to debug the dll you create in this example?
LikeLike
Hi,
This is excellent help.
Still a question…Is it necessary to put a assembly in GAC?
LikeLike
The example works fine, Thanks
LikeLike
This doesn’t appear to work in Vista Business. I get a :
Microsoft VBScript runtime error ‘800a01ad’
ActiveX component can’t create object
depends.exe suggests that this is because gpsvc.dll can’t be loaded, but there appears to be no more information on this anywhere. Any help greatly appreciated.
LikeLike
This doesn’t appear to work in Vista Business. I get a :
Microsoft VBScript runtime error ‘800a01ad’
ActiveX component can’t create object
depends.exe suggests that this is because gpsvc.dll can’t be loaded, but there appears to be no more information on this anywhere. Any help greatly appreciated.
LikeLike
I am getting the following error:
“Invalid class string”
while creating is the reason.
Could anybody help me.
LikeLike
25 САМЫХ ИНТЕРЕСНЫХ НАРЯДОВ БАЛА AMFAR
http://youtu.be/FFVJZfL5AaA
Сегодня в Каннах состоялась одна из самых грандиозных вечеринок фестиваля – бал amfAR «Кино против СПИДа» (Cinema Against AIDS). Незадолго до этого вечера организатор бала Карин Ройтфельд объявила, что мероприятие посвящено Мэрилин Монро, а главный цвет нарядов должен быть выполнен в красной гамме.
В прошлом и позапрошлом годах звезды довольно четко соблюдали дресс-код, примерив черные и золотые наряды, зато в этом году решили не прислушиваться к словам Карин и представили платья различных оттенков.
Одним из самых излюбленных цветов звезд стал перламутрово-розовый. Прекрасная Джейн Фонда (Jane Fonda) выбрала открытое корсетное платье на бретельках Atelier Versace, украшенное кристаллами Swarovski. В ее руках был клатч того же бренда, образ она дополнила открытыми туфлями Jimmy Choo и украшениями Chopard. Изабель Гулар (Izabel Goulart), в отличие от прошлого года, выбрала более закрытый наряд: платье-бюстье Emilio Pucci с фактурной объемной юбкой. Нежно-розовую гамму поддержала Айшвария Рай (Aishwarya Rai) в наряде Armani Prive. Она вместе со спутником прибыла на бал одной из первых. Кайли Миноуг (Kylie Minogue) также выбрала перламутровое платье Juan Carlos Obando с верхом из сатина. Модель Ирина Шейк продолжает демонстрировать свои наряды Atelier Versace: на этот раз она открыла правое бедро и левое плечо, а шею спрятала под воротником.
LikeLike
consent horrible collapsed chip http://forum.kafaroleplay.com/index.php?action=profile;u=954 berlin desert tina pots arms source
LikeLike
How do you not forget homework at school How do you write a scientific article review How long should MBA essays be
LikeLike