Groups | Blog | Home
all groups > inetserver asp general > july 2005 >

inetserver asp general : '800a0046' Permission denied error with ASP sendmail script



Jason
7/29/2005 1:31:13 PM
it works from my logon (domain admin account), but everyone else gets

Microsoft VBSCript runtime error '800a0046' Permission denied
path/patj/script.asp line 16

I looked at a lot of articles and gave the IIS accounts full access to
the mailroot folder, along with the 'regular' domain user account I am
using to test... still no good.
also to the directory in which the script(s) reside
Anyone have a definitive answer on the permissions need to run these
scripts?

We started having this problem after I migrated to Windows 2003
Server/IIS 6

Thanks in Advance

-J
J L
7/29/2005 1:57:32 PM
It was a sample script from Microsoft.

<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 = "email@domain.org"
objMail.To = "email@domain.org"
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


J L
7/29/2005 3:06:33 PM
my web designer requested the CDONTS.dLL, so i moved it from a w2k
server and registered it (per some MS article)

Why is CDO the move instead of the CFONTS? I think my guy is a little
better versed in coding using the CDONTS

The thing is, the script works if I'm logged on as me. I gave the IIS
accounts full access to all of the mailroot subdirectories...

its a w2003 SP1 server.

-J



Curt_C [MVP]
7/29/2005 4:05:31 PM
[quoted text, click to view]

Windows 2003 & CDONTS
Do a quick search on that one once...you'll see quickly...


--
Curt Christianson
site: http://www.darkfalz.com
Ray Costanzo [MVP]
7/29/2005 4:42:52 PM
What's on line 16?

Ray at work

[quoted text, click to view]

Ray Costanzo [MVP]
7/29/2005 5:06:30 PM
So, what is on line 16? objMail.Send?

Whatever account is processing the script, typically IUSR_machine-name,
needs to have permission to write to C:\Inetpub\mailroot\pickup (default
path, anyway).

Are you running this on a Windows NT server? If not, do not use CDONTS.
That's so 90s and doesn't exist on a 2003 server. Instead, use CDOSYS.
Sample code here: http://www.aspfaq.com/show.asp?id=2026

Ray at work

[quoted text, click to view]

J L
8/1/2005 6:43:28 AM
I tried some of those sample CDO scripts, and I keep getting this:
CDO.Message.1 error '80040213'

The transport failed to connect to the server.

/stafftest/Board/Forum/Jason2.asp, line 15

as far as the mailroot directories, I gave the IUSR and the IWAM account
full access.



Ray Costanzo [MVP]
8/1/2005 9:28:31 AM

[quoted text, click to view]

Your designer gets to make such decisions?!


[quoted text, click to view]

I don't know. I guess for the same reason that fuel injection is better
than carburetion.


[quoted text, click to view]

Try it with CDO. And when you say you gave IIS permission, what account are
you speaking of, exactly?

Ray at work

Ray Costanzo [MVP]
8/1/2005 9:52:22 AM
8| Classic ASP? Can you show your code please? Everything up to about
line 18 or so.

Thanks,

Ray at work

[quoted text, click to view]

J L
8/1/2005 9:59:29 AM
I took out the actual email addresses, but this is a sample from
Microsofts' site. I also tried the sample codes on that ASP site you
referred me to earlier.

<%
Set objEmail = CreateObject("CDO.Message")
objEmail.From = "emailaddiereplaced here"
objEmail.To = "emailaddiereplaced here"
objEmail.Subject = "Server down"
objEmail.Textbody = "Server1 is no longer accessible over the network."
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = _
"MySMTPHost"
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objEmail.Configuration.Fields.Update
objEmail.Send

%>

AddThis Social Bookmark Button