问题描述
我已经为Apache托管的Web服务构建了Web Service客户端。解决安全问题后,我得到了答案。但是,它使我的(Windows窗体)应用程序出错。一旦在try块中捕获到此错误,将显示此处包含的消息。在此描述之后,会有内部错误消息和相关代码。请在app.config中向我显示(如有可能)必要的行。
===================inner exception========================
Il contenuto della risposta rilevato dal client è di tipo 'multipart/related;
boundary="MIMEBoundaryurn_uuid_C590146FE077611F591604235120315"; type="application/xop+xml";
start="<0.urn:uuid:[email protected]>";
start-info="text/xml"',invece del previsto 'text/xml'.
Richiesta non riuscita con messaggio di errore:
--
--MIMEBoundaryurn_uuid_C590146FE077611F591604235120315
Content-Type: application/xop+xml; charset=utf-8; type="text/xml"
Content-Transfer-Encoding: binary
Content-ID: <0.urn:uuid:[email protected]>
<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<ns2:dirResponse xmlns:ns2="http://webservices.ftp.telematico.dogana.dogane.ag_dogane.finanze.it">
<dirReturn></dirReturn>
</ns2:dirResponse>
</soapenv:Body>
</soapenv:Envelope>
--MIMEBoundaryurn_uuid_C590146FE077611F591604235120315--
--.
相关的VB代码
Option Strict Off
Option Explicit On
Imports System.Net
Imports System.Security.Authentication
Friend Class MENU_Renamed
Inherits System.Windows.Forms.Form
Dim WithEvents wsFtp As WebRefWsFtp.TelematicoFtpWsBindingImplService
Private Sub btnTest_Click(sender As Object,e As EventArgs) Handles btnTest.Click
Const _tls12 As SslProtocols = SslProtocols.Tls12
Const Tls12 As SecurityProtocolType = CType(_tls12,SecurityProtocolType)
ServicePointManager.SecurityProtocol = Tls12
wsFtp = New WebRefWsFtp.TelematicoFtpWsBindingImplService
Dim mycredentialCache As CredentialCache = New CredentialCache()
Dim credentials As NetworkCredential = New NetworkCredential("vat-place","password")
mycredentialCache.Add(New Uri("https://ws-telematicoprova.adm.gov.it:443"),"Basic",credentials)
wsFtp.Credentials = mycredentialCache
wsFtp.dirAsync("?")
End Sub
Private Sub wsFtp_dirCompleted(sender As Object,e As WebRefWsFtp.dirCompletedEventArgs) Handles wsFtp.dirCompleted
Try
Dim res = e.Result.ToString
Dim r = res
Catch ex As Exception
Dim err As String = ex.ToString
End Try
End Sub
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)