PRB: Permission Denied While Using CDONTS to Send Mail with Exchange
ID: Q228465
|
The information in this article applies to:
-
Collaboration Data Objects (CDO) for NTS, version 1.2
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.
- Verify that HKEY_LOCAL_MACHINE\SYSTEM\CCS\Services\MSExchangeIMC\Parameters\RootDir exists and verify that the path exists. Append \pickup to the RootDir value and make sure that directory exists, too.
- 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.
- Let Dir be the directory specified in HKEY_LOCAL_MACHINE\SYSTEM\CCS\Services\MSExchangeIMC\Parameters\RootDir. Make sure Dir and its subdirectories allows change access to all.
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:
- Remove "Exchange Internet Mail Connector" via the Exchange Admin.
- Install the Option Pack SMTP Service.
- Re-install and configure the "Exchange Intenet Mail Connector." NOTE: This will disable the SMTP Service)
STATUS
This behavior is by design. In order for CDONTS to work properly the SMTP service must be installed.
MORE INFORMATION
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.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>CDONTS test email asp (out of process ).</title>
</head>
<body>
<%
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
%>
<p><strong>Your mail has been sent. </strong></p>
</body>
</html><BR/>
Try to run the asp and all the steps above and you will receive the permission denied error.
Additional query words:
Keywords : kbCDONTS kbfaq
Version : WINDOWS:1.2
Platform : WINDOWS
Issue type : kbprb