Solved

CDO CreateMHTMLBody times out on .asp, but not .htm/.html/etc

Posted on 2004-09-13
5
632 Views
Last Modified: 2008-01-09
I believe I am using CDO.Message, and specifically CreateMHTMLBody, correctly.  In the snippet below, I get the desired behaviour with the following values of "url":

- "http://www.google.ca"
- "http://localhost/testfile.htm"
- "http://127.0.0.1/testfile.htm"
- "http://my-compujter-name/testfile.htm"

But if I try one of the following (which is, of course, just what I need):

- "http://localhost/testfile.asp"
- "http://127.0.0.1/testfile.asp"
- "http://my-computer-name/testfile.asp"

The operation times out.  No entry is made in my machine's Event Log.  We use a proxy server which is bypassed for local addresses, and I tried adding the appropriate entries for the variables cdoURLProxyServer (the IP of the server) and cdoURLProxyBypass (to "<local>") but that didn't change anything.  I also tried setting the Flags parameter to cdoSuppressAll, no dice.  Any experts out there who can help?

snippet:

...
    Set oMailConfig = New CDO.Configuration
    Set Flds = oMailConfig.Fields
    With Flds
      .item(cdoSendUsingMethod) = cdoSendUsingPort
      .item(cdoSMTPServer) = "myMailServer"
      .item(cdoSMTPConnectionTimeout) = 60
      .item(cdoSMTPServerPort) = 25
      .item(cdoSMTPAuthenticate) = cdoAnonymous
      .Update
    End With
   
    Set oMail = New CDO.Message
    With oMail
      Set .Configuration = oMailConfig
            .To = recipients
            .From = sender
            .subject = subject
            .CreateMHTMLBody url
            .Send
    End With
...

0
Comment
Question by:barryfandango
  • 2
5 Comments
 
LVL 3

Author Comment

by:barryfandango
ID: 12048117
I think I've discovered the source of the problem.  This code is running in a VB6 COM component called by an ASP webpage.  If i change the variable "url" to point to a test ASP page on another web server on the network, it works properly.  If i point "url" to an .aspx (ASP.NET) file running on the _same_ server, it works.  Thus it appears that the ASP process is locked up using the COM component and will not break to render the page I am trying to attach.

Any ideas, experts?  Looks like an old-fashioned deadlock to me but perhaps there's a way around it.
0
 
LVL 3

Author Comment

by:barryfandango
ID: 12559726
I think a refund is in order here, as I never received any response.  I don't want to risk negative feedback, especially in those menacing capitalized letters!
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 12848591
PAQed with points refunded (500)

modulo
Community Support Moderator
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question