Ask a Question related to ASP Components, Design and Development.
-
jack #1
ASP accessing a VB.NET DLL?
Hello,
I have a VB.NET DLL and want to access it via ASP. Is this possable? Dose
anyone have an example?
Thanks,
Jack
jack Guest
-
Accessing .NET dll from ASP
I hope this is the right forum to ask this question. I'm having a problem with accessing a dll I have created with vb.NET 2.0 with ASP. (no... -
accessing db on other pc
I am writing an asp.net webpage. It has some code behind it that uses data from an excel spreadsheet. My problem is that instead of having the excel... -
accessing FH9 Help
When i go to the drop down for help, i get none? nothing happens no help window, the drop down does not appear to work, no access to help. HELP! ... -
Accessing an F key
Hi, Does someone know how can I access an F key using an html link, javascript, form object. I need to open a full screen window (like... -
ASP.NET: Accessing a Tag with C#
Hi, IN ASP.NET PAGE I HAVE DEFINED THE DIV TAG AS FOLLOWS:I want to access the value in the code behind(c#) . <div align="left" autopostback... -
Adrian Forbes [ASP MVP] #2
Re: ASP accessing a VB.NET DLL?
Probably better off asking this in a .net group, but anyway.
Create a new class library project called COMInteropTest and rename class1
to be TestClass. Add a reference to System.Runtime.Remoting. Code for
class looks like;
Imports System.Runtime.InteropServices
<InterfaceType(ComInterfaceType.InterfaceIsDual) > _
Interface IMyInterface
Function SayHello() As String
End Interface
<ProgId("COMInteropTest.TestClass")> _
Public Class TestClass
Implements IMyInterface
Public Sub New()
End Sub
Public Function SayHello() As String Implements IMyInterface.SayHello
SayHello = "Hello"
End Function
End Class
Open a .net command prompt (or a normal command prompt and navigate to your
..net install folder) and type;
sn -k c:\strongname.snk
This will create a strong name file in your c:\ folder. Update the
AssemblyInfo.vb file to use this strong name like so;
<Assembly: AssemblyTitle("")>
<Assembly: AssemblyDescription("")>
<Assembly: AssemblyCompany("")>
<Assembly: AssemblyProduct("")>
<Assembly: AssemblyCopyright("")>
<Assembly: AssemblyTrademark("")>
<Assembly: CLSCompliant(True)>
<Assembly: AssemblyKeyFile("c:\strongname.snk")> ' <-- Add this
Build your dll and from your command prompt
gacutil /if cominteroptest.dll
this will add your assembly to the GAC. Now register it as a COM object by;
regasm cominteroptest.dll /tlb:cominteroptest.tlb
Phew. Now you can use it as normal
set obj = CreateObject("COMInteropTest.TestClass")
msgbox obj.SayHello
set obj = nothing
"jack" <jack@mrolinux.com> wrote in message
news:OMK6grPfEHA.2812@tk2msftngp13.phx.gbl...Dose> Hello,
>
> I have a VB.NET DLL and want to access it via ASP. Is this possable?> anyone have an example?
>
> Thanks,
>
> Jack
>
>
Adrian Forbes [ASP MVP] Guest
-
Kena #3
Re: ASP accessing a VB.NET DLL?
yes we can , we just need to browse and see in debug or release folder to get dll
and then add this reference to ur project or else simply copy dll of previous appln to current application 's bin folderKena Guest



Reply With Quote

