Support for CDO.message attributes

Discussion in 'ASP General' started by Neil Gould, Feb 22, 2010.

  1. Neil Gould

    Neil Gould Guest

    We recently moved a classic ASP-based website to a new hosting service
    running 2003 server and IIS6. For some reason, the .AddAttachment attribute
    that has run for years on other servers fails with an unknown error.

    * Is there some way of polling IIS via classic ASP to determine what
    attributes are supported?

    * Are there specific settings in IIS6 to enable/disable this capability?

    Thanks,

    Neil
    Neil Gould, Feb 22, 2010
    #1
    1. Advertising

  2. Neil Gould

    Neil Gould Guest

    Neil Gould wrote:
    > We recently moved a classic ASP-based website to a new hosting service
    > running 2003 server and IIS6. For some reason, the .AddAttachment
    > attribute that has run for years on other servers fails with an
    > unknown error.
    >
    > * Is there some way of polling IIS via classic ASP to determine what
    > attributes are supported?
    >
    > * Are there specific settings in IIS6 to enable/disable this
    > capability?
    >

    Are these the wrong questions to be asking, or is this as much as stumper
    for everyone as it is for me?

    --
    Thanks...

    Neil
    Neil Gould, Feb 24, 2010
    #2
    1. Advertising

  3. Neil Gould wrote:
    > Neil Gould wrote:
    >> We recently moved a classic ASP-based website to a new hosting
    >> service running 2003 server and IIS6. For some reason, the
    >> .AddAttachment attribute that has run for years on other servers
    >> fails with an unknown error.
    >>
    >> * Is there some way of polling IIS via classic ASP to determine what
    >> attributes are supported?
    >>
    >> * Are there specific settings in IIS6 to enable/disable this
    >> capability?
    >>

    > Are these the wrong questions to be asking, or is this as much as
    > stumper for everyone as it is for me?


    An unknown error isn't going to be easy for anyone to diagnose, but as a
    first guess I'd suggest the account running the World Wide Web Publishing
    Service doesn't have sufficient rights to read the file for the attachment.

    Andrew
    Andrew Morton, Feb 24, 2010
    #3
  4. Neil Gould

    Neil Gould Guest

    Andrew Morton wrote:
    > Neil Gould wrote:
    >> Neil Gould wrote:
    >>> We recently moved a classic ASP-based website to a new hosting
    >>> service running 2003 server and IIS6. For some reason, the
    >>> .AddAttachment attribute that has run for years on other servers
    >>> fails with an unknown error.
    >>>
    >>> * Is there some way of polling IIS via classic ASP to determine what
    >>> attributes are supported?
    >>>
    >>> * Are there specific settings in IIS6 to enable/disable this
    >>> capability?
    >>>

    >> Are these the wrong questions to be asking, or is this as much as
    >> stumper for everyone as it is for me?

    >
    > An unknown error isn't going to be easy for anyone to diagnose, but
    > as a first guess I'd suggest the account running the World Wide Web
    > Publishing Service doesn't have sufficient rights to read the file
    > for the attachment.
    >

    Thanks for the idea, Andrew. It seems like a place to start looking.

    Is there a setting in IIS6 to provide such rights to the account?

    --
    Best,

    Neil
    Neil Gould, Feb 24, 2010
    #4
  5. Neil Gould wrote:
    <the .AddAttachment attribute that has run for years on other servers fails
    with an unknown error>

    > Andrew Morton wrote:
    >> An unknown error isn't going to be easy for anyone to diagnose, but
    >> as a first guess I'd suggest the account running the World Wide Web
    >> Publishing Service doesn't have sufficient rights to read the file
    >> for the attachment.
    >>

    > Thanks for the idea, Andrew. It seems like a place to start looking.
    >
    > Is there a setting in IIS6 to provide such rights to the account?


    You can right-click the folder in IIS Manager (or Windows Explorer) and
    manipulate the permissions there or at a command prompt with, e.g. icacls.

    An easy way to see which account is trying to access the file is by using
    Process Monitor
    http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx

    and filtering it for the file name you're having trouble with.

    I don't know which account would be used for ASP (ASP.NET uses "Application
    Pools" which can have their own accounts). Be careful not to give excessive
    rights to anything like the Windows directory; it may be better to have a
    directory dedicated for the attachments.

    HTH,

    Andrew
    Andrew Morton, Feb 25, 2010
    #5
  6. Neil Gould

    Neil Gould Guest

    Andrew Morton wrote:
    > Neil Gould wrote:
    > <the .AddAttachment attribute that has run for years on other servers
    > fails with an unknown error>
    >
    >> Andrew Morton wrote:
    >>> An unknown error isn't going to be easy for anyone to diagnose, but
    >>> as a first guess I'd suggest the account running the World Wide Web
    >>> Publishing Service doesn't have sufficient rights to read the file
    >>> for the attachment.
    >>>

    >> Thanks for the idea, Andrew. It seems like a place to start looking.
    >>
    >> Is there a setting in IIS6 to provide such rights to the account?

    >
    > You can right-click the folder in IIS Manager (or Windows Explorer)
    > and manipulate the permissions there or at a command prompt with,
    > e.g. icacls.
    >
    > An easy way to see which account is trying to access the file is by
    > using Process Monitor
    > http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx
    >
    > and filtering it for the file name you're having trouble with.
    >
    > I don't know which account would be used for ASP (ASP.NET uses
    > "Application Pools" which can have their own accounts). Be careful
    > not to give excessive rights to anything like the Windows directory;
    > it may be better to have a directory dedicated for the attachments.
    >

    Thanks again, Andrew. As I have no access to the IIS settings for our
    account, I'll pass this on to the hosting service, as they asked whether
    there was an IIS setting that I wanted changed. Your suggestion gives me
    something else to think about... is it possible that there is an IIS
    restriction that would prevent sending attachments from the same directory
    as the script?

    --
    Best,

    Neil
    Neil Gould, Feb 25, 2010
    #6
  7. Neil Gould wrote:
    > Thanks again, Andrew. As I have no access to the IIS settings for our
    > account, I'll pass this on to the hosting service, as they asked
    > whether there was an IIS setting that I wanted changed. Your
    > suggestion gives me something else to think about... is it possible
    > that there is an IIS restriction that would prevent sending
    > attachments from the same directory as the script?


    Ah, well, all bets are off if the file is in the same directory as the
    script, as whichever account is running ASP must already have sufficient
    access to that directory. Umm... just thought... you are giving a full path
    for the attachment, aren't you?

    You're going to have to find out what the unknown error really is.

    FWIW, I just dug up some old ASP site and found I used to use Persits
    AspEmail (freeware). If your hosting company will install it, at least you
    stand a chance of getting a known error from it.

    Andrew
    Andrew Morton, Feb 25, 2010
    #7
  8. Neil Gould

    Neil Gould Guest

    Andrew Morton wrote:
    > Neil Gould wrote:
    >> (snip) Your
    >> suggestion gives me something else to think about... is it possible
    >> that there is an IIS restriction that would prevent sending
    >> attachments from the same directory as the script?

    >
    > Ah, well, all bets are off if the file is in the same directory as the
    > script, as whichever account is running ASP must already have
    > sufficient access to that directory. Umm... just thought... you are
    > giving a full path for the attachment, aren't you?
    >

    Well, I THOUGHT so, but I managed to get it working by relocating the
    attachment to another directory and providing a full path to the file via
    Server.mappath.

    Thanks for stimulating my old brain cells!

    --
    Best,

    Neil
    Neil Gould, Feb 25, 2010
    #8
  9. Neil Gould wrote:
    > Andrew Morton wrote:
    >> Neil Gould wrote:
    >>> (snip) Your
    >>> suggestion gives me something else to think about... is it possible
    >>> that there is an IIS restriction that would prevent sending
    >>> attachments from the same directory as the script?

    >>
    >> Ah, well, all bets are off if the file is in the same directory as
    >> the script, as whichever account is running ASP must already have
    >> sufficient access to that directory. Umm... just thought... you are
    >> giving a full path for the attachment, aren't you?
    >>

    > Well, I THOUGHT so, but I managed to get it working by relocating the
    > attachment to another directory and providing a full path to the file
    > via Server.mappath.


    Glad you got it working.

    > Thanks for stimulating my old brain cells!


    You're welcome :)

    Andrew
    Andrew Morton, Feb 25, 2010
    #9
    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. Anthony Fine
    Replies:
    3
    Views:
    3,168
    Jure Spik
    Feb 12, 2004
  2. Cyndia A.
    Replies:
    0
    Views:
    624
    Cyndia A.
    Jan 14, 2004
  3. Lars-Erik Aabech

    Could not access 'CDO.Message' object

    Lars-Erik Aabech, Mar 3, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    2,771
    Henrik_the_boss
    Mar 4, 2004
  4. Guest
    Replies:
    2
    Views:
    859
    dave wanta
    Jul 11, 2003
  5. Replies:
    0
    Views:
    270
Loading...

Share This Page