在经典ASP在VBScript中的Server.CreateObject HTTP状态443 IIS

2019-10-19 02:59发布

这是一个已经运行至少5岁的遗留代码。 该DLL恰好涉及到PayPal的商户PayFlowPro处理服务,但我认为这是一个Windows的情况导致了问题。

突然,基于下面的代码,我看到在浏览器这个错误:

> Error with new credit card processing software, please call Neal at xxx-xxx-xxxx
> Error Ref102: client = Server.CreateObject returned Null
> (Detailed error: Object doesn't support this property or method)
> (Detailed error: 438)

IIS日志显示我的443:

2013-12-19 00:57:24 W3SVC4 173.45.87.10 POST /myapps/adm_settle.asp - 443 - 76.187.77.159 Mozilla/5.0+(Windows+NT+6.2;+WOW64;+rv:26.0)+Gecko/20100101+Firefox/26.0 200 0 0

因为我看到了433以上,我想肯定会有一些安全错误。 正如一个测试,我试图把应用程序池的用户在管理员组中,重新启动IIS,并仍然得到确切同样的错误。 我也给了用户特定的访问读取磁盘上的.DLL。

我没跑REGASM尝试重新注册.dll。 我也试过REGSRV32,但我想这对失败的DLL .NET。 这是一个几年,因为我已经经历了软件这个老。

该ASP / VBScript代码:

    Err.Clear 
    On Error Resume Next 
    set client = Server.CreateObject("PayPal.Payments.Communication.PayflowNETAPI")
    If Err.number > 0 Then 
       response.write "Error with new credit card processing software, please call Neal at xxx-xxx-xxxx" 
       response.write "</br>(Detailed error: " & Err.Description & ")" 
       response.write "</br>(Detailed error: " & Err.Number & ")" 
       response.End 
    End If 
    If client Is Nothing Then 
       Response.write "Error with new credit card processing software, please call Neal at xxx-xxx-xxxx" 
       Response.Write "</br>Error Ref101: client = Server.CreateObject returned 'nothing' "
       response.write "</br>(Detailed error: " & Err.Description & ")" 
       response.write "</br>(Detailed error: " & Err.Number & ")" 
       Response.End 
    End If 
    If client = null Then 
       Response.write "Error with new credit card processing software, please call Neal at xxx-xxx-xxxx" 
       Response.Write "</br>Error Ref102: client = Server.CreateObject returned Null "
       response.write "</br>(Detailed error: " & Err.Description & ")" 
       response.write "</br>(Detailed error: " & Err.Number & ")" 
       Response.End 
    End If 

另外,我不知道的443 HTTP状态如何被改变为438 Err.Number的。

Answer 1:

感谢大家。 我想我已经救了我原来的错误。 我一直在做C#这么久,我几乎忘了如何代码的VBScript。 我尝试添加错误处理可能已经给我错误的结果。

如果某些谁曾评论就已经把答案的家伙,我会接受他们。

443是另一个假线索和对我而言,这是一个错误,而不是一个端口#坏的假设。

不幸的是,现在,我没有保存原来的错误。 我已经添加的代码我原来的代码给理应更好或更严格的错误处理,并加入了“= NULL”测试是一个坏主意。

这是VBScript的使用空VS没什么VS的isNull的一个很好的解释: http://evolt.org/node/346/

我删除,并更正后的代码是:

    Err.Clear 
    On Error Resume Next 
    'set client = Server.CreateObject("PFProCOMControl.PFProCOMControl.1")
    set client = Server.CreateObject("PayPal.Payments.Communication.PayflowNETAPI")
    If Err.number > 0 Then 
       response.write "Error with new credit card processing software, please call Neal at 214-455-8060" 
       response.write "</br>(Detailed error: " & Err.Description & ")" 
       response.write "</br>(Detailed error: " & Err.Number & ")" 
       response.End 
    End If 
    If client Is Nothing Then 
       Response.write "Error with new credit card processing software, please call Neal at 214-455-8060" 
       Response.Write "</br>Error Ref101: client = Server.CreateObject returned 'nothing' "
       response.write "</br>(Detailed error: " & Err.Description & ")" 
       response.write "</br>(Detailed error: " & Err.Number & ")" 
       Response.End 
    End If 


文章来源: HTTP Status 443 on Server.CreateObject in VBScript under Classic ASP IIS 6.0