CreateMHTMLBody with local ASP URL doesn't work

Discussion in 'ASP General' started by Braky Wacky, Nov 10, 2004.

  1. Braky Wacky

    Braky Wacky Guest

    Here's my scenario. I have an ASP page that I call on my server, say:

    http://myserver.com/firstPage.asp

    In this first ASP page, I want to send a MIME email that has the
    contents of another ASP page which is located on the same server. So
    the code looks like:

    <%
    Set objCdoMesg = Server.CreateObject("CDO.Message")
    objCdoMesg.CreateMHTMLBody("http://myserver.com/secondPage.asp")
    objCdoMesg.To = ""
    objCdoMesg.From = ""
    objCdoMesg.Subject = "Testing MIME messages"
    objCdoMesg.Send
    %>

    This process will hang on the CreateMHTMLBody() method call. If I
    move the second page to another server and reference it there, it's
    fine. If I rename the second page to "secondPage.html" and leave it
    on the local server and reference it that way (the second page doesn't
    have any ASP code in it at this point, just HTML), it's fine.

    It seems like the only time the hang occurs is when the requested file
    is an ASP page and is located on the local server.

    Anyone seen anything like this? I'm running on Windows 2000 Server
    with all the current security updates. Seems like it may be something
    in the way the process(es) are running.

    Thanks,
    Kevin
     
    Braky Wacky, Nov 10, 2004
    #1
    1. Advertising

  2. Braky Wacky

    Mark Schupp Guest

    Have a look at this:
    http://support.microsoft.com/default.aspx?scid=kb;en-us;290591
    it may be a similar problem.


    --
    --Mark Schupp
    Head of Development
    Integrity eLearning
    www.ielearning.com

    "Braky Wacky" <> wrote in message
    news:...
    > Here's my scenario. I have an ASP page that I call on my server, say:
    >
    > http://myserver.com/firstPage.asp
    >
    > In this first ASP page, I want to send a MIME email that has the
    > contents of another ASP page which is located on the same server. So
    > the code looks like:
    >
    > <%
    > Set objCdoMesg = Server.CreateObject("CDO.Message")
    > objCdoMesg.CreateMHTMLBody("http://myserver.com/secondPage.asp")
    > objCdoMesg.To = ""
    > objCdoMesg.From = ""
    > objCdoMesg.Subject = "Testing MIME messages"
    > objCdoMesg.Send
    > %>
    >
    > This process will hang on the CreateMHTMLBody() method call. If I
    > move the second page to another server and reference it there, it's
    > fine. If I rename the second page to "secondPage.html" and leave it
    > on the local server and reference it that way (the second page doesn't
    > have any ASP code in it at this point, just HTML), it's fine.
    >
    > It seems like the only time the hang occurs is when the requested file
    > is an ASP page and is located on the local server.
    >
    > Anyone seen anything like this? I'm running on Windows 2000 Server
    > with all the current security updates. Seems like it may be something
    > in the way the process(es) are running.
    >
    > Thanks,
    > Kevin
     
    Mark Schupp, Nov 10, 2004
    #2
    1. Advertising

  3. Did you try using 127.0.0.1, or localhost?

    --
    http://www.aspfaq.com/
    (Reverse address to reply.)




    "Braky Wacky" <> wrote in message
    news:...
    > Here's my scenario. I have an ASP page that I call on my server, say:
    >
    > http://myserver.com/firstPage.asp
    >
    > In this first ASP page, I want to send a MIME email that has the
    > contents of another ASP page which is located on the same server. So
    > the code looks like:
    >
    > <%
    > Set objCdoMesg = Server.CreateObject("CDO.Message")
    > objCdoMesg.CreateMHTMLBody("http://myserver.com/secondPage.asp")
    > objCdoMesg.To = ""
    > objCdoMesg.From = ""
    > objCdoMesg.Subject = "Testing MIME messages"
    > objCdoMesg.Send
    > %>
    >
    > This process will hang on the CreateMHTMLBody() method call. If I
    > move the second page to another server and reference it there, it's
    > fine. If I rename the second page to "secondPage.html" and leave it
    > on the local server and reference it that way (the second page doesn't
    > have any ASP code in it at this point, just HTML), it's fine.
    >
    > It seems like the only time the hang occurs is when the requested file
    > is an ASP page and is located on the local server.
    >
    > Anyone seen anything like this? I'm running on Windows 2000 Server
    > with all the current security updates. Seems like it may be something
    > in the way the process(es) are running.
    >
    > Thanks,
    > Kevin
     
    Aaron [SQL Server MVP], Nov 10, 2004
    #3
  4. Braky Wacky

    Braky Wacky Guest

    I was thinking it was probably something along those lines, i.e. a
    threading issue with the process. I've since backed out of the plan
    to use that functionality in favor of a reasonable workaround. Thanks
    for the link. I knew I had seen something similar with XMLHTTP, but
    had forgotten about it.

    I may revisit, building the functionality inside of .NET with COM
    interop, to see if the .NET runtime plays any nicer with it. But
    that's an exercise for another day.

    Kevin


    "Mark Schupp" <> wrote in message news:<>...
    > Have a look at this:
    > http://support.microsoft.com/default.aspx?scid=kb;en-us;290591
    > it may be a similar problem.
    >
    >
    > --
    > --Mark Schupp
    > Head of Development
    > Integrity eLearning
    > www.ielearning.com
    >
    > "Braky Wacky" <> wrote in message
    > news:...
    > > Here's my scenario. I have an ASP page that I call on my server, say:
    > >
    > > http://myserver.com/firstPage.asp
    > >
    > > In this first ASP page, I want to send a MIME email that has the
    > > contents of another ASP page which is located on the same server. So
    > > the code looks like:
    > >
    > > <%
    > > Set objCdoMesg = Server.CreateObject("CDO.Message")
    > > objCdoMesg.CreateMHTMLBody("http://myserver.com/secondPage.asp")
    > > objCdoMesg.To = ""
    > > objCdoMesg.From = ""
    > > objCdoMesg.Subject = "Testing MIME messages"
    > > objCdoMesg.Send
    > > %>
    > >
    > > This process will hang on the CreateMHTMLBody() method call. If I
    > > move the second page to another server and reference it there, it's
    > > fine. If I rename the second page to "secondPage.html" and leave it
    > > on the local server and reference it that way (the second page doesn't
    > > have any ASP code in it at this point, just HTML), it's fine.
    > >
    > > It seems like the only time the hang occurs is when the requested file
    > > is an ASP page and is located on the local server.
    > >
    > > Anyone seen anything like this? I'm running on Windows 2000 Server
    > > with all the current security updates. Seems like it may be something
    > > in the way the process(es) are running.
    > >
    > > Thanks,
    > > Kevin
     
    Braky Wacky, Nov 11, 2004
    #4
  5. Braky Wacky

    Braky Wacky Guest

    Yeah, I tried that. I had high hopes for that solution. :) Alas, it
    was not meant to be; I saw the same behavior there too. Thanks for
    the suggestion though.

    Kevin


    "Aaron [SQL Server MVP]" <> wrote in message news:<#>...
    > Did you try using 127.0.0.1, or localhost?
    >
    > --
    > http://www.aspfaq.com/
    > (Reverse address to reply.)
    >
    >
    >
    >
    > "Braky Wacky" <> wrote in message
    > news:...
    > > Here's my scenario. I have an ASP page that I call on my server, say:
    > >
    > > http://myserver.com/firstPage.asp
    > >
    > > In this first ASP page, I want to send a MIME email that has the
    > > contents of another ASP page which is located on the same server. So
    > > the code looks like:
    > >
    > > <%
    > > Set objCdoMesg = Server.CreateObject("CDO.Message")
    > > objCdoMesg.CreateMHTMLBody("http://myserver.com/secondPage.asp")
    > > objCdoMesg.To = ""
    > > objCdoMesg.From = ""
    > > objCdoMesg.Subject = "Testing MIME messages"
    > > objCdoMesg.Send
    > > %>
    > >
    > > This process will hang on the CreateMHTMLBody() method call. If I
    > > move the second page to another server and reference it there, it's
    > > fine. If I rename the second page to "secondPage.html" and leave it
    > > on the local server and reference it that way (the second page doesn't
    > > have any ASP code in it at this point, just HTML), it's fine.
    > >
    > > It seems like the only time the hang occurs is when the requested file
    > > is an ASP page and is located on the local server.
    > >
    > > Anyone seen anything like this? I'm running on Windows 2000 Server
    > > with all the current security updates. Seems like it may be something
    > > in the way the process(es) are running.
    > >
    > > Thanks,
    > > Kevin
     
    Braky Wacky, Nov 11, 2004
    #5
    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. =?Utf-8?B?U2FtTkVU?=

    CreateMHTMLBody PROBLEM

    =?Utf-8?B?U2FtTkVU?=, Jan 26, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    877
    =?Utf-8?B?U2FtTkVU?=
    Jan 26, 2004
  2. lurker
    Replies:
    1
    Views:
    730
    Disco Octopus
    Apr 5, 2005
  3. =?Utf-8?B?UmljaGFyZCBTY2hhZWZlcg==?=

    CreateMHTMLBody throws Unknown Error

    =?Utf-8?B?UmljaGFyZCBTY2hhZWZlcg==?=, Nov 10, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    647
    =?Utf-8?B?UmljaGFyZCBTY2hhZWZlcg==?=
    Nov 10, 2006
  4. Alan Morris

    CreateMHTMLBody

    Alan Morris, Sep 19, 2004, in forum: ASP General
    Replies:
    0
    Views:
    245
    Alan Morris
    Sep 19, 2004
  5. Richard Schaefer

    Unknown error in CreateMHTMLBody

    Richard Schaefer, Nov 10, 2006, in forum: ASP General
    Replies:
    2
    Views:
    295
    Anthony Jones
    Nov 10, 2006
Loading...

Share This Page