Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Creating .NET Components accessibly by classic ASP

Creating .NET Components accessibly by classic ASP

Scheduled Pinned Locked Moved Visual Basic
csharphelptutorial
6 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Chris Quick
    wrote on last edited by
    #1

    I was wondering if anyone has some good resources on how to create a .NET component that is accessible by using VBScript and Classic ASP. I know this is possible according to some of the things I've read, but I can't seem to find and actual implementation guides. Any help is appreciated! Thanks!

    C D 2 Replies Last reply
    0
    • C Chris Quick

      I was wondering if anyone has some good resources on how to create a .NET component that is accessible by using VBScript and Classic ASP. I know this is possible according to some of the things I've read, but I can't seem to find and actual implementation guides. Any help is appreciated! Thanks!

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      You can create COM components in .NET, which is the only way I can imagine this working. Christian I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer

      1 Reply Last reply
      0
      • C Chris Quick

        I was wondering if anyone has some good resources on how to create a .NET component that is accessible by using VBScript and Classic ASP. I know this is possible according to some of the things I've read, but I can't seem to find and actual implementation guides. Any help is appreciated! Thanks!

        D Offline
        D Offline
        Dave Kreskowiak
        wrote on last edited by
        #3

        On top of what Cristian said, the machine will have to have the .NET Framework installed just to use your component. You might want to start reading up on Exposing .NET Framework Components to COM[^]. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

        C 1 Reply Last reply
        0
        • D Dave Kreskowiak

          On top of what Cristian said, the machine will have to have the .NET Framework installed just to use your component. You might want to start reading up on Exposing .NET Framework Components to COM[^]. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

          C Offline
          C Offline
          Chris Quick
          wrote on last edited by
          #4

          Thank's for the information. The problem I am having is exposing it to VBScript. Whenever I use the following command I get a non-descript error:

          Set PageRender = Server.CreateObject("MC.PageRenderer")

          Here is my code. I'm trying to keep it simple until I understand how to implement it.

          <Guid("3BFA03FD-B85D-48de-A9E8-FAE266B2D809"), _
          InterfaceType(ComInterfaceType.InterfaceIsIDispatch)> _
          Public Interface _PageRender
          <DispId(1)> Function ChooseContent(ByVal CalWidth As Integer, ByVal CalHeight As Integer) As String
          <DispId(2)> Function GetNews(ByVal Width As Integer, ByVal Heading As String, ByVal IsImage As Boolean) As String
          <DispId(3)> Property Action() As String
          <DispId(4)> Property SubCommand() As String
          <DispId(5)> Property ID() As Integer
          End Interface

          <Guid("385AA220-84CD-4e25-A736-E3356C33F4A8"), _
          ClassInterface(ClassInterfaceType.None), _
          ProgId("MinistryCraft.PageRenderer")> _
          Public Class PageRenderer
          Implements _PageRender

              Public Property Action() As String Implements \_PageRender.Action
                  Get
          
                  End Get
                  Set(ByVal Value As String)
          
                  End Set
              End Property
          
              Public Function ChooseContent(ByVal CalWidth As Integer, ByVal CalHeight As Integer) As String Implements \_PageRender.ChooseContent
                  Return CalWidth & "W x " & CalHeight & "H"
              End Function
          
              Public Function GetNews(ByVal Width As Integer, ByVal Heading As String, ByVal IsImage As Boolean) As String Implements \_PageRender.GetNews
          
              End Function
          
              Public Property ID() As Integer Implements \_PageRender.ID
                  Get
          
                  End Get
                  Set(ByVal Value As Integer)
          
                  End Set
              End Property
          
              Public Property SubCommand() As String Implements \_PageRender.SubCommand
                  Get
          
                  End Get
                  Set(ByVal Value As String)
          
                  End Set
              End Property
          End Class
          

          Do I need to register this assembly with the global cache?

          D A 2 Replies Last reply
          0
          • C Chris Quick

            Thank's for the information. The problem I am having is exposing it to VBScript. Whenever I use the following command I get a non-descript error:

            Set PageRender = Server.CreateObject("MC.PageRenderer")

            Here is my code. I'm trying to keep it simple until I understand how to implement it.

            <Guid("3BFA03FD-B85D-48de-A9E8-FAE266B2D809"), _
            InterfaceType(ComInterfaceType.InterfaceIsIDispatch)> _
            Public Interface _PageRender
            <DispId(1)> Function ChooseContent(ByVal CalWidth As Integer, ByVal CalHeight As Integer) As String
            <DispId(2)> Function GetNews(ByVal Width As Integer, ByVal Heading As String, ByVal IsImage As Boolean) As String
            <DispId(3)> Property Action() As String
            <DispId(4)> Property SubCommand() As String
            <DispId(5)> Property ID() As Integer
            End Interface

            <Guid("385AA220-84CD-4e25-A736-E3356C33F4A8"), _
            ClassInterface(ClassInterfaceType.None), _
            ProgId("MinistryCraft.PageRenderer")> _
            Public Class PageRenderer
            Implements _PageRender

                Public Property Action() As String Implements \_PageRender.Action
                    Get
            
                    End Get
                    Set(ByVal Value As String)
            
                    End Set
                End Property
            
                Public Function ChooseContent(ByVal CalWidth As Integer, ByVal CalHeight As Integer) As String Implements \_PageRender.ChooseContent
                    Return CalWidth & "W x " & CalHeight & "H"
                End Function
            
                Public Function GetNews(ByVal Width As Integer, ByVal Heading As String, ByVal IsImage As Boolean) As String Implements \_PageRender.GetNews
            
                End Function
            
                Public Property ID() As Integer Implements \_PageRender.ID
                    Get
            
                    End Get
                    Set(ByVal Value As Integer)
            
                    End Set
                End Property
            
                Public Property SubCommand() As String Implements \_PageRender.SubCommand
                    Get
            
                    End Get
                    Set(ByVal Value As String)
            
                    End Set
                End Property
            End Class
            

            Do I need to register this assembly with the global cache?

            D Offline
            D Offline
            Dave Kreskowiak
            wrote on last edited by
            #5

            If you going to share this thing with a bunch of different evnironments and applications, then yes, I'd put in the GAC. Also, you'll have to use RegAsm to register the assembly for COM use. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

            1 Reply Last reply
            0
            • C Chris Quick

              Thank's for the information. The problem I am having is exposing it to VBScript. Whenever I use the following command I get a non-descript error:

              Set PageRender = Server.CreateObject("MC.PageRenderer")

              Here is my code. I'm trying to keep it simple until I understand how to implement it.

              <Guid("3BFA03FD-B85D-48de-A9E8-FAE266B2D809"), _
              InterfaceType(ComInterfaceType.InterfaceIsIDispatch)> _
              Public Interface _PageRender
              <DispId(1)> Function ChooseContent(ByVal CalWidth As Integer, ByVal CalHeight As Integer) As String
              <DispId(2)> Function GetNews(ByVal Width As Integer, ByVal Heading As String, ByVal IsImage As Boolean) As String
              <DispId(3)> Property Action() As String
              <DispId(4)> Property SubCommand() As String
              <DispId(5)> Property ID() As Integer
              End Interface

              <Guid("385AA220-84CD-4e25-A736-E3356C33F4A8"), _
              ClassInterface(ClassInterfaceType.None), _
              ProgId("MinistryCraft.PageRenderer")> _
              Public Class PageRenderer
              Implements _PageRender

                  Public Property Action() As String Implements \_PageRender.Action
                      Get
              
                      End Get
                      Set(ByVal Value As String)
              
                      End Set
                  End Property
              
                  Public Function ChooseContent(ByVal CalWidth As Integer, ByVal CalHeight As Integer) As String Implements \_PageRender.ChooseContent
                      Return CalWidth & "W x " & CalHeight & "H"
                  End Function
              
                  Public Function GetNews(ByVal Width As Integer, ByVal Heading As String, ByVal IsImage As Boolean) As String Implements \_PageRender.GetNews
              
                  End Function
              
                  Public Property ID() As Integer Implements \_PageRender.ID
                      Get
              
                      End Get
                      Set(ByVal Value As Integer)
              
                      End Set
                  End Property
              
                  Public Property SubCommand() As String Implements \_PageRender.SubCommand
                      Get
              
                      End Get
                      Set(ByVal Value As String)
              
                      End Set
                  End Property
              End Class
              

              Do I need to register this assembly with the global cache?

              A Offline
              A Offline
              Anonymous
              wrote on last edited by
              #6

              If you are getting the "Can't create Activex Component" error is because you either: a. did not register the component for COM use b. did not copy the component to the same directory where the calling program is located. All the information you need is found in the resources already mentioned by other people.

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups