If you still use CDONTS object in your ASP page and run into this kind of error:
Microsoft VBScript runtime error '800a0046' Permission denied /path/filename.asp, line 4
Then when you open the file, you see something like this.
Set oCDOMail = Server.CreateObject("CDONTS.NewMail") oCDOMail.Importance = 1 oCDOMail.Send
Just by reading the error message, you can probably guess that this error occurs usually because the anonymous user account is not granted a Modify permission to the mailroot folder and it can be easily resolved by following these steps:
- Open Windows Explorer and locate the mailroot folder. The default should be C:\inetpub\mailroot, but this may be moved by your system administrator.
- Right-click the mailroot folder, then click Properties.
- On the Security tab, click on the Edit button.
- Click Add.
- Add IUSR_
and IWAM_ (separated by a semi-colon). Make sure the location is your desktop, not your domain name. Click Check Names, then OK.
- Give Modify permission for each of the account added previously. Click OK.
- Click OK to close the dialog box.
This time your asp page should render without any issues.
As in our exprience, there will be time when you upgrade a very old system, when you try to grant these permissions, you’ll see some garbled error message and it still doesn’t resolve the problem. When all else fails, and it may be easier and faster to replace the code using CDO (cdosys.dll).