Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Component Services / July 2003

Tip: Looking for answers? Try searching our database.

COM Object - Why Cant I get IIS to see the Methods? I can create the Object...

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Scott Townsend - 22 Jul 2003 05:43 GMT
I've written a COM Object that I cant call one of the methods from an ASP
Page.

I get the Following Error:
Microsoft VBScript runtime (0x800A01AE)
Class doesn't support Automation: 'objMyCoolObject.DoIt'

After I compile the Class I Copy the .DLL over to the Web Server and  issue
the command:
   regsvcs comMyCom.dll
I get the Following Back:
   WARNING: The assembly does not declare an ApplicationAccessControl
Attribute.  Application security will be enabled by default.
Installed Assembly:
       Assembly: comMyCom.dll
       Application: ComMyCom
       TypeLib: comMyCom.tlb

I've included the AssemblyInfo.vb and the comMyCom.vb files.

Any Help would be appreciated.
Thanks,
 Scott<-

AssemblyInfo.vb File
#Region "COM+ Registration details "

'Supply the COM+ application name

<Assembly: ApplicationNameAttribute("ComMyCom")>

<Assembly: ApplicationActivation(ActivationOption.Library)>

'Supply a strong-name assembly

<Assembly: AssemblyKeyFileAttribute("..\\..\\comMyCom.snk")>

comMyCom.vb File

Imports System

Imports System.web.mail

Imports System.EnterpriseServices

Imports System.EnterpriseServices.ActivationOption

Imports System.EnterpriseServices.EventTrackingEnabledAttribute

Imports System.Reflection

Imports System.Runtime.InteropServices

Imports System.Runtime.InteropServices.ClassInterfaceType

' I've Tried the Three Class Declarations all with the same Results

'<ComClass(comSMSvCard.ClassId, comSMSvCard.InterfaceId,
comSMSvCard.EventsId)> _

'Public Class comSMSvCard

'<ClassInterfaceAttribute(ClassInterfaceType.AutoDual)> _

'Public Class comSMSvCard

<TransactionAttribute(TransactionOption.Required)> _

Public Class comSMSvCard

   Inherits EnterpriseServices.ServicedComponent

   Public Const ClassId As String = "6983A5C3-6E8A-46d9-90B3-4426BE69588C"

   Public Const InterfaceId As String =
"5203E497-075F-4f6f-9A25-B697A0C38A6D"

   Public Const EventsId As String = "F871F568-5407-4f34-BF00-1A2BDAEC03F1"

   Public Sub New()

       MyBase.New()

   End Sub

   Public Function Send(ByVal strEmailAddress As String, ByVal
strEmailServer As String) As Integer

       Dim Message As System.Web.mail.MailMessage = New
System.Web.Mail.MailMessage

       Dim myMailServer As System.Web.Mail.SmtpMail

       Dim iIndex As Integer

       Message.To = strEmailAddress

       Message.From = strEmailAddress

       Message.Subject = ""

       myMailServer.SmtpServer = strEmailServer

       Message.Body = "Test"

       myMailServer.Send(Message)

   End Function

End Class
Kumar Gaurav Khanna [.NET MVP] - 27 Jul 2003 02:35 GMT
Hi!

RegSvcs is typically used to install a .NET assembly into COM+ application
and optionally, create a TLB for the same for the clients to early bind.
This method shouldnt be used for VB6 COM Servers, which should be installed
by directly importing them in the COM+ Application using the COM+ MMC
(Administrative Tools), followed by exporting the COM+ Application proxy, to
install the TLB and relevant entires on the ASP server, if its different
than the COM+ server (typically is).

You will need to restart IIS to have the new COM server come into effect
since once the COM server is loaded, its not unloaded until IIS is
restarted.

Regards,
Gaurav Khanna

Signature

----------------------------------------------------------------------------
----------
Microsoft MVP - .NET, MCSE Windows 2000/NT4, MCP+I
WinToolZone - Spelunking Microsoft Technologies
http://www.wintoolzone.com/
OpSupport - Spelunking Rotor
http://opsupport.sscli.net/
----------------------------------------------------------------------------
----------

> I've written a COM Object that I cant call one of the methods from an ASP
> Page.
[quoted text clipped - 106 lines]
>
> End Class

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.