global.asa and COM

Results 1 to 2 of 2

Thread: global.asa and COM

  1. #1
    Matiur Rahman Guest

    Default global.asa and COM

    I have created a custom COM. I would like to use it from my ASP page. The COM is already registered. I am using Visual Interdev and PWS on NT workstation.<BR><BR>What are the necessary steps to follow in order to use "Server.CreateObject(&#039MyCom.Test&#039)" on ASP?<BR>Do I need to refer the COM on my Web Project so that TypeLib information is generated in the &#039global.asa&#039 file.<BR><BR>When I give reference the following error was generated:<BR><BR>Active Server Pages error &#039ASP 0223&#039 <BR>TypeLib Not Found <BR>/BackUpHub2K/global.asa, line 2 <BR>METADATA tag contains a Type Library specification that does not match any Registry entry. <BR><BR>But I know that the COM was registered. Without the reference, I could create the intance of the COM using "Server.CreateObject" and also using &#060;object runat=server ID=myID progID="MyCom.VBVB"&#062;&#060;/Object&#062;<BR><BR>So I am confused. Which is the appropriate way to create instance? Do I need to refer the COM explicitly in our web?<BR><BR>Any Ideas would be highly appreciated. <BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: global.asa and COM

    It sounds like you&#039re close. You don&#039t need to involve the global.asa file. All you need to do is declare a variable and set that variable to your COM interface. For instance, if I want to create an instance of the JMail.SMTPMail object all I have to do is:<BR><BR>&#060;%<BR>Dim JMail<BR><BR>Set JMail = Server.CreateObject ("JMail.SMTPMail")<BR>%&#062;<BR><BR>Then I&#039m free to use the properties and methods of this object, like so:<BR>&#060;%<BR>JMail.ServerAddress = ""<BR>%&#062;<BR><BR>Hope this helps

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts