'800a0046' Permission denied error with ASP sendmail script

Discussion in 'ASP General' started by Jason, Jul 29, 2005.

  1. Jason

    Jason Guest

    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
    Jason, Jul 29, 2005
    #1
    1. Advertising

  2. What's on line 16?

    Ray at work

    "Jason" <> wrote in message
    news:...
    > 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
    >
    Ray Costanzo [MVP], Jul 29, 2005
    #2
    1. Advertising

  3. Jason

    J L Guest

    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 = ""
    objMail.To = ""
    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


    *** Sent via Developersdex http://www.developersdex.com ***
    J L, Jul 29, 2005
    #3
  4. Jason

    Curt_C [MVP] Guest

    J L wrote:
    > 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 = ""
    > objMail.To = ""
    > 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
    >
    >
    > *** Sent via Developersdex http://www.developersdex.com ***


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


    --
    Curt Christianson
    site: http://www.darkfalz.com
    blog: http://blog.darkfalz.com
    Curt_C [MVP], Jul 29, 2005
    #4
  5. 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

    "J L" <> wrote in message
    news:...
    > 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 = ""
    > objMail.To = ""
    > 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
    >
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
    Ray Costanzo [MVP], Jul 29, 2005
    #5
  6. Jason

    J L Guest

    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



    *** Sent via Developersdex http://www.developersdex.com ***
    J L, Jul 29, 2005
    #6
  7. "J L" <> wrote in message
    news:%...
    > my web designer requested the CDONTS.dLL, so i moved it from a w2k
    > server and registered it (per some MS article)


    Your designer gets to make such decisions?!


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


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


    > 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...


    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], Aug 1, 2005
    #7
  8. Jason

    J L Guest

    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.



    *** Sent via Developersdex http://www.developersdex.com ***
    J L, Aug 1, 2005
    #8
  9. 8| Classic ASP? Can you show your code please? Everything up to about
    line 18 or so.

    Thanks,

    Ray at work

    "J L" <> wrote in message
    news:...
    > 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.
    >
    >
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
    Ray Costanzo [MVP], Aug 1, 2005
    #9
  10. Jason

    J L Guest

    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

    %>

    *** Sent via Developersdex http://www.developersdex.com ***
    J L, Aug 1, 2005
    #10
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. sugapablo
    Replies:
    0
    Views:
    2,152
    sugapablo
    Sep 21, 2007
  2. Andrzej Adam Filip
    Replies:
    0
    Views:
    4,081
    Andrzej Adam Filip
    Mar 31, 2008
  3. nicholas.gadacz

    Microsoft VBScript runtime error '800a0046'

    nicholas.gadacz, Oct 21, 2003, in forum: ASP General
    Replies:
    3
    Views:
    440
    Bob Barrows
    Oct 22, 2003
  4. Chris Mescher

    localstart.asp has error 800a0046

    Chris Mescher, Sep 12, 2004, in forum: ASP General
    Replies:
    1
    Views:
    344
    Jeff Cochran
    Sep 13, 2004
  5. stevewa
    Replies:
    2
    Views:
    442
    stevewa
    Aug 13, 2008
Loading...

Share This Page