How To Create A COM Object Using .NET To Use It From A Classic ASP Page -


i have classic asp web site uses vb6 com object.

i want create new version of com object using .net instead of vb6.

[01]

start visual studio 2015 (run admin).

create new "class library" project.

name it: "dotnetcom"

[02]

add new "com class" item.

name it: "hellocom.vb"

[03]

add public function "hellocom.vb".

for example:

public function hello() string     return "hello there!" end function 

[04]

open "myproject".

go "compile".

select "target cpu: x86".

[05]

build "dotnetcom.dll".

[06]

start component services.

add new com+ application.

name it: "dotnetcom".

[07]

open "dotnetcom" properties.

go "security tab".

uncheck "enforce access checks application".

[08]

add new component.

select "dotnetcomtest.tlb" (do not select "dotnetcomtest.dll").

[09]

use com object classic asp page.

<% dim hellocom set hellocom = server.createobject("dotnetcom.hellocom") response.write hellocom.hello %> 

Comments

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -