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

  2. Neil Gould

    Neil Gould Guest

    Are these the wrong questions to be asking, or is this as much as stumper
    for everyone as it is for me?
     
    Neil Gould, Feb 24, 2010
    #2
    1. Advertisements

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

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

    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?
     
    Neil Gould, Feb 25, 2010
    #6
  7. 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

    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!
     
    Neil Gould, Feb 25, 2010
    #8
  9. Glad you got it working.
    You're welcome :)

    Andrew
     
    Andrew Morton, Feb 25, 2010
    #9
    1. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.