Support for CDO.message attributes

N

Neil Gould

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
 
N

Neil Gould

Neil said:
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?
 
A

Andrew Morton

Neil said:
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
 
N

Neil Gould

Andrew said:
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?
 
A

Andrew Morton

Neil Gould wrote:
<the .AddAttachment attribute that has run for years on other servers fails
with an unknown error>
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
 
N

Neil Gould

Andrew said:
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.
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?
 
A

Andrew Morton

Neil said:
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
 
N

Neil Gould

Andrew said:
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!
 
A

Andrew Morton

Neil said:
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
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,990
Messages
2,570,211
Members
46,796
Latest member
SteveBreed

Latest Threads

Top