Professional Web Applications Themes

ASPNET user and CDO - ASP.NET Security

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 = "dum.dumbdumb.com"; mm.Subject = "subject - test"; mm.Body = "message - test"; mm.From = "dum.dumbdumb.com"; 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 ...

  1. #1

    Default ASPNET user and CDO

    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 = "dum.dumbdumb.com";
    mm.Subject = "subject - test";
    mm.Body = "message - test";
    mm.From = "dum.dumbdumb.com";
    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



    Damien Guest

  2. #2

    Default Re: ASPNET user and CDO

    Make sure that the ASPNET account has read access to the CDOSYS.DLL (usually
    in System32) and that it can write to the InetPub\MailRoot directories.

    Jeff

    "Damien" <damien.mccartneybicsystems.com> wrote in message
    news:xhdjb.322$wM6.347819newsfep1-win.server.ntli.net...
    > 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 = "dum.dumbdumb.com";
    > mm.Subject = "subject - test";
    > mm.Body = "message - test";
    > mm.From = "dum.dumbdumb.com";
    > 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
    >
    >
    >

    Jeff Guest

Similar Threads

  1. User ASPNET
    By João Abreu in forum ASP.NET Security
    Replies: 4
    Last Post: May 16th, 09:30 PM
  2. ASPNET User ID Permissions
    By lhowe2001@onebox.com in forum ASP.NET Security
    Replies: 2
    Last Post: April 6th, 02:06 AM
  3. Replies: 0
    Last Post: February 2nd, 07:00 AM
  4. No ASPNET user created
    By Jamie Anderson in forum ASP.NET Security
    Replies: 1
    Last Post: August 14th, 02:05 PM
  5. ASPNET user.
    By J. Marcelo Barbieri in forum ASP.NET General
    Replies: 1
    Last Post: July 30th, 06:23 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139