Unable to send an email - cdosys.dll problem

Discussion in 'ASP .Net' started by Akbur, Apr 13, 2007.

  1. Akbur

    Akbur Guest

    Dear all,

    I'm having major issues sending an email from my ASP.NET app.

    I'm getting a "Could not create 'CDO.Message' object".

    When I did a search for cdosys.dll in \win_location\system32, I could
    not find it. So I copied it from another Windows 2003 server, where
    it did exist. Another dependant file was missing too (inetcomm.dll).

    I've tried registering cdosys.dll using regsvr32 cdosys.dll and also
    regsvr32 \win_location\system32\cdosys.dll but I keep getting an error
    'LoadLibrary(...) failed - a dynamic link library (DLL) initialization
    routine failed'. The same happens when I try to registry
    inetcomm.dll.

    An SMTP service is installed on the Windows 2003 machine I am dealing
    with. I have a feeling it is because cdosys.dll does not exist in the
    registry which is why the error is occuring, but I do not know how to
    overcome the LoadLibrary failure message.

    Can anyone advise? I've read lots of good articles on the net but to
    no avail.

    Thanks,
    Akbur
     
    Akbur, Apr 13, 2007
    #1
    1. Advertising

  2. Akbur

    Mark Rae Guest

    "Akbur" <> wrote in message
    news:...

    > I'm having major issues sending an email from my ASP.NET app.
    >
    > I'm getting a "Could not create 'CDO.Message' object".
    >
    > When I did a search for cdosys.dll in \win_location\system32, I could
    > not find it. So I copied it from another Windows 2003 server, where
    > it did exist. Another dependant file was missing too (inetcomm.dll).
    >
    > I've tried registering cdosys.dll using regsvr32 cdosys.dll and also
    > regsvr32 \win_location\system32\cdosys.dll but I keep getting an error
    > 'LoadLibrary(...) failed - a dynamic link library (DLL) initialization
    > routine failed'. The same happens when I try to registry
    > inetcomm.dll.
    >
    > An SMTP service is installed on the Windows 2003 machine I am dealing
    > with. I have a feeling it is because cdosys.dll does not exist in the
    > registry which is why the error is occuring, but I do not know how to
    > overcome the LoadLibrary failure message.
    >
    > Can anyone advise? I've read lots of good articles on the net but to
    > no avail.


    Well, first things first... You say you are using ASP.NET, so what on earth
    are you trying to do with cdosys.dll...?????

    To send email in any .NET application, all you need is the System.Net.Mail
    namespace, and a valid SMTP queue:
    http://www.systemnetmail.com/faq/1.3.aspx
    http://www.systemnetmail.com/faq/3.aspx
     
    Mark Rae, Apr 13, 2007
    #2
    1. Advertising

  3. Akbur

    Akbur Guest

    On 13 Apr, 13:19, "Mark Rae" <> wrote:
    > "Akbur" <> wrote in message
    >
    > news:...
    >
    >
    >
    >
    >
    > > I'm having major issues sending an email from my ASP.NET app.

    >
    > > I'm getting a "Could not create 'CDO.Message' object".

    >
    > > When I did a search for cdosys.dll in \win_location\system32, I could
    > > not find it. So I copied it from another Windows 2003 server, where
    > > it did exist. Another dependant file was missing too (inetcomm.dll).

    >
    > > I've tried registering cdosys.dll using regsvr32 cdosys.dll and also
    > > regsvr32 \win_location\system32\cdosys.dll but I keep getting an error
    > > 'LoadLibrary(...) failed - a dynamic link library (DLL) initialization
    > > routine failed'. The same happens when I try to registry
    > > inetcomm.dll.

    >
    > > An SMTP service is installed on the Windows 2003 machine I am dealing
    > > with. I have a feeling it is because cdosys.dll does not exist in the
    > > registry which is why the error is occuring, but I do not know how to
    > > overcome the LoadLibrary failure message.

    >
    > > Can anyone advise? I've read lots of good articles on the net but to
    > > no avail.

    >
    > Well, first things first... You say you are using ASP.NET, so what on earth
    > are you trying to do with cdosys.dll...?????
    >
    > To send email in any .NET application, all you need is the System.Net.Mail
    > namespace, and a valid SMTP queue:http://www.systemnetmail.com/faq/1.3.aspxhttp://www.systemnetmail.com/faq/3.aspx- Hide quoted text -
    >
    > - Show quoted text -


    I am using System.Web.Mail in my code (still using ASP 1.1 for various
    reasons and dont have the luxury of using the SmtpClient class) - but
    I thought that cdosys.dll is used by System.Web.Mail and therefore is
    necessary. You imply this is incorrect - fair enough.

    In my code I'm doing a very simple SmtpMail.Send (...). Before I do
    the send I ensure that SmtpMail.SmtpServer is set a remote SMTP
    server. I still get the "Could not create 'CDO.Message' object"
    error.
     
    Akbur, Apr 13, 2007
    #3
  4. Akbur

    Aidy Guest

    > Well, first things first... You say you are using ASP.NET, so what on
    > earth are you trying to do with cdosys.dll...?????


    The .net mail class is simply a .net wrapper around the CDO COM objects.

    He doesn't say what vs of .net he is using, maybe with 2.0 they have a pure
    ..net solution (I know they downgraded some classes in this area so hopefully
    that is the case) but in 1.1 you defo use CDO.
     
    Aidy, Apr 13, 2007
    #4
  5. Akbur

    Mark Rae Guest

    "Akbur" <> wrote in message
    news:...

    > I am using System.Web.Mail in my code (still using ASP 1.1 for various
    > reasons and dont have the luxury of using the SmtpClient class)


    OK. Generally speaking, because ASP.NET v2 has been out for nearly 18 months
    now, people will assume that's what you are using unless you explicitly
    state otherwise...

    > - but I thought that cdosys.dll is used by System.Web.Mail and therefore
    > is
    > necessary. You imply this is incorrect - fair enough.


    Now that I know you're using v1.1, then things are a little different:
    http://www.systemwebmail.com/faq/1.3.aspx
    http://www.systemwebmail.com/faq/2.1.aspx

    > In my code I'm doing a very simple SmtpMail.Send (...). Before I do
    > the send I ensure that SmtpMail.SmtpServer is set a remote SMTP
    > server. I still get the "Could not create 'CDO.Message' object"
    > error.


    To troubleshoot that, you'll need to inspect the InnerException property of
    the Exception object:
    http://www.systemwebmail.com/faq/4.aspx

    Also see the following:
    http://www.google.co.uk/search?sour...GLG:en&q="system.web.mail" "Could not create"
     
    Mark Rae, Apr 13, 2007
    #5
  6. Akbur

    Akbur Guest

    On Apr 13, 2:21 pm, "Aidy" <> wrote:
    > > Well, first things first... You say you are using ASP.NET, so what on
    > > earth are you trying to do with cdosys.dll...?????

    >
    > The .net mail class is simply a .net wrapper around the CDO COM objects.
    >
    > He doesn't say what vs of .net he is using, maybe with 2.0 they have a pure
    > .net solution (I know they downgraded some classes in this area so hopefully
    > that is the case) but in 1.1 you defo use CDO.


    Sorry for not being clear. I'm definitely using 1.1.
     
    Akbur, Apr 13, 2007
    #6
  7. Akbur

    Mark Rae Guest

    "Aidy" <> wrote in message
    news:eek:...

    >> Well, first things first... You say you are using ASP.NET, so what on
    >> earth are you trying to do with cdosys.dll...?????

    >
    > He doesn't say what vs of .net he is using,


    He did in a later post...

    > maybe with 2.0 they have a pure .net solution (I know they downgraded some
    > classes in this area so hopefully that is the case)


    It is, AFAIK...

    > but in 1.1 you defo use CDO.


    Indeed - see subsequent posts in this thread...
     
    Mark Rae, Apr 13, 2007
    #7
  8. Akbur

    Aidy Guest

    > He did in a later post...

    I know

    > It is, AFAIK...


    Good

    > Indeed - see subsequent posts in this thread...


    I have.

    Look, I can post and add no value also :)
     
    Aidy, Apr 13, 2007
    #8
  9. Akbur

    Akbur Guest

    On Apr 13, 2:51 pm, "Mark Rae" <> wrote:
    > "Aidy" <> wrote in message
    >
    > news:eek:...
    >
    > >> Well, first things first... You say you are using ASP.NET, so what on
    > >> earth are you trying to do with cdosys.dll...?????

    >
    > > He doesn't say what vs of .net he is using,

    >
    > He did in a later post...
    >
    > > maybe with 2.0 they have a pure .net solution (I know they downgraded some
    > > classes in this area so hopefully that is the case)

    >
    > It is, AFAIK...
    >
    > > but in 1.1 you defo use CDO.

    >
    > Indeed - see subsequent posts in this thread...


    Mark,

    Thank you for your support. The issue has been resolved.

    I found that vital DLL files were missing in my installation of
    Windows 2003. For some reason, Outlook Express was not installed on
    the server. This resulted in some dll's that System.Web.Mail requires
    to be missing. Once I had installed Outlook Express 5 on the server,
    I then proceeded to register cdosys.dll (regsvr32). I then ran my
    ASP.NET 1.1 app again and found that it was working perfectly.

    Best regards,
    Akbur
     
    Akbur, Apr 13, 2007
    #9
    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. ram

    cdosys.dll problem

    ram, Aug 18, 2003, in forum: ASP .Net Security
    Replies:
    0
    Views:
    120
  2. RedMoosh

    creating bulk email through cdosys.dll

    RedMoosh, Oct 17, 2006, in forum: ASP General
    Replies:
    9
    Views:
    175
    RedMoosh
    Oct 24, 2006
  3. Orgil
    Replies:
    3
    Views:
    358
    Justin Piper
    Jul 20, 2007
  4. paulmitchell507

    CDOSYS send email with ASP

    paulmitchell507, Jul 31, 2008, in forum: ASP General
    Replies:
    9
    Views:
    218
    paulmitchell507
    Aug 5, 2008
  5. Jerry C

    CDO.dll or cdosys.dll

    Jerry C, Aug 14, 2008, in forum: ASP General
    Replies:
    4
    Views:
    414
    Steven Cheng [MSFT]
    Aug 22, 2008
Loading...

Share This Page