Microsoft KB Archive/228465

= PRB: Permission Denied While Using CDONTS to Send Mail with Exchange =

PSS ID Number: 228465

Article Last Modified on 3/4/2004

-

The information in this article applies to:


 * Collaboration Data Objects (CDO) for NTS 1.2

-



This article was previously published under Q228465



SYMPTOMS
When attempting to send e-mail from an Active Server Pages (ASP) page that uses the CDONTS.NEWMAIL object (out of process), you receive the following error message:

Permission Denied

This error occurs on machines with the following configuration:
 * Windows NT Server 4.0 with Internet Information Server (IIS) 2.0
 * Windows NT SP3
 * Internet Explorer 4.0
 * Options Pack (Upgrade only - Do not install SMTP Service)
 * Exchange 5.5
 * Exchange Internet Mail Service
 * Exchange 5.5 SP1
 * Exchange 5.5 SP2



CAUSE
This problem occurs when you select the Upgrade Only option while installing Windows NT Server Option Pack 4.



RESOLUTION
Adding "IUSR_Machinename" to the admin group resolves the error, but you need to remove the IUSR_Machinename from the admin group for security reasons. In addition, check the IUSR account, and make sure it still has access to all exchange folders and the Metabase.bin file (since you are running CDONTS out of process).

Verify the following settings in the registry:  Verify that the Exchange IMS is installed and functioning. Verify that HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Exchange\Active Messaging\Use Exchange exists and is set to 1. Change the access for the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Exchange\Active Messaging key to allow full control to all. Change the access for the HKEY_LOCAL_MACHINE\SYSTEM\CCS\Services\MSExchangeIMC\Parameters key to allow full control to all. In Windows Explorer, browse to the folder specified in HKEY_LOCAL_MACHINE\SYSTEM\CCS\Services\MSExchangeIMC\Parameters\RootDir. Give  CHANGE permission on the Pickup subdirectory. For detailed information, see the following article in the Microsoft Knowledge Base:

197619 Runtime Error '800a0046' Using the Send Method of CDONTS.NewMail

</ol>

After following these steps, the same error appears.

When the Windows NT Server Option Pack is installed, select the Upgrade Plus option during setup instead of Upgrade Only option. This option installs the SMTP Service, among others, that is needed for CDONTS for work properly.

Use these steps for another resolution:


 * 1) Remove "Exchange Internet Mail Connector" via the Exchange Admin.
 * 2) Install the Option Pack SMTP Service.
 * 3) Re-install and configure the "Exchange Intenet Mail Connector." NOTE: This will disable the SMTP Service)

<div class="status_section">

STATUS
This behavior is by design. In order for CDONTS to work properly the SMTP service must be installed.

<div class="moreinformation_section">

Steps to Reproduce Behavior
Use a machine with the following configuration.


 * Windows NT Server 4.0 (with IIS 2.0)
 * Windows NT SP3
 * Internet Explorer 4.0
 * Options Pack (Upgrade only - does not install SMTP Service)
 * Exchange 5.5
 * Exchange Internet Mail Service
 * Exchange 5.5 SP1
 * Exchange 5.5 SP2

Copy and pass the following code in an ASP file. Change the e-mail address to your e-mail address.

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> CDONTS test email asp (out of process ).

<%

Set objMail = Server.CreateObject("CDONTS.NewMail") objMail.From = "PutYourEmailAddressHere" objMail.To = "PutYourEmailAddressHere" objMail.Subject="Test Email" objMail.Body = "Test Email" objMail.Send Set objMail = nothing %>

Your mail has been sent.

<BR/> Try to run the asp and all the steps above and you will receive the permission denied error.

Keywords: kbFAQ kbprb KB228465

Technology: kbAudDeveloper kbCDO120NTS kbCDOsearch kbExchangeSearch

-

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

© Microsoft Corporation. All rights reserved.