我尝试调用我的网络服务,它给了我一个“空引用异常”。该代码曾经有效。从通话中收到的状态码正常:200。会发生什么?
'** Shipping.Carriers is my web service
dim myWs as Shipping.Carriers
dim strCode as string
Using myWS = New Shipping.Carriers
myWS.Credentials = System.Net.CredentialCache.DefaultCredentials
'** when I pause here and check the status of the Web service...
'** I see the Property Evaluation Failed on all of the functions in the web service
myWS.Timeout = 400000
'** the next line of code gives me the nullreference exception
strCode = myWS.fUPS(my parameters go here)
txtMsg.Text = strCode
End Using