Link to home
Start Free TrialLog in
Avatar of rune711
rune711

asked on

CDONTS permissions error

I am having the classic "permission denied" error when attempting to send mail using the CDONTS object. The cause(s) of my problem seem different though.  I have tried checking the permissions on the Inetpub/mailroot folder and subfolders, and all include the IUSR, and IWAM accounts.  The CDONTS.dll is registered. (And I don't get an error when doing a server.createobject). I have checked the permissions on the CDONTS.dll and it includes both the IUSR and IWAM accounts.  I have run through the SMTP server control panel and set all the security settings for anonymous users.  STILL NO GO!

The sad part is that this was working fine until I removed the SMTP and FTP services during a security review... realizing my mistake I re-installed the SMTP service, but now I have this problem.

Thanks for any help!!!
Avatar of esteban_felipe
esteban_felipe

Hi rune711,
This had worked for some people before: http://www.5rocks.com/item.asp?ID=506

Check it out

Cheers!
You should change to CDO when you get the chance anyway.
Have you tried moving over to CDO
Avatar of rune711

ASKER

esteban,

I tried that, but unfortunately I get a runtime error on that script. (line 4, subscript out of range).

No, I haven't tried moving to CDO... Like I said, it was working on CDONTS before, and I'm just trying to get it back.  Would I have to re-write the app to us CDO?

-rune
You would just need to change the mailing part of the app. A basic example of using CDO is

Dim iMsg
Dim iConf

Set iMsg = CreateObject("CDO.Message")

With iMsg
.To = "sdsds@wsdsd.com"
.CC = "sdsds@wsdsd.com"
.From = "sdsds@wsdsd.com"
.Subject = "test"
.HTMLBody = "hello"
.Send
End With

Set iMsg = Nothing
Set iConf = Nothing
Avatar of rune711

ASKER

Do I need to register CDO, or is that in Win2000 by default?
CDONTS is actually part of CDO specifically designed to allow SMPT access from IIS without needing an Exchange server.
If all you want to do is SMTP traffic then there are no advantages to using CDO. Moreover all sending SMTP traffic via Exchange will do is route it through to the SMTP server that isn't working!!

Steve
If CDONTS is part of CDO like mouatts says then you are wasting your time even trying my suggestion and as no one else has added anything then you have to give esteban_felipe's page a try or wait for someone else to add something more relevant.
Are you getting anything in the badmail folder, or the outgoing folder? Do you have SMTP relay configured properly, if you are using it to relay to your exchange server? There are also some settings on the exchange server that must be set to allow relaying, but if you already had it working, I bet this is not the issue.

HTH,

Aggieangler
Avatar of Michel Sakr
scroll down and check the problems section:
http://www.aspfaq.com/show.asp?id=2026
Avatar of rune711

ASKER

There is no exchange server. Maybe it's the relaying I don't understand... how is this usually configured? Would improper relaying result in a premissions error?
Avatar of rune711

ASKER

Also,I tried using cdo, but I get the error

CDO.Message.1 (0x80070005)
Access is denied.
line 67

*SIGH*....
I have always used this by setting up a relay to an exchange server that allows a SMTP dropoff. I have done the dropoff from IIS to an exchange server, and a lotus notes server. You could be getting a permissions error on the dropoff side, although it sounds like you still night not have CDONTS reinstalled right.
Hi rune711

Check my last post here, lot of that going around at the moment, done any security updates lately?

https://www.experts-exchange.com/questions/20887018/ASP-and-CDO-Message-Problems.html

Alan Warren
Avatar of rune711

ASKER

Hi all,

Afraid it's still no go.  Alan, I tried setting up the authentication as you outlined in your other post, but I still get the "access is denied" error.  The oConfiguration portion runs fine, it's just the .send command that generates the error.

There is nothing in any of the mailRoot folders. I just don't think that the mail ever even tries to send.  It seems like access to CDONTS, and CDO is denied for the IUSR account?  I have checked CDONTS.dll and the IUSR, IWAM, have full access to them... I'm not sure if that's really how you need to set it up or not...

Yes, I have installed security patches.  I always install critical updates. While I can certainly understanst MSFT clinching down on security, the can't BREAK SMTP...

I'm out of ideas!

-rune

you may want to check on the permissions of the actual mail folders on the server. I think they are by default under inetpub/mailroot.

IUSR and IWAM will need perms to read/write/execute I think.

Aggieangler
Avatar of rune711

ASKER

Yeah, as I mentioned in my initial post, I have checked that.
Hi rune711

Sorry to hear you are still having problems with this, not really sure what gives.
When I was doing battle with this problem I originally set the user authentication to myDomain\Administrator and used the administrator pwd, to ensure that it wasn't a permissions thing.
Once I had it working with administrator account I experimented with lesser roles because I was concerned about sending the password, I found that even the lowliest authenticated role would suffice. I'll explain my steps a little more, dont mean to over do it, but it may help.
When setting up a domain user on win2000 server, I used the Active direcory Users and Computers snapin.
Right clicked users > All tasks > add new user.
When prompted 'do you want to set up an exchange mail account for this user'? I chose yes, not that I will ever use it for incoming mail or that I will ever open outlook for this user, I chose yes because in doing so a valid mapi profile is created. CDO is a wrapper for mapi and needs a valid mapi profile.
I had a similar problem when setting up sql mail. SQLmail will only send mail if the user account that starts SQLmail is the same user account that is used to start SQL server and if a valid mapi profile for that user exists.
In order to get SQLmail to work I had to create and configure outlook for the designated user, same user that starts SQLmail and SQLserver, I never use this outlook profile, never opened outlook again  for the user, but Outlook created the mapi profile I needed to make sqlMail work.
This may all be irrelevant to your situation, if so I am sorry for wasting your time.

All the best, hope you manage to get it sorted out.

Alan
Hi rune711

Just tested the script I posted at the other link on a vanilla win2000 pro machine with IIS installed the mesages appear in C:\Inetpub\mailroot\Queue I can open them with outlook express by dblclicking.

On this machine the messages stall in the Queue, but that is another issue, probably need to set up smarthost with the outgoing mail server for my ISP 'smtp.ozonline.com'

Good luck mate.
Alan
Avatar of rune711

ASKER

What is smarthost,  how is it set up?
Right click MyComputer > Manage
Expand Internet Information Services
Right click SMTP Mail icon > Properties
Click the delivery tab > Advanced
Wher it says Smart Host put the IP address of your ISP's mail server, in my case from home on a vanilla win2000 box with IIS installed using dialup to ozonline my outgoing mail server is smtp.ozonline.com.au, if I ping smtp.ozonline.com.au the ping returns [203.4.248.48] that is what I entered in smarthost, must use the square brackets, If you have your own mail server use that IP
I then cleared all the stalled messages in the C:\Inetpub\mailroot\Queue and restarted IIS by right clicking top level container for IIS in MyComputer > Manage snapin

mail is now sending instantly, good luck.

Alan
Really appreciate the mighty CV job you are doing here, thank you.

However,
I feel that some, if not all of the contributors to this thread are deserving of some recompense for their efforts.

Alan (PE databases)
ASKER CERTIFIED SOLUTION
Avatar of modulo
modulo

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial