我得到了一个项目,即在他们离开之前修复另一名员工正在处理的程序。我需要改变的一部分是发送XML文件的API,我需要更改的是这个文件的目的地。例如,它过去常常访问google.com,现在转到https://google.com。给我带来问题的代码是。
Dim API As New Processor("https://google.com", 86, "97", 30000)
以前说的是
Dim API As New Processor("google.com", 86, "97", 30000)
我不确定为什么,但它不喜欢https:
我得到的错误是 请求的名称有效,但未找到所请求类型的数据
这是堆栈跟踪:
[SocketException (0x2afc): The requested name is valid, but no data of the requested type was found]
System.Net.Dns.InternalGetHostByName(String hostName, Boolean includeIPv6) +8238680
System.Net.Dns.Resolve(String hostName) +201
Enterprise.XTrans.Processor.setIPEndPoint() +261
Enterprise.XTrans.Processor..ctor(String ServerIP, Int32 ServerPort, String CompanyKey, Int32 TimeOut) +172
uc_PayAuthorization..ctor() in C:\Inetserv\CRMDashboard\uc\PayAuthorization.ascx.vb:85
ASP.uc_payauthorization_ascx..ctor() in C:\Inetserv\CRMDashboard\uc\PayAuthorization.ascx.vb:912304
ASP.customer_aspx.__BuildControlPayAuthorization() in C:\Inetserv\CRMDashboard\Customer.aspx:555
ASP.customer_aspx.__BuildControlpanLeft() in C:\Inetserv\CRMDashboard\Customer.aspx:156
ASP.customer_aspx.__BuildControlconLeft(Control __ctrl) in C:\Inetserv\CRMDashboard\Customer.aspx:155
System.Web.UI.MasterPage.InstantiateInContentPlaceHolder(Control contentPlaceHolder, ITemplate template) +103
ASP.dashboard_master.__BuildControlcphLeftContent() in C:\Inetserv\CRMDashboard\Dashboard.master:109
ASP.dashboard_master.__BuildControlform1() in C:\Inetserv\CRMDashboard\Dashboard.master:48
ASP.dashboard_master.__BuildControlTree(dashboard_master __ctrl) in C:\Inetserv\CRMDashboard\Dashboard.master:1
ASP.dashboard_master.FrameworkInitialize() in C:\Inetserv\CRMDashboard\Dashboard.master.vb:912308
System.Web.UI.MasterPage.CreateMaster(TemplateControl owner, HttpContext context, VirtualPath masterPageFile, IDictionary contentTemplateCollection) +1197
System.Web.UI.Page.get_Master() +67
System.Web.UI.Page.ApplyMasterPage() +18
System.Web.UI.Page.PerformPreInit() +62
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1120
Processor类是
#Region "Assembly XTransProcessor, Version=1.4.0.2, Culture=neutral, PublicKeyToken=1516eae9737b52e7"
' \\USASPDEV02\Inetserv\CRMDashboard\Bin\XTransProcessor.dll
#End Region
Namespace Enterprise.XTrans
Public Class Processor
Public Sub New(ServerIP As String, ServerPort As Integer, CompanyKey As String, TimeOut As Integer)
Public ReadOnly Property ResponseData As String
Public ReadOnly Property RequestData As String
Public ReadOnly Property RequestXml As String
Public Property NetKey As String
Public Property EncryptionMode As EncryptionModeType
Public ReadOnly Property TimeOut As Integer
Public ReadOnly Property CompanyKey As String
Public ReadOnly Property ServerPort As Integer
Public ReadOnly Property ResponseXml As String
Public ReadOnly Property ServerIP As String
Public ReadOnly Property LastError As String
Public Sub ResetObjects()
Public Sub AddEncryptionKey(Key As String)
Public Sub SetValue(KeyName As String, KeyValue As String, attributes() As TransactionAttribute)
Public Sub SetValue(KeyName As String, KeyValue As String, AttributeValue As String)
Public Sub SetValue(KeyName As String, KeyValue As String, Base64 As Boolean)
Public Sub SetValue(KeyName As String, KeyValue As String)
Protected Overrides Sub Finalize()
Public Function ProcessRequest() As String
Public Function Build() As String
End Class
End Namespace