[问题] CreateMHTMLBody 不能连本机的 asp档

楼主: lanesu (新竹张泰山)   2017-09-01 17:51:09
各位大大好 <(_ _)>
我想要用 CreateMHTMLBody(),撷取另外一个 asp 档的内容作为信件内文,
发现只要是参考同一台电脑的另一个 asp 档,网页就会卡住,直到 time out。
作业系统:Windows Server 2012 R2
IIS 版本:8.5
程式码:
<%
Dim Msgconfig,Fields,Objmail,Msgtitle,Msgbody
Set Msgconfig = Server.CreateObject("CDO.Configuration")
With Msgconfig.Fields
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 1
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") =
"Localhost"
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
.Update
End With
Set Objmail=Server.CreateObject("CDO.Message")
Set Objmail.configuration = Msgconfig
Objmail.From = "[email protected]"
Objmail.To = "[email protected]"
Objmail.Subject = "Test Mail"
Objmail.CreateMHTMLBody "http://my_server/body.asp"
Objmail.Send
Set Objmail = Nothing
%>
这几天测试的状况是:
1. 直接用浏览器连结 http://my_server/body.asp 是看得到内容的
2. my_server 设定为执行 asp 档的服务器,程式会卡住
3. my_server 设定为其他服务器,可以正常发信
4. body.asp 改成其他 html 档或文字档,即使在本机上也可以发信
程式一旦卡住,整个网站就会全部停摆,一直到传回 time out 的错误讯息才恢复。
上网找好几天了,连意大利网站都搭配google翻译在嗑,都没有解法,
请问有没有大大遇过类似的问题的呢?
因为有 google 到微软的网站:https://goo.gl/qxo5uf
中间有一行:
NOTE: The two ASPs should be in different virtual folders due to threading
issues.
在猜是不是原来的 asp 档是单执行绪的,执行 CreateMHTMLBody 的时候,
要去抓另一个 asp 档传回来的东西,可是另外一个 asp 档没有执行绪可以用,
所以卡住?
如果是这样的话,有没有大大知道该怎么指定用新的执行绪去执行 CreateMHTMLBody?
有任何线索都可以,感谢<(_ _)>

Links booklink

Contact Us: admin [ a t ] ucptt.com