webservie授权调用

Dim usercode As String = System.Configuration.ConfigurationSettings.AppSettings("SAPWebServiceUserCode").ToString
Dim pwd As String = System.Configuration.ConfigurationSettings.AppSettings("SAPWebServicePSW").ToString
'调用了Credentials
Dim credentials As ICredentials = New NetworkCredential(usercode, pwd)
'调用了Credentials
myZFZ_CUSTOMER_MODService.Credentials = credentials

 

 

 

 

c#版本:

一样的使用Credentials属性,赋值一个对象即可

posted @ 2016-07-31 10:15  飘....  阅读(219)  评论(0编辑  收藏  举报