ASPNET user and CDO

  • Thread starter Thread starter Damien
  • Start date Start date
D

Damien

Hi all,

I have a problem in and around the ASPNET user and CDO, my code is as
follows



using System;

using System.Web.Mail;



MailMessage mm = new MailMessage();



//set the properties

mm.To = "(e-mail address removed)";

mm.Subject = "subject - test";

mm.Body = "message - test";

mm.From = "(e-mail address removed)";

SmtpMail.Send(mm);



If I round this code from a test harness it works fine but I fire it from an
ASP.NET application I get the following error



Message : Could not access 'CDO.Message' object.

Source : System.Web

Inner Ex : Exception has been thrown by the target of an
invocation.



which lead me to believe that this was a permissions error, so I added the
ASPNET user to the administrators group to narrow down possibilities and
this allowed the application to mail away tills its hearts content
unfortunately my customer would not be happy (r they ever) with the ASPNET
user having admin rights.



Does anyone have an idea of what specifically the ASPNET user needs to
access the CDO class.



I have used this functionality before with no trouble but the whole company
has just recently updated windows 2000 to service pack 4



Cheers D
 
Back
Top