下载阿里云for .net4.0版本的dll复制到Foxtable的安装目录,然后引用:
http://www.foxtable.com/webhelp/topics/1936.htm
调用代码参考,按照下面红色字的方式补全蓝色字各种类型的命名空间,至于是哪个命名空间,可以咨询阿里云客服,或者看sdk源码
Dim profile As Aliyun.Acs.Core.Profile.IClientProfile = Aliyun.Acs.Core.Profile.DefaultProfile.GetProfile("cn-shanghai", "<accessKeyId>", "<accessSecret>")
Dim client As xx命名空间.DefaultAcsClient = New xx命名空间.DefaultAcsClient(profile)
Dim request As xx命名空间.CommonRequest = New xx命名空间.CommonRequest()
request.Method = MethodType.POST
request.Domain = "ocr.cn-shanghai.aliyuncs.com"
request.Version = "2019-12-30"
request.Action = "RecognizeIdentityCard"
request.AddQueryParameters("Side", "back")
request.AddQueryParameters("ImageURL", "http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/ocr/RecognizeIdentityCard/sfzbm1.jpg")
Try
Dim response As CommonResponse = client.GetCommonResponse(request)
dim ret as string = System.Text.Encoding.[Default].GetString(response.HttpResponse.Content)
msgbox(ret )
Catch e As Exception
msgbox(e.message)
End Try