Hi Jiachen, thx that you try to help me. i rechecked your modified code
it looks fine, but when i debug it, it stops at this line:
Dim requestDate = client.checkVat(countryCode, vatNumber, valid, name, address)
and writes this exeption:
Exeption unhandled
System.ServiceModel.Security.SecurityNegotiationException: 'Could not establish secure channel for SSL/TLS with authority 'ec.europa.eu'.'
Inner Exeption
WebException: The request was aborted: Could not create SSL/TLS secure channel.
Here i copy details from this exception
System.ServiceModel.Security.SecurityNegotiationException
HResult=0x80131501
Message=Could not establish secure channel for SSL/TLS with authority 'ec.europa.eu'.
Source=mscorlib
StackTrace:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at wsdl_vat.ServiceReference1.checkVatPortType.checkVat(checkVatRequest request)
at wsdl_vat.ServiceReference1.checkVatPortTypeClient.ServiceReference1_checkVatPortType_checkVat(checkVatRequest request) in D:\adata\programovanie\wsdl_vat\Connected Services\ServiceReference1\Reference.vb:line 358
at wsdl_vat.ServiceReference1.checkVatPortTypeClient.checkVat(String& countryCode, String& vatNumber, Boolean& valid, String& name, String& address) in D:\adata\programovanie\wsdl_vat\Connected Services\ServiceReference1\Reference.vb:line 366
at wsdl_vat.Form1.Button2_Click(Object sender, EventArgs e) in D:\adata\programovanie\wsdl_vat\Form1.vb:line 35
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
at wsdl_vat.My.MyApplication.Main(String[] Args) in :line 83
This exception was originally thrown at this call stack:
[External Code]
Inner Exception 1:
WebException: The request was aborted: Could not create SSL/TLS secure channel.
i hope you can figure out problem...
is