System.Web.Mail.SmtpMail.Send() causes COMException (0x80029c4a):Error loading type library/DLL.]

Discussion in 'ASP .Net' started by Eric van Wijk, May 25, 2005.

  1. Hi All,


    After installing SP1 for Windows 2003, I'm running into the 'Error
    loading type library/DLL' exception when using CDO through System.Web.Mail:

    -------------------------------------------
    //try {

    // security assertion
    SecurityPermission interopPermission = new
    SecurityPermission(SecurityPermissionFlag.UnmanagedCode);
    interopPermission.Demand();

    MailMessage mail = new MailMessage();

    if (ConfigurationSettings.AppSettings["smtpServer"] != null) {
    SmtpMail.SmtpServer =
    ConfigurationSettings.AppSettings["smtpServer"];
    //SmtpMail.SmtpServer.Insert(0,
    ConfigurationSettings.AppSettings["smtpServer"]);
    }
    mail.From = ConfigurationSettings.AppSettings["from"];
    mail.To = ConfigurationSettings.AppSettings["to"];
    mail.Subject = "ASP.NET CDO Test";
    mail.BodyFormat = MailFormat.Text;

    mail.Body = message.ToString();
    SmtpMail.Send(mail);
    /*
    } catch (Exception e) {
    Exception innerException = e;

    do {
    if (innerException is FileNotFoundException) {
    FileNotFoundException fileException =
    (FileNotFoundException)innerException;

    Trace.Warn(innerException.GetType().FullName,fileException.FileName,innerException);
    } else {

    Trace.Warn(innerException.GetType().FullName,String.Empty,innerException);
    }

    innerException = innerException.InnerException;
    } while (innerException != null);
    }
    */
    -------------------------------------------

    The code runs fine on Windows XP and another Windows 2003 Server which
    has had SP1 installed about a month ago.

    What I've already tried:
    - Mailing from VBScript using CDO directly: works, so CDO must installed
    correctly
    - Running the same code from a console app: works, so System.Web.Mail
    must be installed correctly
    - The sugestions from http://www.systemwebmail.com/faq/4.2.1.aspx: do
    NOT work



    Any help would be greatly welcomed, as I've been baning my head on this
    for more than a day now.


    Thx in adv.

    Eric
     
    Eric van Wijk, May 25, 2005
    #1
    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. Erwan
    Replies:
    0
    Views:
    2,296
    Erwan
    Apr 2, 2004
  2. DotNetGruven
    Replies:
    3
    Views:
    1,092
    Steven Cheng[MSFT]
    Apr 27, 2004
  3. chuckdfoster
    Replies:
    3
    Views:
    809
    =?Utf-8?B?Q2hpcCBQZXR0aXQ=?=
    Mar 1, 2005
  4. Diego F.
    Replies:
    1
    Views:
    661
    Diego F.
    Jun 6, 2005
  5. Nathan Sokalski
    Replies:
    3
    Views:
    1,973
    Larry Lard
    Nov 23, 2005
Loading...

Share This Page