Microsoft KB Archive/329269

= CDOSYS Tries to Start the IIS Admin Service =

Article ID: 329269

Article Last Modified on 2/1/2007

-

APPLIES TO


 * Microsoft Windows 2000 Standard Edition
 * Microsoft Windows XP Professional

-



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 &quot;The service cannot be started, either because it is disabled or because it has no enabled devices associated with it. &quot; attempting to start the service IISADMIN with arguments &quot;&quot; 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.



Steps to Reproduce the Behavior
 Right-click the My Computer icon on your desktop, and then click Manage. In the left pane of the Computer Management window, expand Services and Applications, and then click Services. In the right pane of the Computer Management window, click IIS Admin Service. In Windows XP, click IIS Admin. Click the Stop Service button on the toolbar. Answer &quot;Yes&quot; if you are warned about stopping other services.  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 = &quot;MySMTPServer&quot; ' Name or IP address of SMTP server Const MyToAddress = &quot;MyRecip@MyDomain.com&quot; ' SMTP address to send message to Const MyFromAddress = &quot;MyAccount@MyDomain.com&quot; ' SMTP address to send message from

Set iMsg = CreateObject(&quot;CDO.Message&quot;) Set iConf = CreateObject(&quot;CDO.Configuration&quot;)

Set Flds = iConf.Fields

' Set the CDOSYS configuration fields to use port 25 on the SMTP server.

With Flds .Item(&quot;http://schemas.microsoft.com/cdo/configuration/sendusing&quot;) = cdoSendUsingPort 'ToDo: Enter name or IP address of remote SMTP server. .Item(&quot;http://schemas.microsoft.com/cdo/configuration/smtpserver&quot;) = MySMTPServer .Item(&quot;http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout&quot;) = 10 .Item(&quot;http://schemas.microsoft.com/cdo/configuration/smtpserverport&quot;) = 25 .Update End With

' Build HTML for message body. strHTML = &quot;<HTML>&quot; strHTML = strHTML & &quot;<HEAD>&quot; strHTML = strHTML & &quot;<BODY>&quot; strHTML = strHTML & &quot; This is the test HTML message body &quot; strHTML = strHTML & &quot;</BODY>&quot; strHTML = strHTML & &quot;</HTML>&quot;

' Apply the settings to the message. With iMsg Set .Configuration = iConf .To = MyToAddress .From = MyFromAddress .Subject = &quot;This is a test CDOSYS message (Sent via Port 25)&quot; .HTMLBody = strHTML .Send End With

' Clean up variables. Set iMsg = Nothing Set iConf = Nothing Set Flds = Nothing

MsgBox &quot;Mail Sent!&quot; </li> Double-click the CDOTest.vbs file on your desktop. The script executes, and a dialog appears that says &quot;Mail Sent!&quot;.</li> 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.</li> Verify that the mail was delivered.</li></ol>

Keywords: kberrmsg kbbug kbprb KB329269

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.