CDOSYS Tries to Start the IIS Admin Service (329269)



The information in this article applies to:

  • the operating system: Microsoft Windows 2000
  • the operating system: Microsoft Windows XP

This article was previously published under Q329269

SYMPTOMS

When you use CDOSYS on computers that have the IIS Admin service stopped or turned off, you may notice an attempt to start this service. If the service is stopped, the service starts when CDOSYS code is executed. If the service is turned off, an error is logged in the Application Event log: Event Type: Error
Event Source: DCOM
Event Category: None
Event ID: 10005

DCOM got error "The service cannot be started, either because it is disabled or because it has no enabled devices associated with it. " attempting to start the service IISADMIN with arguments "" in order to run the server: {A9E69610-B80D-11D0-B9B9-00A0C922E750} In both cases, the mail is sent successfully. While this behavior is expected if you send mail by using the pickup directory, cdoSendUsingPickup, this behavior is not expected if you send mail by using the port directory, cdoSendUsingPort.

CAUSE

This behavior occurs because CDOSYS queries the Internet Information metabase during initialization of its objects to obtain default values. Querying the metabase causes the IIS Admin service to start.

Note Any component or service that tries to query the metabase causes the IIS Admin service to start. These symptoms are not specific to CDOSYS.

STATUS

This behavior is by design.

MORE INFORMATION

Steps to Reproduce the Behavior

  1. Right-click the My Computer icon on your desktop, and then click Manage.
  2. In the left pane of the Computer Management window, expand Services and Applications, and then click Services.
  3. In the right pane of the Computer Management window, click IIS Admin Service.
  4. In Windows XP, click IIS Admin.
  5. Click the Stop Service button on the toolbar. Answer "Yes" if you are warned about stopping other services.
  6. Open Notepad. Paste the following code into Notepad, and then save it to the desktop as the CDOTest.vbs file.
    ' Send by connecting to port 25 of the SMTP server.
    Dim iMsg 
    Dim iConf 
    Dim Flds 
    Dim strHTML
    
    Const cdoSendUsingPort = 2
    
    ' TODO: Change these values to appropriate values for your environment
    Const MySMTPServer = "MySMTPServer" ' Name or IP address of SMTP server
    Const MyToAddress = "MyRecip@MyDomain.com" ' SMTP address to send message to
    Const MyFromAddress = "MyAccount@MyDomain.com" ' SMTP address to send message from
    
    Set iMsg = CreateObject("CDO.Message")
    Set iConf = CreateObject("CDO.Configuration")
    
    Set Flds = iConf.Fields
    
    ' Set the CDOSYS configuration fields to use port 25 on the SMTP server.
    
    With Flds
       .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = cdoSendUsingPort
       'ToDo: Enter name or IP address of remote SMTP server.
       .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = MySMTPServer 
       .Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 10
       .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25  
       .Update
    End With
    
    ' Build HTML for message body.
    strHTML = "<HTML>"
    strHTML = strHTML & "<HEAD>"
    strHTML = strHTML & "<BODY>"
    strHTML = strHTML & "<b> This is the test HTML message body</b></br>"
    strHTML = strHTML & "</BODY>"
    strHTML = strHTML & "</HTML>"
    
    ' Apply the settings to the message.
    With iMsg
       Set .Configuration = iConf
       .To = MyToAddress
       .From = MyFromAddress
       .Subject = "This is a test CDOSYS message (Sent via Port 25)"
       .HTMLBody = strHTML
       .Send
    End With
    
    ' Clean up variables.
    Set iMsg = Nothing
    Set iConf = Nothing
    Set Flds = Nothing
    
    MsgBox "Mail Sent!"
    						
  7. Double-click the CDOTest.vbs file on your desktop. The script executes, and a dialog appears that says "Mail Sent!".
  8. Check the status of the IIS Admin Service in the Computer Management window. It should be started.

    You may have to refresh the view. To do so, click Refresh on the Action menu.
  9. Verify that the mail was delivered.

Modification Type:MinorLast Reviewed:7/13/2005
Keywords:kberrmsg kbBug kbprb KB329269