经典ASP IIS 6.0下VBScript中Server.CreateObject上的HTTP状态443 [英] HTTP Status 443 on Server.CreateObject in VBScript under Classic ASP IIS 6.0

查看:111
本文介绍了经典ASP IIS 6.0下VBScript中Server.CreateObject上的HTTP状态443的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是已运行至少5年的旧版旧代码.该DLL碰巧与Paypal的PayFlowPro商家处理服务有关,但我认为这是Windows场景所引起的.

This is old legacy code that has been running at least 5 years. The DLL happens to relate to Paypal's PayFlowPro merchant processing service, but I think this is a Windows scenario causing the issue.

突然,根据下面的代码,我在浏览器中看到此错误:

Suddenly, based on the code below, I'm seeing this error in the browser:

> 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:

The IIS log shows me the 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.

Since I saw the 433 above, I'm thinking there must be some security error. Just as a test, I tried putting the app-pool user in the Administrator group, restarted IIS, and still get exact same error. I have also given that user specific access to read the .DLL on disk.

我确实运行了REGASM来尝试重新注册.DLL.我也尝试过REGSRV32,但是我猜想在.NET DLL上失败了.自从我处理这么老的软件已经过去了几年.

I did run REGASM to try to re-register the .DLL. I also tried REGSRV32, but I guess that fails on .NET DLLs. It's been a few years since I've dealt with software this old.

ASP/VBScript代码:

The ASP/VBScript Code:

    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.

Also, I'm not sure how the 443 http status gets changed to a 438 Err.Number.

推荐答案

感谢大家.我希望我已经保存了原来的错误.我从事C#这么久了,我忘记了如何编写VBScript.我试图添加错误处理,这可能会一直给我带来错误的结果.

Thanks everyone. I wish I had saved my original error. I've been doing C# so long, I was forgetting how to code VBScript. I tried to add error handling which may have been giving me false results.

如果一些发表评论的人会回答,我会接受的.

If some of the guys who had commented would have put answers, I would have accepted them.

443是另一个错误的线索,我认为这是一个错误,而不是端口号,这是错误的假设.

The 443 was another false trail and bad assumption on my part that it was an error, not a port #.

不幸的是,现在我没有保存原始错误.我已经在原始代码中添加了代码,以提供更好或更严格的错误处理,并且添加"= null"测试是一个坏主意.

Unfortunately now, I didn't save the original error. I had added code to my original code to give supposedly better or tighter error handling, and adding the "= null" test was a bad idea.

这很好地解释了VBScript使用空vs空vs isNull: http://evolt.org/node/346/

This was a pretty good explanation of VBScript's use of empty vs nothing vs isNull: http://evolt.org/node/346/

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

I removed that, and the corrected code is:

    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 

这篇关于经典ASP IIS 6.0下VBScript中Server.CreateObject上的HTTP状态443的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆